Skip to content

Add a mime_type attribute to TextContent #3206

Open

Description

@aurelwildfellner

In the interactions API, in the ModelOutput a TextCont lacks a mime_type attribute. All other content types have a mime_type.

This is relevant in combination with structured outputs where someone would specify the response_format with a mime_type = 'application/json'. But on the the actual output of the interaction there is no semantic information that the output is not a simple text, but JSON.

Especially when creating background tasks with interactions.create(background=True) and interaction = interactions.get() it would be good to have the information on the returned interaction because it is not strongly tied to the creation call where the schema and mime_type is defined.

In addition to the mime_type it would also be nice to be able to tell that the content or output is actually a requested structured output (because the model might also create a JSON as an output without any explicit schema definition provided on create()).

This fix would be important for observability where someone wants to capture this data (think of OpenTelemetry).

I understand that this is not actually about the generated Python SDK, because the mime_type is already missing from the underlying OpenAPI specification. I hope this is still a good place to report it.

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Oct 23, 2026
  2. Venkaiahbabuneelam commented on Oct 26, 2026

    @Venkaiahbabuneelam

    Hi @aurelwildfellner, Thank you for your feedback. We appreciate you taking the time to share your thoughts with us, and we'll be filing a feature request.
    Thanks

  3. alkwnamdad-ux commented on Oct 26, 2026

    @alkwnamdad-ux

    Thank you for my service my friend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions