Client or integration
Codex App
Provider or upstream service
Google Gemini API / AI Studio
OpenCodex version
2.22.0
Endpoint or capability
/v1/responses → Gemini streamGenerateContent
Current behaviour
Selecting google/gemini-3.7-flash returns HTTP 404.
OpenCodex rewrites the valid model ID:
gemini-3.7-flash → gemini-3.7-flash-tiered
This mapping currently exists in src/adapters/google.ts:
const GEMINI_DIRECT_WIRE_RENAMES: Record<string, string> = {
"gemini-3.7-flash": "gemini-3.7-flash-tiered",
"gemini-3.6-flash": "gemini-3.6-flash-tiered",
};
The authenticated Gemini Models API confirms:
models/gemini-3.7-flash returns HTTP 200.
models/gemini-3.7-flash-tiered returns HTTP 404 with:
Model is not found: models/gemini-3.7-flash-tiered for api version v1beta
Consequently, requests routed through OpenCodex fail with http_404.
Expected behaviour
OpenCodex should send gemini-3.7-flash unchanged to the Gemini API, matching Google's documented model code and the model returned by models.list.
Minimal redacted request or reproduction
# Confirm the documented model exists
curl \
-H "x-goog-api-key: $GEMINI_API_KEY" \
https://generativelanguage.googleapis.com/v1beta/models/gemini-3.7-flash
# HTTP 200
# Confirm the OpenCodex-rewritten model does not exist
curl \
-H "x-goog-api-key: $GEMINI_API_KEY" \
https://generativelanguage.googleapis.com/v1beta/models/gemini-3.7-flash-tiered
# HTTP 404
# Reproduce through OpenCodex
codex exec \
--skip-git-repo-check \
-m google/gemini-3.7-flash \
"Reply only OK"
# HTTP 404 / http_404
Actual response or error
Model is not found: models/gemini-3.7-flash-tiered for api version v1beta
OpenCodex request history reports:
provider: google
model: gemini-3.7-flash
status: 404
errorCode: http_404
Upstream documentation
https://ai.google.dev/gemini-api/docs/models/gemini-3.7-flash
Suggested mapping or implementation notes
Remove the gemini-3.7-flash entry from GEMINI_DIRECT_WIRE_RENAMES, allowing the direct Gemini adapter to use the documented model ID unchanged.
A local test with that single mapping removed resolves the incorrect endpoint selection.
Additional context
- OS: macOS 15.7.7
- The API key is valid and can retrieve
models/gemini-3.7-flash.
- The same stale rewrite is present on the current
main branch.
- Existing provider-compatibility issues were searched; no duplicate was found.
Checks
Client or integration
Codex App
Provider or upstream service
Google Gemini API / AI Studio
OpenCodex version
2.22.0
Endpoint or capability
/v1/responses→ GeministreamGenerateContentCurrent behaviour
Selecting
google/gemini-3.7-flashreturns HTTP 404.OpenCodex rewrites the valid model ID:
gemini-3.7-flash→gemini-3.7-flash-tieredThis mapping currently exists in
src/adapters/google.ts:The authenticated Gemini Models API confirms:
models/gemini-3.7-flashreturns HTTP 200.models/gemini-3.7-flash-tieredreturns HTTP 404 with:Model is not found: models/gemini-3.7-flash-tiered for api version v1betaConsequently, requests routed through OpenCodex fail with
http_404.Expected behaviour
OpenCodex should send
gemini-3.7-flashunchanged to the Gemini API, matching Google's documented model code and the model returned bymodels.list.Minimal redacted request or reproduction
Actual response or error
Model is not found: models/gemini-3.7-flash-tiered for api version v1betaOpenCodex request history reports:
Upstream documentation
https://ai.google.dev/gemini-api/docs/models/gemini-3.7-flash
Suggested mapping or implementation notes
Remove the
gemini-3.7-flashentry fromGEMINI_DIRECT_WIRE_RENAMES, allowing the direct Gemini adapter to use the documented model ID unchanged.A local test with that single mapping removed resolves the incorrect endpoint selection.
Additional context
models/gemini-3.7-flash.mainbranch.Checks