Skip to content

fix(google): allow opting out of the direct Gemini -tiered wire rename - #1771

Closed
chilung-cgu wants to merge 2 commits into
lidge-jun:devfrom
chilung-cgu:codex/google-gemini-rename-opt-out
Closed

fix(google): allow opting out of the direct Gemini -tiered wire rename#1771
chilung-cgu wants to merge 2 commits into
lidge-jun:devfrom
chilung-cgu:codex/google-gemini-rename-opt-out

Conversation

@chilung-cgu

@chilung-cgu chilung-cgu commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Google's Generative Language API renamed current Gemini Flash generations on the wire with a -tiered suffix (gemini-3.7-flash -> gemini-3.7-flash-tiered, gemini-3.6-flash -> gemini-3.6-flash-tiered), and opencodex applies that rename by default in the AI Studio (direct) path. Some AI Studio deployments/keys still serve the bare ids and return 404 NOT_FOUND (models/gemini-3.7-flash-tiered is not found for API version v1beta) for every renamed request.

This PR adds a per-provider opt-out: directGeminiWireRenames: false keeps the picker-visible id stable while sending the bare id on the wire. Default behavior (rename applied) is unchanged; Vertex requests are unaffected.

Verification

  • bun run typecheck passes.
  • bun test tests/google-adapter.test.ts tests/config.test.ts passes (159 tests, including new coverage for the opt-out round-trip and the Vertex exclusion).
  • Live check against generativelanguage.googleapis.com/v1beta/models confirmed the affected account serves bare ids only; with the opt-out set, the request reaches models/gemini-3.7-flash:generateContent and succeeds.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (providers.md documents the new setting).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Keep the existing -tiered mapping by default while allowing AI Studio providers that still serve bare Gemini Flash ids to opt out. Cover both Flash generations and document the provider setting.
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c4803e09-d484-4aee-ae1d-f0472e6602dd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@chilung-cgu

Copy link
Copy Markdown
Contributor Author

Duplicate of #1739 (same fix: directGeminiWireRenames opt-out, cherry-picked onto latest dev). Keeping #1739; closing this one to avoid double review. Reopen if preferred.

@chilung-cgu
chilung-cgu deleted the codex/google-gemini-rename-opt-out branch August 15, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant