Repository navigation
fix(google): retry stalled Gemini first response - #79668
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. The linked issue and PR body give a concrete direct Google Gemini 3 main-session high-thinking/coding-tools path with timeout logs and live before/after output, while source inspection confirms current main lacks the retry and direct Google schema hook; I did not independently run live credentials in this read-only review. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the provider-owned retry and shared Gemini tool-schema hook after required code checks and maintainer review, then let the linked issue at #78502 close through the merge. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue and PR body give a concrete direct Google Gemini 3 main-session high-thinking/coding-tools path with timeout logs and live before/after output, while source inspection confirms current main lacks the retry and direct Google schema hook; I did not independently run live credentials in this read-only review. Is this the best way to solve the issue? Yes. The PR keeps the change in the Google plugin transport, limits retry behavior to direct official Gemini 3 no-first-response streams, preserves the existing payload content/tools, and adds focused tests for the recovery path and shared hook wiring. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5fdef4c39e75. |
d2ed3f1 to
b29e120
Compare
b29e120 to
9f3f153
Compare
* fix(google): retry stalled gemini first response * docs(changelog): note gemini first-response retry * fix(google): clear gemini first-response deadline
* fix(google): retry stalled gemini first response * docs(changelog): note gemini first-response retry * fix(google): clear gemini first-response deadline
* fix(google): retry stalled gemini first response * docs(changelog): note gemini first-response retry * fix(google): clear gemini first-response deadline
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
node dist/entry.js agent --local --session-id <case> --message "Reply exactly <marker> and nothing else." --model <google model> --thinking high --timeout 240 --jsonwithtools.profile: "coding"and directgoogle-generative-aiprovider config.session.endedsuccess withidleTimedOut:false.LLM idle timeouton the main-session direct Google path for Gemini 3.1 Pro / Gemini 3 Flash with coding tools.Live results on the current fix branch:
Live results with the same code patch applied to
v2026.5.7:Root Cause (if applicable)
Regression Test Plan (if applicable)
extensions/google/transport-stream.test.ts,extensions/google/index.test.ts, plus liveopenclaw agent --localvalidation.User-visible / Behavior Changes
Direct Google Gemini 3 preview main-session calls that stall before the first response now retry once with a lean first-response payload instead of waiting for the outer idle timeout.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation: A retry may make one additional request to the same official Google Generative AI endpoint for Gemini 3 Pro/Flash only after no first response. It preserves the same auth and request content, and is not enabled for Vertex or custom base URLs.Repro + Verification
Environment
google/gemini-3.1-pro-preview,google/gemini-3-flash-preview,google/gemini-2.5-proopenclaw agent --localmain session, isolated state/config/workspace/trajectory dirsapi: "google-generative-ai", officialhttps://generativelanguage.googleapis.com/v1beta,tools.profile: "coding", high thinkingSteps
node dist/entry.js agent --local ... --model google/gemini-3.1-pro-preview --thinking high --json.google/gemini-3-flash-preview.session.endedevents.Expected
Actual
v2026.5.7worktree.Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
v2026.5.7; Gemini 2.5 Pro control.Review Conversations
Compatibility / Migration
OPENCLAW_GOOGLE_GEMINI_FIRST_RESPONSE_RETRY_MScan override the default 45s first-response retry deadline.Risks and Mitigations