Skip to content

Comments

Update Responses with latest tsp#963

Draft
christothes wants to merge 2 commits intoopenai:mainfrom
christothes:chriss/updateResponses
Draft

Update Responses with latest tsp#963
christothes wants to merge 2 commits intoopenai:mainfrom
christothes:chriss/updateResponses

Conversation

@christothes
Copy link
Collaborator

No description provided.

@@ -95,6 +96,8 @@ internal ResponseResult(IDictionary<string, string> metadata, float? temperature

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instructions is now string | string[] | null and breaking serialization. That exists in the OpenAPI upstream spec, we'll need to be sure it is included here for Feb.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still looks like this in the upstream spec:

instructions?: string | null;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the AIP spec? Then they're behind. Details are in #949, but the service docs and OpenAPI spec disagree.

instructions:
  anyOf:
    - description: >
        A system (or developer) message inserted into the model's
        context.
        When using along with `previous_response_id`, the
        instructions from a previous
        response will not be carried over to the next response. This
        makes it simple
        to swap out system (or developer) messages in new responses.
      oneOf:
        - type: string
          description: >
            A text input to the model, equivalent to a text input
            with the
            `developer` role.
        - type: array
          title: Input item list
          description: >
            A list of one or many input items to the model,
            containing
            different content types.
          items:
            $ref: "#/components/schemas/InputItem"
    - type: "null"

Copy link
Collaborator

@ShivangiReja ShivangiReja Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is up to date in the latest spec, and instructions property exists in both the input and output models for Create Response.

It still looks like this in the upstream spec:

instructions?: string | null;

@christothes That line is for the Create Response input(see here)

@jsquire is referring to the Create Response output, which is also up to date(see here)

instructions: string | InputItem[] | null;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I was getting the two confused.

TextOptions = textOptions;
Tools = tools ?? new ChangeTrackingList<ResponseTool>();
ToolChoice = toolChoice;
Prompt = prompt;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prompt has been a big request item for a while, if we're updating to the new spec, I think we need to make sure that saved prompts are in the convenience API. This looks to be still hidden.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants