Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Response Custom Tool Call Input Done

From Leeroopedia
Revision as of 13:39, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Openai_Openai_python_Response_Custom_Tool_Call_Input_Done.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment