openai / openai/openai-openapi

EasyInputMessage does not support content with "output_text"

Open
#475 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug specification
Dominant language
No language data
Stars
2.5k
Forks
527
Avg merge
1h 46m
Merged PRs (30d)
2

Description

The OpenAPI raises Issue when using the pydantic model .model_dump for EasyInput Message when simulating assistant <-> user exchange, as the assistant content can only be set to "input_text"

EasyInputMessage:
      type: object
      title: Input message
      description: |
        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.
      properties:
        role:
          type: string
          description: |
            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.
          enum:
            - user
            - assistant
            - system
            - developer
        content:
          description: |
            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.
          anyOf:
            - type: string
              title: Text input
              description: |
                A text input to the model.
            - $ref: '#/components/schemas/InputMessageContentList'
        type:
          type: string
          description: |
            The type of the message input. Always `message`.
          enum:
            - message
          x-stainless-const: true
      required:
        - role
        - content

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the OpenAPI schema for EasyInputMessage and the related InputMessageContentList definition. Reproduce the pydantic model_dump validation issue described in the report, then verify that assistant messages containing output_text are accepted while the existing user and input_text cases remain valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.