fix(samples): use configurable model name to resolve 404 errors in triaging agents#5697
Open
kedar49 wants to merge 1 commit into
Open
fix(samples): use configurable model name to resolve 404 errors in triaging agents#5697kedar49 wants to merge 1 commit into
kedar49 wants to merge 1 commit into
Conversation
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.
Link to Issue or Description of Change
Problem:
Several sample agents (adk_triaging_agent, adk_pr_triaging_agent, adk_answering_agent, and adk_issue_formatting_agent) had the model name gemini-2.5-pro hardcoded. When run via the Gemini Developer API (v1beta), this caused a 404 NOT_FOUND error as the model was not found or supported for generateContent in that specific environment.
Solution:
Removed the hardcoded model strings and introduced a configurable LLM_MODEL_NAME variable in the settings.py of each affected agent. The default value is set to gemini-2.5-flash, which is verified to work with the Gemini Developer API. This change allows users to easily override the model via environment variables without modifying the source code.
Testing Plan
Unit Tests:
pytest tests/unittests was executed and all tests passed.
Manual End-to-End (E2E) Tests:
To verify the fix:
Checklist
Additional context
This fix addresses a regression observed around 2026-05-08 where triaging workflows started failing consistently. Moving the model name to settings.py aligns these samples with other working agents in the repository (e.g., adk_issue_monitoring_agent).