Skip to content

[FEATURE REQ] Support files and images as tool call outputs.Β #759

@RGBKnights

Description

@RGBKnights

Describe the feature or improvement you are requesting

Update FunctionCallOutputResponseItem to include the output property as a string or array.
This would remove a bunch of hacks we need to do now to allow the Model to see files generated by tools.
The array of objects should allow the input text, input image, input file:

Input text - A text input to the model.
text:string - The text input to the model (Required)
type:string - The type of the input item. Always input_text (Required)

Input image - An image input to the model. Learn about image inputs
type:string - The type of the input item. Always input_image (Required)
detail:string - The detail level of the image to be sent to the model. One of high, low, or auto. Defaults to auto. (Optional)
file_id:string - The ID of the file to be sent to the model (Optional)
image_url:string - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL (Optional)

Input file - A file input to the model.
type:string - The type of the input item. Always input_file (Required)
file_data:string - The base64-encoded data of the file to be sent to the model (Optional)
file_id:string - The ID of the file to be sent to the model (Optional)
file_url:string - The URL of the file to be sent to the model (Optional)
filename:string - The name of the file to be sent to the model (Optional)

Additional context

Original Post Announcing the feature:
https://x.com/OpenAIDevs/status/1971618905941856495

Documentation for the feature:
https://platform.openai.com/docs/api-reference/responses/create#responses-create-input-input-item-list-item-function-tool-call-output-output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: responsesThis item is related to Responsesblocked: specThis issue is blocked on a needed REST API spec update.feature-requestCategory: A new feature or enhancement to an existing feature is being requested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions