Repository navigation
fix: send litellm the gemini provider name when a Bot is set to Google - #1354
Open
pcbeingused333 wants to merge 2 commits into
Open
pcbeingused333 wants to merge 2 commits into
pcbeingused333 wants to merge 2 commits into
Conversation
The CrewAI, Agno, LlamaIndex, ADK, Strands and Langroid Bots address their model to litellm as provider/model, passing OpenBot's provider id through unchanged. For Google that is google/<model>, which litellm does not recognise (BadRequestError: LLM Provider NOT provided); its name for Google AI Studio is gemini. Translate that one name in a shared helper. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pcbeingused333
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 9, 2026 10:09
…mini # Conflicts: # CHANGELOG.md
This branch has not been deployed
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.
What this changes
The CrewAI, Agno, LlamaIndex, ADK, Strands and Langroid Bots hand litellm a model as
provider/model, withproviderbeing OpenBot's own id. For Google that isgoogle/gemini-2.5-flash, and litellm has nogoogleprovider (litellm.get_llm_providerraisesBadRequestError: LLM Provider NOT provided); its name for Google AI Studio isgemini. So a Bot set to Google failed every model call.gemini/...resolves, and litellm readsGOOGLE_API_KEYfor it, which is the variable Compose already passes.shared/model_providers.pygainslitellm_model_id(provider, model), which translates that one name and passes every other provider through as typed. The six_model_id()/_model()functions use it (Langroid keeps itslitellm/prefix in front).Where it runs
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
In
python:3.12,pytest tests -k modelin each Bot directory:googlerow)ADK, LlamaIndex and Langroid use the same helper but have no model-id test of their own; their full suites pass with this change (31, 11 and 14 passed).
With each of those three Bots'
requirements.txtinstalled and onlyGOOGLE_API_KEYset,litellm.get_llm_providerraises ongoogle/gemini-2.5-flashand resolvesgemini/gemini-2.5-flash, andlitellm.completionon the latter builds agenerativelanguage.googleapis.comrequest carrying that key inx-goog-api-key. The HTTP call was stubbed: no request reached Gemini.This change was prepared with the assistance of an AI coding agent (Claude Code).