Skip to content

feat(gemini): add thinking_config to handled_keys support Gemini 2.0#326

Open
Eatosin wants to merge 2 commits intogoogle:mainfrom
Eatosin:feat/add-thinking-config
Open

feat(gemini): add thinking_config to handled_keys support Gemini 2.0#326
Eatosin wants to merge 2 commits intogoogle:mainfrom
Eatosin:feat/add-thinking-config

Conversation

@Eatosin
Copy link

@Eatosin Eatosin commented Jan 22, 2026

Description

Added thinking_config to the handled_keys list in langextract/providers/gemini.py. This enables support for Gemini 2.0 Flash Thinking and other reasoning models that require this parameter. Previously, passing thinking_config raised a TypeError.

Fixes #319

Feature

How Has This Been Tested?

I ran a local verification script initializing the GeminiLanguageModel with the new parameter.

python -c "from langextract.providers.gemini import GeminiLanguageModel; GeminiLanguageModel(model_id='gemini-2.0-flash-thinking-exp', thinking_config={'include_thoughts': True})"

Checklist:

  • I have read and acknowledged Google's Open Source Code of conduct.
  • I have read the Contributing page, and I either signed the Google Individual CLA or am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have made any needed documentation changes, or noted in the linked issue(s) that documentation elsewhere needs updating.
  • I have added tests, or I have ensured existing tests cover the changes.
  • I have followed Google's Python Style Guide and ran pylint over the affected code.

@github-actions github-actions bot added the size/XS Pull request with less than 50 lines changed label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Pull request with less than 50 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add thinking_config to _API_CONFIG_KEYS for Gemini 3 model support

1 participant