Gemini thinking_config Not Supported on Model
You passed thinking_config to a model that doesn't support it. Only Gemini 2.5 series supports thinking (Pro always-on, Flash configurable, Flash-Lite configurable). Legacy 2.0 Flash, 1.5 Pro/Flash, and the experimental 2.0-flash-thinking-exp preview all reject it. Fix by detecting model support before passing config, or migrating to 2.5.
Check model name before adding thinking_config. Only gemini-2.5-* models accept it. For older models (gemini-2.0-flash, gemini-1.5-pro), omit the field entirely. Best practice: use a helper that strips thinking_config when the target model is not 2.5 series.
The Error Messages You're Seeing
HTTP/1.1 400 Bad Request
{
"error": {
"code": 400,
"message": "Field 'generation_config.thinking_config' is
not supported for model 'gemini-2.0-flash'.",
"status": "INVALID_ARGUMENT"
}
}
Variants:
"thinking_budget field only available on Gemini 2.5 models"
"include_thoughts not supported on this model version"
"Model 'gemini-2.0-flash-thinking-exp' has been deprecated.
Use gemini-2.5-flash instead."
"Unknown field: thinking_config"Thinking Support Matrix
| Model | thinking_config? | Migration path |
|---|---|---|
| gemini-2.5-pro | Yes (always on) | Already supported |
| gemini-2.5-flash | Yes (configurable) | Already supported |
| gemini-2.5-flash-lite | Yes (opt-in) | Already supported |
| gemini-2.0-flash | No | Move to 2.5-flash |
| gemini-2.0-flash-lite | No | Move to 2.5-flash-lite |
| gemini-2.0-flash-thinking-exp | Preview (deprecated) | Move to 2.5-flash |
| gemini-1.5-pro | No | Move to 2.5-pro |
| gemini-1.5-flash | No | Move to 2.5-flash |
What Actually Causes This Error
Fixes That Work (Tested Nov 2026)
1Detect Model Capability Before Config
2Strip Unsupported Fields Automatically
gemini-2.0-flash-thinking-exp was Google's preview of thinking on 2.0 Flash. It's deprecated. Migrate to gemini-2.5-flash, which has stable production thinking support and better performance.
3Migration Path from 1.5 / 2.0 to 2.5
Preventing This Error Going Forward
- Build config dynamically per model, not statically shared.
- Maintain model feature matrix in one place. Single source of truth.
- Use prefix-match for versioned model IDs. Match
gemini-2.5-pro-002too. - Prefer 2.5 series for new code. Wider feature support, better quality.
- Watch deprecation notices in Vertex AI release notes.
- Never mix model gens without config-per-model logic.
Researcher · AI Error Hub
Frequently Asked Questions
Not natively — 2.0 Flash doesn't have the reasoning mode. Best you can do is prompt engineering ("Think step by step, then answer.") which is different from the model-native reasoning tokens in 2.5.
API-compatible yes; behavior differs — 2.5 has thinking on by default (dynamic), slightly higher latency, better quality. Set thinking_budget=0 on 2.5-flash to match 2.0-flash latency profile.
Currently maintained but not receiving new features. Google typically deprecates prior gen ~12 months after next-gen GA. Plan migration before deprecation notice; upgrade paths get tighter as dates approach.
Experimental IDs come and go. Don't rely on them in production. If you must use one, wrap in try/except and have a stable 2.5 fallback. Check Vertex AI/AI Studio docs monthly for status.
For the "thinking_config not supported" error, yes. There may be other model-specific field restrictions (e.g., some parameters differ between Pro and Flash-Lite). Reference the feature matrix in this article.
Related Errors
Gemini Model Migration Playbook
Weekly deep dives on model versions, thinking budgets, and multi-gen deployments. 12,000+ developers subscribe.
Subscribe Free →