Spaces:
Paused
Paused
Mirrowel commited on
Commit ·
2d13d90
1
Parent(s): dcaf0eb
feat: Fix thinking parameter handling for specific Gemini models
Browse files
src/rotator_library/providers/gemini_provider.py
CHANGED
|
@@ -53,7 +53,7 @@ class GeminiProvider(ProviderInterface):
|
|
| 53 |
|
| 54 |
def handle_thinking_parameter(self, payload: Dict[str, Any], model: str):
|
| 55 |
"""
|
| 56 |
-
Adds a default thinking parameter for specific Gemini models if not already present
|
| 57 |
"""
|
| 58 |
-
if model in ["gemini/gemini-2.5-pro", "gemini/gemini-2.5-flash"] and "thinking" not in payload:
|
| 59 |
payload["thinking"] = {"type": "enabled", "budget_tokens": -1}
|
|
|
|
| 53 |
|
| 54 |
def handle_thinking_parameter(self, payload: Dict[str, Any], model: str):
|
| 55 |
"""
|
| 56 |
+
Adds a default thinking parameter for specific Gemini models if not already present.
|
| 57 |
"""
|
| 58 |
+
if model in ["gemini/gemini-2.5-pro", "gemini/gemini-2.5-flash"] and "thinking" not in payload and "reasoning_effort" not in payload:
|
| 59 |
payload["thinking"] = {"type": "enabled", "budget_tokens": -1}
|