feat(cli): comprehensive alignment of server and run commands#5440
Open
EaCognitive wants to merge 2 commits intogoogle:mainfrom
Open
feat(cli): comprehensive alignment of server and run commands#5440EaCognitive wants to merge 2 commits intogoogle:mainfrom
EaCognitive wants to merge 2 commits intogoogle:mainfrom
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.
Fixes #5434
Fixes #5435
Problem
Several critical parameters in the ADK SDK's
RunConfig(specificallymax_llm_callsandavatar_config) are currently not exposed via the CLI in theadk run,adk web, oradk api_servercommands. This creates an inconsistency between the SDK's capabilities and the CLI's interface, limiting developers' ability to control costs and customize agent appearance.Solution
This PR provides a comprehensive alignment of the ADK CLI with the underlying SDK:
--max_llm_callsflag to limit the total number of LLM calls per run.--avatar_configflag (supporting JSON strings or file paths) to configure AI avatars.adk run,adk web, andadk api_server.Changes
src/google/adk/cli/cli_tools_click.py: Added new flags to the common options decorator and updated all relevant command arguments.src/google/adk/cli/cli.py: Updated the CLI runner to parse and pass these parameters to the agent.src/google/adk/cli/fast_api.py: Updated the FastAPI application factory to support the new configurations.src/google/adk/cli/adk_web_server.py: Integrated the parameters into the web server logic and allRunConfiginstantiations.Verification
avatar_configcorrectly handles both inline JSON and file paths.max_llm_callsis correctly enforced in theRunner.