feat(cli): add --max_llm_calls and --avatar_config flags to web and api_server#5436
Closed
EaCognitive wants to merge 2 commits intogoogle:mainfrom
Closed
feat(cli): add --max_llm_calls and --avatar_config flags to web and api_server#5436EaCognitive wants to merge 2 commits intogoogle:mainfrom
EaCognitive wants to merge 2 commits intogoogle:mainfrom
Conversation
Author
|
Resubmitting as part of a comprehensive CLI update PR to trigger a fresh CLA check. |
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.
Fixes #5435
Fixes #5434
Problem
Several key parameters in the ADK SDK's
RunConfig(max_llm_callsandavatar_config) are not currently exposed via the CLI in theadk run,adk web, oradk api_servercommands. This limits the ability of developers to control costs and customize the visual appearance of agents across all interaction modes.Solution
This PR adds both
--max_llm_callsand--avatar_configflags to the common FastAPI options decorator and ensures they are correctly passed to the CLI runner.Changes
src/google/adk/cli/cli_tools_click.py: Added the new flags and updated all relevant command arguments (run,web,api_server).src/google/adk/cli/cli.py: Updatedrun_cliand its helpers to parse and pass the new parameters to theRunner.src/google/adk/cli/fast_api.py: Updatedget_fast_api_appto pass the new parameters.src/google/adk/cli/adk_web_server.py: Integrated parameters intoAdkWebServerand allRunConfiginstantiations.Verification
avatar_configcorrectly handles both inline JSON and file paths.