Implementation:Openai Openai python Response Custom Tool Call Input Done
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Responses_API |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete streaming event type indicating that input for a custom tool call is complete, provided by the openai-python SDK.
Description
ResponseCustomToolCallInputDoneEvent is a Pydantic model representing the streaming event emitted when the model has finished generating all input data for a custom tool call. It provides the complete input string, the item_id of the associated API item, the output_index, a sequence_number for event ordering, and a fixed type of "response.custom_tool_call_input.done". This event arrives after all corresponding delta events for the same custom tool call. This type is auto-generated from the OpenAI OpenAPI specification by Stainless.
Usage
Import ResponseCustomToolCallInputDoneEvent when handling streaming events and you need to receive the finalized input data for a custom tool call in a single event.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/responses/response_custom_tool_call_input_done_event.py
Signature
class ResponseCustomToolCallInputDoneEvent(BaseModel):
"""Event indicating that input for a custom tool call is complete."""
input: str
item_id: str
output_index: int
sequence_number: int
type: Literal["response.custom_tool_call_input.done"]
Import
from openai.types.responses import ResponseCustomToolCallInputDoneEvent
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| input | str |
Yes | The complete input data for the custom tool call. |
| item_id | str |
Yes | Unique identifier for the API item associated with this event. |
| output_index | int |
Yes | The index of the output this event applies to. |
| sequence_number | int |
Yes | The sequence number of this event. |
| type | Literal["response.custom_tool_call_input.done"] |
Yes | The event type identifier. |
Usage Examples
from openai.types.responses import ResponseCustomToolCallInputDoneEvent
# Handle completed custom tool call input
for event in stream:
if isinstance(event, ResponseCustomToolCallInputDoneEvent):
print(f"Custom tool call input complete for item {event.item_id}")
print(f"Full input: {event.input}")
# Now execute the custom tool with the complete input
result = execute_custom_tool(event.input)