fix: default thinking config for Gemini 3+ Flash models#4067
Merged
kompfner merged 2 commits intoApr 10, 2026
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
kompfner
reviewed
Apr 10, 2026
| model = self._settings.model | ||
| if model.startswith("gemini-2.5-flash"): | ||
| generation_params["thinking_config"] = {"thinking_budget": 0} | ||
| elif model.startswith("gemini-3") and "flash" in model: |
Contributor
There was a problem hiding this comment.
Technically this more general check (as opposed to explicitly checking for the string "gemini-3-flash") would cause use to set this thinking config unnecessarily in "gemini-3.1-flash-lite" (where minimal thinking is default), but I think it's absolutely worth it for future-proofing. So, good call 👍.
kompfner
approved these changes
Apr 10, 2026
Contributor
kompfner
left a comment
There was a problem hiding this comment.
Thanks! Nice improvement.
markbackman
pushed a commit
to pipecat-ai/docs
that referenced
this pull request
Apr 14, 2026
Updates documentation to reflect that GoogleLLMService now applies a low-latency thinking default (thinking_level="minimal") for Gemini 3+ Flash models, while Gemini 2.5 Flash continues to use thinking_budget=0. Related to pipecat-ai/pipecat#4067
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please describe the changes in your PR. If it is addressing an issue, please reference that as well.
Fixes #3993
Gemini 2.5 Flash gets a default
thinking_budget=0for low latency, but Gemini 3+ Flash uses a different API surface (thinking_level) & was getting no default at all, falling back to provider defaults.Now Gemini 3.x Flash models get
thinking_level="minimal"automatically when no explicit thinking config is provided.