fix: load RubyLLM when the gem registers its acronym - #372
Merged
TonsOfFun merged 1 commit intoAug 24, 2026
Conversation
ruby_llm's railtie inflects "RubyLLM" as an acronym, so provider_load requires rubyllm_provider.rb. Add that alias, matching openai_provider.rb.
TonsOfFun
pushed a commit
that referenced
this pull request
Aug 24, 2026
Takes main's rubyllm_provider.rb from #372 so the alias fix itself stays out of this PR's diff. # Conflicts: # lib/active_agent/providers/rubyllm_provider.rb
TonsOfFun
pushed a commit
that referenced
this pull request
Aug 24, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5b2SozepYRbwEcFwkARek
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.
Summary
In a Rails app that bundles the
ruby_llmgem,service: "RubyLLM"fails while loading the provider.Bug
provider_loadrequiresactive_agent/providers/#{service_name.underscore}_provider.The
ruby_llmgem's railtie registersinflect.acronym "RubyLLM", so"RubyLLM".underscorebecomesrubyllmand ActiveAgent looks for a missing file.Why fix it
Using the RubyLLM provider requires the
ruby_llmgem, and that gem's Rails railtie registers the acronym. Real apps needservice: "RubyLLM"to load.How we fixed it
Added
lib/active_agent/providers/rubyllm_provider.rbas a one-line alias ofruby_llm_provider.rb, matchingopenai_provider.rb.Test Plan
ruby_llmcan load an agent class that callsgenerate_with :ruby_llmwithservice: "RubyLLM"generate_with :ruby_llmstill loadsruby_llm_provider.rbwhen the ruby_llm railtie has not runfixes #371