fix(gemini): allow thinking_config passthrough - #411
Conversation
|
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. |
|
+1 — hit this exact bug in production today running LangExtract 1.5.0 with Symptom: Some Confirmed: passing Workaround we shipped: import-time monkeypatch that adds The single-line allowlist addition in this PR is the right fix and would have saved us a day of debugging. Would love to see this land. Happy to share repro logs if useful. |
Description
Add
thinking_configto the Gemini provider allowlist solanguage_model_params={"thinking_config": ...}survivesGeminiLanguageModel.__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 geminiChecklist:
pylintover the affected code.