Skip to content

fix: Support generalized history config injection for Gemini 3.1 Live on Vertex AI#5999

Open
wukath wants to merge 1 commit into
v1from
fix-v1-history-config
Open

fix: Support generalized history config injection for Gemini 3.1 Live on Vertex AI#5999
wukath wants to merge 1 commit into
v1from
fix-v1-history-config

Conversation

@wukath
Copy link
Copy Markdown
Collaborator

@wukath wukath commented Jun 7, 2026

  • Exposed history_config in RunConfig.
  • Mapped history_config to LLM live connect request configuration.
  • Generalized history connection logic to automatically inject initial_history_in_client_content = True when seeding history on a fresh connection for both Gemini API and Vertex AI backends.
  • Updated and added comprehensive unit tests to verify history configuration behaviour.

Cherry-pick of commit 61a3933 to the v1 branch.

… on Vertex AI

- Exposed history_config in RunConfig.
- Mapped history_config to LLM live connect request configuration.
- Generalized history connection logic to automatically inject `initial_history_in_client_content = True` when seeding history on a fresh connection for both Gemini API and Vertex AI backends.
- Updated and added comprehensive unit tests to verify history configuration behaviour.

TAG=agy
CONV=822f8c76-9099-4f01-a2b8-10a7de0d61a2

Change-Id: Ib532626d5d7d887b17664567aed94ba09ad90b33
@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label Jun 7, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Jun 7, 2026

Response from ADK Triaging Agent

Hello @wukath, thank you for creating this PR!

This PR looks like a great fix for Gemini 3.1 Live on Vertex AI. To help us review this PR more efficiently and ensure it follows our contribution guidelines, could you please provide the following:

  • Testing Plan: Please include a testing plan section in your PR description detailing how these changes were verified.
  • Logs or Screenshots: As this is a bug fix, providing console logs or screenshots showing the fix in action would be extremely helpful for the reviewers.

This information will help speed up the review process. Thank you for your contribution!

@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Jun 7, 2026

I will read the instructions for the adk-pr-analyze skill to understand the workflow and requirements for analyzing this pull request.I will now execute the Contributor License Agreement (CLA) verification script for PR #5999 as the mandatory first step. This script will fetch the PR metadata and check whether the author has signed the CLA.I will use the custom fetch_github_pr tool to retrieve the pull request details directly, as this tool is specifically designed to bypass network policy restrictions safely.I will correct the arguments and use the fetch_github_pr tool with only the pr_number parameter to retrieve the PR metadata.I will use the view_file tool to inspect the implementation of triage_pr.py so that we can understand how CLA verification is performed and ensure absolute compliance with the gating requirements.I will execute gh pr view 5999 using the allowed gh command structure to fetch the PR's complete status rollup and verify the contributor's CLA signature.I will execute the gh pr diff command to retrieve the complete line-by-line diff of the PR. This will allow me to identify exactly what modifications were made to the codebase.I will view the contents of src/google/adk/agents/run_config.py around line 247 to understand how and where history_config was injected into the baseline.I will view the top of src/google/adk/agents/run_config.py to confirm style compliance, including license headers and __future__ annotations imports.I will check src/google/adk/flows/llm_flows/base_llm_flow.py around lines 520 to 570 to verify its baseline and surroundings.I will view lines 570 to 600 of src/google/adk/flows/llm_flows/base_llm_flow.py to get the full logic of the history configuration injection.I will view the basic.py file to understand how RunConfig.history_config is mapped to the final request configuration object.I will view earlier lines in basic.py to confirm that live_connect_config is safely initialized before we access it.I will check the first 50 lines of basic.py to confirm how llm_request is instantiated.I will perform a search for the definition of LlmRequest to verify how live_connect_config is initialized within that class.I will inspect src/google/adk/models/llm_request.py at the class definition of LlmRequest to see if live_connect_config is always initialized by default.I will check tests/unittests/flows/llm_flows/test_base_llm_flow.py around the updated/added test methods to make sure they follow style and testing principles.I will view the rest of the unit test file to ensure we see the full coverage added.I will now generate the premium PR Analysis Report and save it as an artifact in the designated artifact directory. This report provides a detailed breakdown of the change's impact, codebase verification, alternative designs, style compliance check, and test verification.I have completed a thorough, read-only analysis of Pull Request #5999 in accordance with the established ADK standards, architecture specifications, and security policies.

The Contributor License Agreement (CLA) signature for author @wukath was successfully verified as signed (SUCCESS), allowing the analysis of this PR's diff to proceed safely.

I have generated a premium PR Analysis Report detailing my findings, codebase verification, and structural evaluation.

📄 PR Analysis Report Location

You can inspect the complete analysis and architectural compliance checklist here:

  • pr_analysis_report.md

🔑 Key Takeaways & Recommendations

  • Core Value: Valuable Feature. This cleanly decouples live history config injection from specific backends and model names, allowing developers using Gemini 3.1 Live on Vertex AI to benefit from automated duplicate-generation protections.
  • Architecture Alignment: Pass with Nits. The code demonstrates excellent safety checking, robust test coverage via parameterized tests, and clean preservation of user configurations.
  • Styling Nit: For new parameters like history_config in RunConfig, modern pipe unions are preferred (types.HistoryConfig | None = None over Optional[types.HistoryConfig]).
  • Final Recommendation: Approve. The changes are fully backwards-compatible, ready for integration, and highly valuable.

Summary of Work Done

  1. Verified CLA compliance for PR fix: Support generalized history config injection for Gemini 3.1 Live on Vertex AI #5999 via remote GitHub metadata checks.
  2. Retrieved and parsed the full line-by-line diff for all impacted files.
  3. Verified baseline code state in the active workspace on run_config.py, base_llm_flow.py, basic.py, and the corresponding test modules.
  4. Compiled a structured PR Analysis Report highlighting impact, architectural validation, styling, and testing robustness, stored in the artifacts

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

Labels

live [Component] This issue is related to live, voice and video chat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants