Commit 657f551d

Robert Craigie <robert@craigie.dev>
2025-08-08 01:11:34
fix(types): correct tool types
1 parent caf837b
Changed files (2)
src
openai
lib
streaming
responses
types
responses
src/openai/lib/streaming/responses/_events.py
@@ -39,9 +39,11 @@ from ....types.responses import (
     ResponseMcpListToolsInProgressEvent,
     ResponseWebSearchCallCompletedEvent,
     ResponseWebSearchCallSearchingEvent,
+    ResponseCustomToolCallInputDoneEvent,
     ResponseFileSearchCallCompletedEvent,
     ResponseFileSearchCallSearchingEvent,
     ResponseWebSearchCallInProgressEvent,
+    ResponseCustomToolCallInputDeltaEvent,
     ResponseFileSearchCallInProgressEvent,
     ResponseImageGenCallPartialImageEvent,
     ResponseReasoningSummaryPartDoneEvent,
@@ -139,6 +141,8 @@ ResponseStreamEvent: TypeAlias = Annotated[
         ResponseQueuedEvent,
         ResponseReasoningTextDeltaEvent,
         ResponseReasoningTextDoneEvent,
+        ResponseCustomToolCallInputDeltaEvent,
+        ResponseCustomToolCallInputDoneEvent,
     ],
     PropertyInfo(discriminator="type"),
 ]
src/openai/types/responses/tool_param.py
@@ -5,12 +5,12 @@ from __future__ import annotations
 from typing import Dict, List, Union, Optional
 from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
+from ..chat import ChatCompletionFunctionToolParam
 from .custom_tool_param import CustomToolParam
 from .computer_tool_param import ComputerToolParam
 from .function_tool_param import FunctionToolParam
 from .web_search_tool_param import WebSearchToolParam
 from .file_search_tool_param import FileSearchToolParam
-from ..chat.chat_completion_tool_param import ChatCompletionToolParam
 
 __all__ = [
     "ToolParam",
@@ -191,4 +191,4 @@ ToolParam: TypeAlias = Union[
 ]
 
 
-ParseableToolParam: TypeAlias = Union[ToolParam, ChatCompletionToolParam]
+ParseableToolParam: TypeAlias = Union[ToolParam, ChatCompletionFunctionToolParam]