Skip to content

feat(models): add Google Gemini provider + latest Gemini models (3.6 Flash, 3.5 Flash-Lite)#367

Merged
andrei-hasna merged 3 commits into
mainfrom
feat/models-add-google-gemini
Jul 22, 2026
Merged

feat(models): add Google Gemini provider + latest Gemini models (3.6 Flash, 3.5 Flash-Lite)#367
andrei-hasna merged 3 commits into
mainfrom
feat/models-add-google-gemini

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

What

Adds the latest Google Gemini models to Codewith's model catalog:

  • gemini-3.6-flash — Gemini 3.6 Flash (latest Flash flagship, released 2026-07-21)
  • gemini-3.5-flash-lite — Gemini 3.5 Flash-Lite (fast, low-cost 3.5 tier)

Both are added to the google provider's catalog in the codex-known-provider-models crate (FALLBACK_MODELS, metadata, and reasoning_levels).

Provider approach: OpenAI-compatible (already present)

A Google Gemini provider already exists in this fork and needed no changes:

  • codex-protocol::provider_identity: GOOGLE_PROVIDER_ID = "google", GOOGLE_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai"
  • model-provider-info: create_google_provider()WireApi::Chat (Gemini's OpenAI-compatible Chat Completions endpoint), API-key auth via GEMINI_API_KEY, registered in BUILT_IN_MODEL_PROVIDER_SPECS.
  • known-provider-models: google.rs already carried gemini-3.5-flash (default), gemini-3.1-pro-preview, gemini-3-flash-preview, gemini-3.1-flash-lite.

So this PR is purely a catalog top-up over the existing OpenAI-compat provider. No new wire adapter.

Models added (specs from Google's official docs)

Model id Display Context (input) Max output Thinking
gemini-3.6-flash Gemini 3.6 Flash 1,048,576 65,536 yes
gemini-3.5-flash-lite Gemini 3.5 Flash-Lite 1,048,576 65,536 yes

Sources:

The catalog metadata (KnownProviderModelMetadata) records context window (1,048,576), tool use, and reasoning/thinking support; it has no output-token field, so max-output is documented here for reference. Both models expose the standard Gemini reasoning-effort presets (Minimal/Low/Moderate/Extensive, default Moderate).

Default-model behavior

Added as non-default entries; gemini-3.5-flash remains the provider default. This mirrors how the Qwen 3.6 Flash rollout was handled in this repo (stable model stays default, newer models are opt-in) and keeps the existing default-model assertions in codex-core and codex-app-server green. Promoting gemini-3.6-flash to default can be a deliberate follow-up.

How to auth

Set GEMINI_API_KEY to a Google AI Studio Gemini API key, then select the google provider and a Gemini model.

Verification (Blacksmith)

Built + tested on Blacksmith (16 vCPU): codex-known-provider-models (incl. new google_fallback_models_expose_latest_gemini_models test), codex-model-provider-info, codex-models-manager, codex-login, and codex-core (default-model regression tests). cargo fmt clean; touched crate is trivial match-arm/array additions.

Deferred

A native Gemini wire adapter (parallel to the deferred native-Anthropic work) is out of scope. The OpenAI-compatible endpoint covers chat + tool calls + reasoning-effort for these models today. A native adapter would be needed to expose Gemini-specific request/response fields (e.g. thought signatures, thinkingConfig budgets) beyond what the OpenAI-compat surface expresses.

Add the latest Google Gemini models to the known-provider-models Google
catalog, served over Gemini's OpenAI-compatible endpoint via the existing
'google' provider (WireApi::Chat, GEMINI_API_KEY auth):

- gemini-3.6-flash (Gemini 3.6 Flash) - latest Flash flagship
- gemini-3.5-flash-lite (Gemini 3.5 Flash-Lite) - fast, low-cost 3.5 tier

Both advertise a 1,048,576-token context window, tool use, and thinking
(reasoning-effort presets). Added as non-default entries so gemini-3.5-flash
remains the provider default, mirroring the Qwen 3.6 Flash rollout.
@andrei-hasna
andrei-hasna merged commit b56bba5 into main Jul 22, 2026
25 of 27 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant