mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(transformation.py): correctly translate 'thinking' param for lite… (#9904)
* fix(transformation.py): correctly translate 'thinking' param for litellm_proxy/ route Fixes https://github.com/BerriAI/litellm/issues/9892 * test: update test
This commit is contained in:
parent
b9f01c9f5b
commit
069aee9f70
3 changed files with 32 additions and 1 deletions
|
@ -15,6 +15,21 @@ class LiteLLMProxyChatConfig(OpenAIGPTConfig):
|
|||
list.append("thinking")
|
||||
return list
|
||||
|
||||
def _map_openai_params(
|
||||
self,
|
||||
non_default_params: dict,
|
||||
optional_params: dict,
|
||||
model: str,
|
||||
drop_params: bool,
|
||||
) -> dict:
|
||||
supported_openai_params = self.get_supported_openai_params(model)
|
||||
for param, value in non_default_params.items():
|
||||
if param == "thinking":
|
||||
optional_params.setdefault("extra_body", {})["thinking"] = value
|
||||
elif param in supported_openai_params:
|
||||
optional_params[param] = value
|
||||
return optional_params
|
||||
|
||||
def _get_openai_compatible_provider_info(
|
||||
self, api_base: Optional[str], api_key: Optional[str]
|
||||
) -> Tuple[Optional[str], Optional[str]]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue