diff --git a/pyproject.toml b/pyproject.toml index 1cd4d683d..3ea51eaab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires-python = ">=3.9" license = "MIT" authors = [{ name = "OpenAI", email = "support@openai.com" }] dependencies = [ - "openai>=1.97.1,<2", + "openai>=1.99.2,<2", "pydantic>=2.10, <3", "griffe>=1.5.6, <2", "typing-extensions>=4.12.2, <5", diff --git a/src/agents/extensions/models/litellm_model.py b/src/agents/extensions/models/litellm_model.py index b01b84253..d73e1817d 100644 --- a/src/agents/extensions/models/litellm_model.py +++ b/src/agents/extensions/models/litellm_model.py @@ -24,7 +24,7 @@ AnnotationURLCitation, ChatCompletionMessage, ) -from openai.types.chat.chat_completion_message_tool_call import Function +from openai.types.chat.chat_completion_message_function_tool_call import ChatCompletionMessageFunctionToolCall from openai.types.responses import Response from ... import _debug @@ -416,7 +416,7 @@ def convert_tool_call_to_openai( return ChatCompletionMessageToolCall( id=tool_call.id, type="function", - function=Function( + function=ChatCompletionMessageFunctionToolCall( name=tool_call.function.name or "", arguments=tool_call.function.arguments ), )