Skip to content

feat(responses): implement include support for /responses/{id}/input_items in Responses API #5345

@skamenan7

Description

@skamenan7

🚀 Describe the new functionality needed

Support include on /responses/{id}/input_items, or reject unsupported values before the storage layer. The endpoint already accepts include, but list_response_input_items(..., include=...) still raises NotImplementedError when it is set.

The main work here is to decide the supported include subset for stored input-item readback, implement that behavior, and align schema, validation, and tests with the final contract.

For reference, OpenAI docs list these include values on the Responses / Conversations item-style surfaces:

  • file_search_call.results
  • web_search_call.results
  • web_search_call.action.sources
  • message.input_image.image_url
  • computer_call_output.output.image_url
  • code_interpreter_call.outputs
  • reasoning.encrypted_content
  • message.output_text.logprobs

Current llama-stack exposes these values in ResponseItemInclude:

  • file_search_call.results
  • web_search_call.action.sources
  • message.input_image.image_url
  • computer_call_output.output.image_url
  • code_interpreter_call.outputs
  • reasoning.encrypted_content
  • message.output_text.logprobs

💡 Why is this needed? What if we don't build it?

This keeps stored retrieval aligned with the exposed Responses surface and avoids a late failure on an accepted parameter. If we do not build this, clients can send include to the endpoint and still hit NotImplementedError, which makes the retrieval contract harder to rely on.

Other thoughts

Worth checking chained responses too, since previous_response_id can pull prior response output into later input state. This may also be a good place to decide whether /responses/{id}/input_items should support the full documented set, a smaller supported subset, or a narrowed contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions