Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.13.0"
".": "5.13.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-24be531010b354303d741fc9247c1f84f75978f9f7de68aca92cb4f240a04722.yml
openapi_spec_hash: 3e46f439f6a863beadc71577eb4efa15
config_hash: ed87b9139ac595a04a2162d754df2fed
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7ef7a457c3bf05364e66e48c9ca34f31bfef1f6c9b7c15b1812346105e0abb16.yml
openapi_spec_hash: a2b1f5d8fbb62175c93b0ebea9f10063
config_hash: 76afa3236f36854a8705f1281b1990b8
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.13.1 (2025-08-19)

Full Changelog: [v5.13.0...v5.13.1](https://github.com/openai/openai-node/compare/v5.13.0...v5.13.1)

### Chores

* **api:** accurately represent shape for verbosity on Chat Completions ([5ddac3c](https://github.com/openai/openai-node/commit/5ddac3c7535e2df4b562fe1237b639e112bf5eef))

## 5.13.0 (2025-08-18)

Full Changelog: [v5.12.3...v5.13.0](https://github.com/openai/openai-node/compare/v5.12.3...v5.13.0)
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
"version": "5.13.0",
"version": "5.13.1",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "5.13.0",
"version": "5.13.1",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <support@openai.com>",
"types": "dist/index.d.ts",
Expand Down
13 changes: 1 addition & 12 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ export interface ChatCompletionCreateParamsBase {
* our [model distillation](https://platform.openai.com/docs/guides/distillation)
* or [evals](https://platform.openai.com/docs/guides/evals) products.
*
* Supports text and image inputs. Note: image inputs over 10MB will be dropped.
* Supports text and image inputs. Note: image inputs over 8MB will be dropped.
*/
store?: boolean | null;

Expand Down Expand Up @@ -1733,8 +1733,6 @@ export interface ChatCompletionCreateParamsBase {
*/
temperature?: number | null;

text?: ChatCompletionCreateParams.Text;

/**
* Controls which (if any) tool is called by the model. `none` means the model will
* not call any tool and instead generates a message. `auto` means the model can
Expand Down Expand Up @@ -1825,15 +1823,6 @@ export namespace ChatCompletionCreateParams {
parameters?: Shared.FunctionParameters;
}

export interface Text {
/**
* Constrains the verbosity of the model's response. Lower values will result in
* more concise responses, while higher values will result in more verbose
* responses. Currently supported values are `low`, `medium`, and `high`.
*/
verbosity?: 'low' | 'medium' | 'high' | null;
}

/**
* This tool searches the web for relevant results to use in a response. Learn more
* about the
Expand Down
5 changes: 3 additions & 2 deletions src/resources/graders/grader-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,11 @@ export interface StringCheckGrader {
*/
export interface TextSimilarityGrader {
/**
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
*/
evaluation_metric:
| 'cosine'
| 'fuzzy_match'
| 'bleu'
| 'gleu'
Expand Down
70 changes: 16 additions & 54 deletions src/resources/responses/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,14 @@ export interface Response {
*/
status?: ResponseStatus;

text?: Response.Text;
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
text?: ResponseTextConfig;

/**
* The truncation strategy to use for the model response.
Expand Down Expand Up @@ -603,32 +610,6 @@ export namespace Response {
*/
reason?: 'max_output_tokens' | 'content_filter';
}

export interface Text {
/**
* An object specifying the format that the model must output.
*
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
* ensures the model will match your supplied JSON schema. Learn more in the
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
*
* The default format is `{ "type": "text" }` with no additional options.
*
* **Not recommended for gpt-4o and newer models:**
*
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
* ensures the message the model generates is valid JSON. Using `json_schema` is
* preferred for models that support it.
*/
format?: ResponsesAPI.ResponseFormatTextConfig;

/**
* Constrains the verbosity of the model's response. Lower values will result in
* more concise responses, while higher values will result in more verbose
* responses. Currently supported values are `low`, `medium`, and `high`.
*/
verbosity?: 'low' | 'medium' | 'high' | null;
}
}

/**
Expand Down Expand Up @@ -5194,7 +5175,14 @@ export interface ResponseCreateParamsBase {
*/
temperature?: number | null;

text?: ResponseCreateParams.Text;
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
text?: ResponseTextConfig;

/**
* How the model should select which tool (or tools) to use when generating a
Expand Down Expand Up @@ -5276,32 +5264,6 @@ export namespace ResponseCreateParams {
include_obfuscation?: boolean;
}

export interface Text {
/**
* An object specifying the format that the model must output.
*
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
* ensures the model will match your supplied JSON schema. Learn more in the
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
*
* The default format is `{ "type": "text" }` with no additional options.
*
* **Not recommended for gpt-4o and newer models:**
*
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
* ensures the message the model generates is valid JSON. Using `json_schema` is
* preferred for models that support it.
*/
format?: ResponsesAPI.ResponseFormatTextConfig;

/**
* Constrains the verbosity of the model's response. Lower values will result in
* more concise responses, while higher values will result in more verbose
* responses. Currently supported values are `low`, `medium`, and `high`.
*/
verbosity?: 'low' | 'medium' | 'high' | null;
}

export type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
export type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '5.13.0'; // x-release-please-version
export const VERSION = '5.13.1'; // x-release-please-version
1 change: 0 additions & 1 deletion tests/api-resources/chat/completions/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe('resource completions', () => {
stream: false,
stream_options: { include_obfuscation: true, include_usage: true },
temperature: 1,
text: { verbosity: 'low' },
tool_choice: 'none',
tools: [
{
Expand Down
Loading