Repository navigation
Conversation
RubyLLM 2.0 removed RubyLLM::Content and now keeps message text and attachments apart, so tool results and message building both change shape. MCP::Content becomes a value object carrying text and attachments, with to_llm_result for tool returns and to_message for chat history. Tool#execute returns a String, or the text followed by attachments. Tool#params_schema is renamed to #parameters_schema. MCP::Attachment now builds on a real source, so #content gives decoded bytes and #encoded the server's base64. Sampling config gained a Hash form for preferred_model that passes keywords to RubyLLM::Chat. RubyLLM 2.0 resolves models more strictly and defaults OpenAI to the Responses API, so a bare model name can no longer say which provider or protocol sampling should use. Prompt messages read image and audio content from the data and mimeType keys the MCP spec defines. They read content and mime_type before, which are not in the spec, so both were nil. The specs pin an explicit provider, assume the model exists, and hold OpenAI to Chat Completions, which keeps the recorded cassettes matching. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
RubyLLM 2.0 removed
RubyLLM::Contentand now keeps message text and attachments apart, so this gem no longer loaded against it. Tool results and message building both change shape to match, and the gem moves to 2.0.0 since its own users have to change code.Sampling gained a Hash form for
preferred_model. RubyLLM 2.0 resolves models more strictly and defaults OpenAI to the Responses API, so a bare model name can no longer say which provider or protocol sampling should use.Prompt messages were reading image and audio content from
contentandmime_type, which the MCP spec does not define, so both were nil. They now readdataandmimeTypelike the other three call sites.The specs pin an explicit provider and hold OpenAI to Chat Completions, which keeps the existing VCR cassettes matching without re-recording them. Worth re-recording against 2.0 defaults when API keys are to hand.
What Changed
Tool#params_schemato#parameters_schemapreferred_modelconfigPost-merge
VCR_REFRESH=trueand real API keys, then drop theprotocol: :chat_completionspin inspec_helper.rb. Until then the specs cover 1.x request shapes, not 2.0 ones.Screenshots
N/A — no UI changes