mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
fix(azure): avoid mutable request mapping
DEVX-829 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
48712f733a
commit
bd222bd8d9
1 changed files with 7 additions and 5 deletions
|
|
@ -280,11 +280,13 @@ class AzureOpenAIConfig(BaseConfig):
|
|||
ordered_messages: Final = system_messages_first(messages) if litellm.openai_system_messages_first else messages
|
||||
stripped_messages: Final = drop_tool_reference_parts_from_tool_messages(ordered_messages)
|
||||
azure_messages: Final = convert_to_azure_openai_messages(hoist_images_from_tool_messages(stripped_messages))
|
||||
request_params: Final = {
|
||||
key: value
|
||||
for key, value in optional_params.items()
|
||||
if key != "tool_choice" or optional_params.get("tools") or optional_params.get("functions")
|
||||
}
|
||||
request_params: Final = MappingProxyType(
|
||||
{
|
||||
key: value
|
||||
for key, value in optional_params.items()
|
||||
if key != "tool_choice" or optional_params.get("tools") or optional_params.get("functions")
|
||||
}
|
||||
)
|
||||
return {
|
||||
"model": model,
|
||||
"messages": azure_messages,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue