Skip to content

Fix MCP server reporting wrong model for ADK agents (#56)#57

Merged
richardkiene merged 1 commit into
mainfrom
fix/agent-model-in-reports
Jan 23, 2026
Merged

Fix MCP server reporting wrong model for ADK agents (#56)#57
richardkiene merged 1 commit into
mainfrom
fix/agent-model-in-reports

Conversation

@richardkiene
Copy link
Copy Markdown
Contributor

Problem

When running scenarios via the MCP server, the test results incorrectly showed the judge's LLM model as the agent's model instead of the actual ADK agent's model.

Root Cause

In server.py, the _build_test_result function was receiving only the judge's model and using it for all three components:

config=(agent_config.type, judge_config.model),  # BUG: using judge's model for agent

Solution

  1. Capture agent.get_model_name() before closing the agent
  2. Update _build_test_result to accept separate models for judge, synthetic_user, and agent
  3. Extract config resolution into _resolve_scenario_configs helper to stay within statement limits

Test plan

  • All 255 unit tests pass
  • Ruff linting passes
  • Mypy type checking passes

Closes #56

The server was using the judge's LLM model for the agent_model field
instead of querying the actual agent. This caused reports to show
all three components (judge, synthetic_user, agent) with the same
model even when ADK agents use different models.

Changes:
- Capture agent.get_model_name() before closing the agent
- Pass separate models for judge, synthetic_user, and agent
- Extract config resolution into _resolve_scenario_configs helper
  to keep run_scenario within statement limit
@richardkiene richardkiene merged commit b3f3344 into main Jan 23, 2026
3 checks passed
@richardkiene richardkiene deleted the fix/agent-model-in-reports branch January 23, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP server reports wrong agent model for ADK agents

1 participant