Skip to content

Add support for RubyLLM 2.0 - #218

Merged
David Elner (delner) merged 2 commits into
mainfrom
feature/ruby-llm-2
Sep 22, 2026
Merged

David Elner (delner) merged 2 commits into
mainfrom
feature/ruby-llm-2

Conversation

@delner

Copy link
Copy Markdown
Collaborator

Adds support for ruby_llm 2.0, released 2026-09-18. Our integration covered 1.x only, and 2.0 is a breaking major release that moves most of what the instrumentation reads.

What 2.0 changed

Area 1.x 2.0 Support added
Message attachments message.content.attachments on a RubyLLM::Content message.attachments; Content removed, content is a String Read either shape, so attachments reach traces again
Tool schema tool.params_schema, Providers::OpenAI::Tools tool.parameters_schema; provider Tools module removed Read either, so tool spans carry real parameters instead of {}
OpenAI endpoint Chat Completions Responses API by default Recorded Responses cassettes; each version replays its own endpoint
Tool DSL param ..., desc: parameter ..., description: Tests use whichever the loaded version exposes
Chat#with_tool present removed, with_tools remains Tests use with_tools, valid on both

Version differences are handled by duck-typing what the object exposes rather than branching on a version number, so 1.x and 2.0 run the same code path.

@delner David Elner (delner) self-assigned this Sep 22, 2026
@delner
David Elner (delner) requested a review from a team as a code owner September 22, 2026 19:03
@delner David Elner (delner) added the enhancement New feature or request label Sep 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to version cassettes by library version? And then have a test matrix of versions we test against?

@Qard Stephen Belanger (Qard) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, but I agree it might be a good idea to version things explicitly. The different endpoints is an implementation detail which could change, that doesn't explicitly reflect the version.

@delner

Copy link
Copy Markdown
Collaborator Author

Good suggestion: put them under major versions.

@delner
David Elner (delner) merged commit 59bcca2 into main Sep 22, 2026
10 checks passed
@delner
David Elner (delner) deleted the feature/ruby-llm-2 branch September 22, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants