Skip to content

fix(live): history_config rejection on Vertex/Enterprise Live sessions#6035

Open
allen-stephen wants to merge 3 commits into
google:mainfrom
allen-stephen:fix/live-history-config-bug
Open

fix(live): history_config rejection on Vertex/Enterprise Live sessions#6035
allen-stephen wants to merge 3 commits into
google:mainfrom
allen-stephen:fix/live-history-config-bug

Conversation

@allen-stephen

Copy link
Copy Markdown
Contributor

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

Problem:
On the Vertex AI / Gemini Enterprise Agent Platform backend, ADK auto-injects history_config into the Live setup message when seeding conversation history. That backend has no history_config field and rejects it with ValueError: history_config parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode

Solution:
Gate the history_config auto-injection to the Gemini Developer API backend only (isinstance(llm, Gemini) and llm._api_backend == GoogleLLMVariant.GEMINI_API). On Vertex, history is already seeded via the sanctioned send_history (send_client_content) path.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

$ pytest tests/unittests/flows/llm_flows/test_base_llm_flow.py -k history_config
2 passed, 35 deselected, 4 warnings in 0.78s

Manual End-to-End (E2E) Tests:

Verified intended functionality in ADK web.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

N/A

@adk-bot

adk-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

I have completed the read-only triage and architectural analysis of Pull Request #6035.

The Google CLA signature is verified successfully, and all background tests run clean. I have generated a premium, detailed analysis of the changes, their justification, and alignment with ADK's design patterns.

Please find the complete review here:
👉 analysis_results.md

Key Highlights & Recommendation:

  • The Bug: ADK was auto-injecting history_config during Live setup initialization on Vertex AI / Gemini Enterprise Agent Platform. However, this backend doesn’t recognize that configuration field and rejected the setup message completely with a ValueError.
  • The Fix: Successfully limits history_config generation strictly to the Gemini Developer API backend (base_llm_flow.py). History configuration on Vertex continues to seamlessly flow through the standard send_history routing.
  • Testing quality: High quality behavioral tests have been added to verify that history initialization remains skipped on the Vertex backend while operating flawlessly on the Gemini Developer API backend.
  • Recommendation: Approve (excellent, robust, and style guidelines-compliant fix).

@rohityan rohityan self-assigned this Jun 9, 2026
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.

3 participants