Scope check
Due diligence
What problem does this solve?
with_schema works on some providers (OpenAI, gemini) but not on Anthropic because until now they have not had support for structured output.
Proposed solution
Implement the output_format key described at https://docs.claude.com/en/docs/build-with-claude/structured-outputs when users pass a schema to the render_payload method in lib/ruby_llm/providers/anthropic/chat.rb
Why this belongs in RubyLLM
Consistent support for structured outputs across providers.
Scope check
Due diligence
What problem does this solve?
with_schema works on some providers (OpenAI, gemini) but not on Anthropic because until now they have not had support for structured output.
Proposed solution
Implement the output_format key described at https://docs.claude.com/en/docs/build-with-claude/structured-outputs when users pass a schema to the render_payload method in lib/ruby_llm/providers/anthropic/chat.rb
Why this belongs in RubyLLM
Consistent support for structured outputs across providers.