Skip to content

fix(gemini): allow thinking_config passthrough#411

Draft
autodots-AHassan wants to merge 1 commit intogoogle:mainfrom
autodots-AHassan:fix/gemini-thinking-config-319
Draft

fix(gemini): allow thinking_config passthrough#411
autodots-AHassan wants to merge 1 commit intogoogle:mainfrom
autodots-AHassan:fix/gemini-thinking-config-319

Conversation

@autodots-AHassan
Copy link
Copy Markdown

@autodots-AHassan autodots-AHassan commented Mar 8, 2026

Description

Add thinking_config to the Gemini provider allowlist so language_model_params={"thinking_config": ...} survives GeminiLanguageModel.__init__ filtering and is forwarded to the Gemini API. This also updates the provider docstring and adds regression coverage for both constructor-time and runtime passthrough.

Fixes #319

Bug fix

How Has This Been Tested?

  • uv run --extra openai --extra test pytest tests/inference_test.py -k gemini

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 Mar 8, 2026
@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@autodots-AHassan autodots-AHassan marked this pull request as draft March 8, 2026 22:31
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