Support Gemini 4 Carbon (`gemini-4-carbon`) on `GoogleModel`
This pull request was posted by Claude Code using claude-opus-5-5 on behalf of David.
Why we make these changes
Google released Gemini 4 Carbon (gemini-4-carbon) on 2026-11-10: its strongest reasoning model, at Argon's per-token price. Google keeps Argon as the faster model for most work ("Keep Argon where speed matters"), so Carbon is listed alongside Argon, not in its place.
Carbon supports only the low, medium and high thinking levels. Without a profile entry, thinking=False and 'minimal' send MINIMAL, which Google documents as unsupported on Gemini 4 models.
There is no issue for this. Mirrors #10202 (Gemini 4 Argon).
New public surface
'gemini-4-carbon'inLatestGoogleModelNamesandKnownModelName(google:,google-cloud:,gateway/google:,gateway/google-cloud:).
User-visible behavior
agent = Agent('google:gemini-4-carbon', model_settings={'thinking': False})
# before: sends thinkingLevel MINIMAL, which Google lists as unsupported on Gemini 4 (Argon answers 400)
# after: sends thinkingLevel LOW, as on gemini-4-argon; thinking='minimal' does the same
- Docs:
docs/models/google.mdnames Carbon in the thinking and long decode sections. Thegoogle:large/google:xlargerow indocs/model_aliases/AGENTS.mdgives Argon's price-based placement and says to repoint to Carbon oncegenai-pricesprices it. add-new-modelskill: Gemini 4 element names count as lines, and a thinking entry may come from Google's tables when neither API can be probed.
Verification
tests/profiles/test_google.py: Carbon rows intest_model_profile_supports_minimal_thinking_levelandtest_model_profile_thinking_levels.tests/test_capability_spec.pysnapshot rows.tests/models/test_model_names.py,tests/test_docs_model_aliases.py, the docs parity tests and the affectedtests/test_examples.pypages pass locally.GET v1beta/models/gemini-4-carbonon the Gemini API lists the model (displayName: Gemini 4 Carbon,thinking: true).- Not probed live: Carbon has no free tier, and the only key available returns 429
limit: 0. The level set comes from the Gemini API thinking table and the Vertex thinking table, which agree. - Long decode: Google's long decode page names
gemini-4-carbonandgemini-4-argon, and its thinking page caps one request of either at 32,768 output tokens non-streamed and 65,536 streamed. Not run live on Carbon. - Google Cloud (Vertex) and Pydantic AI Gateway: not attempted. #13058 tracks checking both live, plus OpenRouter once it lists Carbon.
What changes for existing users
Nothing.
Deliberately out of scope
GoogleInteractionsModel(#12636): Carbon support follows once it merges.- OpenRouter's mandatory-reasoning list: OpenRouter does not list
google/gemini-4-carbonyet. - Pricing:
genai-prices(bundled 0.1.13 and the live feed) has no Carbon entry yet, soModelResponse.cost()raisesLookupErrorfor Carbon until its automation imports one. - Docs aliases:
google:largeandgoogle:xlargestay on Argon, since the placement rules read prices fromgenai-prices. #13058 tracks repointing them. - The Google Cloud locations note in the long decode section stays Argon-only until Carbon is checked on Vertex.
PR decisions
2026-11-10 · Interactions API out of scope
- Decision: Add the id on
GoogleModel(generateContent) only;GoogleInteractionsModelsupport follows after #12636 merges - Why: David: the Interactions API isn't needed for this; support there comes after it merges
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Per-id thinking entries, not a gemini-4 prefix
- Decision: One
_MODEL_THINKING_LEVELSentry per Gemini 4 id - Why: The table is keyed per family-version, Google's level sets vary within a generation, and the root
AGENTS.mdscopes a fix to the surfaces it covers - Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Vertex and Gateway verification is a follow-up
- Decision: Keep the
google-cloud:andgateway/ids (derived fromGoogleModelName); live Vertex and Gateway checks go to a follow-up issue - Why: David: no Vertex project is set up for this yet, and the Gateway check belongs with it;
UNSUPPORTED_GATEWAY_MODEL_NAMESneeds evidence the Gateway rejects an id - Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Carbon listed alongside Argon
- Decision: Keep
gemini-4-argonin the literals; addgemini-4-carbonas a separate line - Why: Google: "Keep Argon where speed matters", at the same price
- Source: https://ai.google.dev/gemini-api/docs/whats-new-gemini-4-carbon#migrate-from-gemini-4-argon
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · google:large/google:xlarge stay on Argon
- Decision: Keep both aliases on
gemini-4-argonuntilgenai-pricesprices Carbon; give Argon's row its price-based reason - Why:
docs/model_aliases/AGENTS.mdreads tier prices fromgenai-prices; moving early dropped thecostfrom the message history example - Source: https://github.com/pydantic/pydantic-ai/pull/13057#discussion_r4527484415
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Carbon thinking levels from docs
- Decision:
gemini-4-carbongetsLOW/MEDIUM/HIGHfrom Google's thinking tables, not a probe - Why: Carbon is not on the free tier; the available key gets 429
limit: 0 - Source: https://ai.google.dev/gemini-api/docs/thinking#thinking-levels
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Pre-push review 1 of 3 at 7a8d91e5d
- Decision: Two findings dismissed with evidence: Vertex's thinking table has a
Gemini 4 Carbon | LOW, MEDIUM, HIGH | MEDIUMrow, so the two tables agree - Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/thinking
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Pre-push review 2 of 3 at 10bdac5b5
- Decision: douwebot's two threads confirmed addressed; three wording findings dismissed with evidence (Google's pricing page lists Carbon at Argon's price; the Argon row states both its introductory and lasting price; Google's model page describes Carbon as a general-purpose reasoning model)
- Source: https://ai.google.dev/gemini-api/docs/pricing#gemini-4-carbon
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Penalties rejection left to #12426
- Decision: Do not gate
presence_penalty/frequency_penaltyfor the new id - Why: The Gemini API rejects penalties for every model, not only Gemini 4; open PR #12426 drops them for all
- Source: https://github.com/pydantic/pydantic-ai/pull/12426
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
2026-11-10 · Exempt delta f317ebfe7 (chains from reviewed 10bdac5b5)
- Decision: Comment-only change to the
gemini-4-carbonprofile comment; no pre-push review - Why: Exempt row "Comments or docstrings only, no
docs/**page" - Source: https://github.com/pydantic/pydantic-ai/pull/13057#discussion_r4527583942
- Session: d4f40277-53c9-4e44-ba50-af7e5b77afe1
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.