feat(models): add Google Gemini provider + latest Gemini models (3.6 Flash, 3.5 Flash-Lite)#367
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
googleprovider's catalog in thecodex-known-provider-modelscrate (FALLBACK_MODELS,metadata, andreasoning_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 viaGEMINI_API_KEY, registered inBUILT_IN_MODEL_PROVIDER_SPECS.known-provider-models:google.rsalready carriedgemini-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)
gemini-3.6-flashgemini-3.5-flash-liteSources:
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-flashremains 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 incodex-coreandcodex-app-servergreen. Promotinggemini-3.6-flashto default can be a deliberate follow-up.How to auth
Set
GEMINI_API_KEYto a Google AI Studio Gemini API key, then select thegoogleprovider and a Gemini model.Verification (Blacksmith)
Built + tested on Blacksmith (16 vCPU):
codex-known-provider-models(incl. newgoogle_fallback_models_expose_latest_gemini_modelstest),codex-model-provider-info,codex-models-manager,codex-login, andcodex-core(default-model regression tests).cargo fmtclean; 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,
thinkingConfigbudgets) beyond what the OpenAI-compat surface expresses.