fix(live): history_config rejection on Vertex/Enterprise Live sessions#6035
fix(live): history_config rejection on Vertex/Enterprise Live sessions#6035allen-stephen wants to merge 3 commits into
Conversation
|
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: Key Highlights & Recommendation:
|
|
Hi @allen-stephen, Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
|
Hi @GWeale , can you please review this. |
|
thanks for opening this PR! We are aware of the issue, and live API team is getting this addressed soon by adding support for history_config in Vertex AI. It should be available in the next day or so |
Merge #6035 **Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) 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:** - [X] I have added or updated unit tests for my change. - [X] 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 - [X] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [X] I have performed a self-review of my own code. - [X] I have commented my code, particularly in hard-to-understand areas. - [X] I have added tests that prove my fix is effective or that my feature works. - [X] New and existing unit tests pass locally with my changes. - [X] I have manually tested my changes end-to-end. - [X] Any dependent changes have been merged and published in downstream modules. ### Additional context N/A COPYBARA_INTEGRATE_REVIEW=#6035 from allen-stephen:fix/live-history-config-bug cf8e1fc PiperOrigin-RevId: 933402607
|
Thank you @allen-stephen for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 8f85260. Closing this PR as the changes are now in the main branch. |
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_configinto the Live setup message when seeding conversation history. That backend has nohistory_configfield and rejects it withValueError: history_config parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform modeSolution:
Gate the history_config auto-injection to the Gemini Developer API backend only (
isinstance(llm, Gemini)andllm._api_backend == GoogleLLMVariant.GEMINI_API). On Vertex, history is already seeded via the sanctionedsend_history(send_client_content) path.Testing Plan
Unit Tests:
$ 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
Additional context
N/A