fix(browser): update Gemini web protocol and fallback handling - #383
fix(browser): update Gemini web protocol and fallback handling#383mpeter wants to merge 3 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 4:06 AM ET / 08:06 UTC. ClawSweeper reviewWhat this changesThis PR refreshes Oracle’s cookie-based Gemini web request format and model headers, adds clear response failures and an opt-out from Flash-Lite fallback, and persists that option across restarts. Merge readinessThe central Gemini web repair is not on current main, and the supplied exact-head live evidence is sufficient for the Flash and Pro text paths. The PR has no definite introduced correctness finding, but GitHub reports it as dirty against current main, so it needs a clean rebase and refreshed merge review before landing. Priority: P1 Review scores
Verification
How this fits togetherOracle’s browser engine can send signed-in, cookie-based requests directly to Gemini’s web service. CLI options and saved session settings configure the request builder, whose parsed response becomes the CLI answer or a clear error. flowchart LR
A[CLI options] --> B[Saved session settings]
B --> C[Gemini request builder]
C --> D[Gemini web service]
D --> E[Response validation]
E --> F[CLI answer or error]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the protocol refresh cleanly onto current main, retain the default Flash-Lite fallback with the explicit opt-out, and rerun the focused Flash and Pro live Gemini checks on the rebased head. Do we have a high-confidence way to reproduce the issue? No: a high-confidence current-main failing run was not established. The supplied evidence demonstrates successful after-fix runs on the reviewed head, while current main retains the older request shape. Is this the best way to solve the issue? Unclear: the exact-head source and live traces support the approach, but the dirty merge state prevents confirming the final integrated request behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bbc1b3b0261d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Summary
StreamGeneraterequests to the current 97-field payload and extension headers--no-gemini-fallbackfor fail-closed callersVerification
pnpm run lintpnpm test— 1,764 passed, 43 skippedpnpm run buildoxfmt --checkfor all changed implementation, test, and documentation filesLive Gemini web proof (redacted)
Run against reviewed head
0be49e51c3a6ae8f4aa694c77f5ba2e083d2e732, 2026-08-18, with a signed-in Chrome profile at gemini.google.com. Cookie values, headers, and local paths are redacted; request shape, model selection, and success signal are preserved.1. Automated live smoke (
ORACLE_LIVE_TEST=1 pnpm vitest run tests/live/gemini-web-live.test.ts -t "with Gemini 3\.5 Flash$|with Gemini 3\.1 Pro$"):2. CLI end-to-end run, Flash (
oracle --engine browser --model gemini-3.5-flash --prompt "Say OK." --wait --verbose):3. CLI end-to-end run, Pro (
oracle --engine browser --model gemini-3-pro --prompt "Say OK." --wait --verbose):Both runs used the updated
StreamGeneraterequest path from this branch (current main's compact payload was not exercised — Chrome would need a branch switch to compare), and both attribute the response to the requested model in the final summary line.Note: the
[browser] Model selection evidence: ... verified=nofield visible in raw logs is structural for Gemini web mode — it has no UI-picker verification step the way ChatGPT browser mode does, since it's a direct API call rather than clicking a picker. The actual evidence of correct model selection is thedesiredModelin the request config plus themodel[browser]tag on the final summary line, both shown above.