mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
Fix MoonshotChatConfig to address limitations of kimi-thinking-preview model by excluding additional parameters (#12772)
This commit is contained in:
parent
93badc72dc
commit
bd134fa2db
1 changed files with 6 additions and 0 deletions
|
|
@ -83,8 +83,14 @@ class MoonshotChatConfig(OpenAIGPTConfig):
|
|||
Moonshot AI limitations:
|
||||
- functions parameter is not supported (use tools instead)
|
||||
- tool_choice doesn't support "required" value
|
||||
- kimi-thinking-preview doesn't support tool calls at all
|
||||
"""
|
||||
excluded_params: List[str] = ["functions"]
|
||||
|
||||
# kimi-thinking-preview has additional limitations
|
||||
if "kimi-thinking-preview" in model:
|
||||
excluded_params.extend(["tools", "tool_choice"])
|
||||
|
||||
base_openai_params = super().get_supported_openai_params(model=model)
|
||||
final_params: List[str] = []
|
||||
for param in base_openai_params:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue