mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
Fix output config error
This commit is contained in:
parent
273932c923
commit
814e36353b
2 changed files with 17 additions and 2 deletions
|
|
@ -163,7 +163,10 @@ class LiteLLMMessagesToCompletionTransformationHandler:
|
|||
"include_usage": True,
|
||||
}
|
||||
|
||||
excluded_keys = {"anthropic_messages"}
|
||||
excluded_keys = {
|
||||
"anthropic_messages",
|
||||
"output_config", # Anthropic-only; OpenAI does not support it
|
||||
}
|
||||
extra_kwargs = extra_kwargs or {}
|
||||
for key, value in extra_kwargs.items():
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -296,8 +296,20 @@ class LiteLLMAnthropicMessagesAdapter:
|
|||
def translatable_anthropic_params(self) -> List:
|
||||
"""
|
||||
Which anthropic params, we need to translate to the openai format.
|
||||
Params in this list are either translated or dropped when targeting OpenAI.
|
||||
Anthropic-only params like output_config are included here to be dropped
|
||||
(OpenAI does not support them).
|
||||
"""
|
||||
return ["messages", "metadata", "system", "tool_choice", "tools", "thinking", "output_format"]
|
||||
return [
|
||||
"messages",
|
||||
"metadata",
|
||||
"system",
|
||||
"tool_choice",
|
||||
"tools",
|
||||
"thinking",
|
||||
"output_format",
|
||||
"output_config", # Anthropic-only; drop when targeting OpenAI
|
||||
]
|
||||
|
||||
def _is_web_search_tool(self, tool: Dict[str, Any]) -> bool:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue