mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
style: format messages handler
This commit is contained in:
parent
5e302355ed
commit
0c5c7aa3da
1 changed files with 23 additions and 21 deletions
|
|
@ -580,27 +580,29 @@ def anthropic_messages_handler(
|
|||
)
|
||||
if anthropic_messages_provider_config is None:
|
||||
# Route to Responses API for OpenAI / Azure, chat/completions for everything else.
|
||||
_shared_kwargs: Final = MappingProxyType({
|
||||
"max_tokens": max_tokens,
|
||||
"messages": messages,
|
||||
"model": original_model,
|
||||
"metadata": metadata,
|
||||
"stop_sequences": stop_sequences,
|
||||
"stream": stream,
|
||||
"system": system,
|
||||
"temperature": temperature,
|
||||
"thinking": thinking,
|
||||
"tool_choice": tool_choice,
|
||||
"tools": tools,
|
||||
"top_k": top_k,
|
||||
"top_p": top_p,
|
||||
"_is_async": is_async,
|
||||
"api_key": api_key,
|
||||
"api_base": api_base,
|
||||
"client": client,
|
||||
"custom_llm_provider": custom_llm_provider,
|
||||
**kwargs,
|
||||
})
|
||||
_shared_kwargs: Final = MappingProxyType(
|
||||
{
|
||||
"max_tokens": max_tokens,
|
||||
"messages": messages,
|
||||
"model": original_model,
|
||||
"metadata": metadata,
|
||||
"stop_sequences": stop_sequences,
|
||||
"stream": stream,
|
||||
"system": system,
|
||||
"temperature": temperature,
|
||||
"thinking": thinking,
|
||||
"tool_choice": tool_choice,
|
||||
"tools": tools,
|
||||
"top_k": top_k,
|
||||
"top_p": top_p,
|
||||
"_is_async": is_async,
|
||||
"api_key": api_key,
|
||||
"api_base": api_base,
|
||||
"client": client,
|
||||
"custom_llm_provider": custom_llm_provider,
|
||||
**kwargs,
|
||||
}
|
||||
)
|
||||
if _should_route_to_responses_api(
|
||||
custom_llm_provider=custom_llm_provider,
|
||||
requested_model=original_model,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue