Skip to content

Conversation

@davidchicano
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

In src/resources/responses/responses.ts make the ResponseFormatTextJSONSchemaConfig parameter not optional:

/**
 * JSON Schema response format. Used to generate structured JSON responses. Learn
 * more about
 * [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
 */
export interface ResponseFormatTextJSONSchemaConfig {
...
  /**
   * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores
   * and dashes, with a maximum length of 64.
   */
  name?: string; -->  name: string;
...
}

Not setting this parameter generates an error.

Additional context & links

Error example:

{
  status: 400,
  headers: {
    ...
  },
  error: {
    message: "Missing required parameter: 'text.format.name'.",
    type: "invalid_request_error",
    param: "text.format.name",
    code: "missing_required_parameter"
  },
  code: "missing_required_parameter",
  param: "text.format.name",
  type: "invalid_request_error",
  request_id: "req_ebdf4e9d8c4819718be076dabf1f6316"
}

@davidchicano davidchicano requested a review from a team as a code owner March 20, 2025 12:23
@RobertCraigie
Copy link
Collaborator

Thanks for the PR! Looks like this has since been fixed.

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.

2 participants