Skip to content

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
EaCognitive:feat-cli-avatar-config
Closed

feat(cli): add --max_llm_calls and --avatar_config flags to web and api_server#5436
EaCognitive wants to merge 2 commits intogoogle:mainfrom
EaCognitive:feat-cli-avatar-config

Conversation

@EaCognitive
Copy link
Copy Markdown

@EaCognitive EaCognitive commented Apr 21, 2026

Fixes #5435
Fixes #5434

Problem

Several key parameters in the ADK SDK's RunConfig (max_llm_calls and avatar_config) are not currently exposed via the CLI in the adk run, adk web, or adk api_server commands. 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_calls and --avatar_config flags 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: Updated run_cli and its helpers to parse and pass the new parameters to the Runner.
  • src/google/adk/cli/fast_api.py: Updated get_fast_api_app to pass the new parameters.
  • src/google/adk/cli/adk_web_server.py: Integrated parameters into AdkWebServer and all RunConfig instantiations.

Verification

  • Verified flags appear in help text for all three commands.
  • Verified avatar_config correctly handles both inline JSON and file paths.

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Apr 21, 2026
@EaCognitive
Copy link
Copy Markdown
Author

Resubmitting as part of a comprehensive CLI update PR to trigger a fresh CLA check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Add --avatar_config flag to server commands [CLI] Add --max_llm_calls flag to web and api_server

2 participants