diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 631cf4253..d4f0c6a28 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "5.20.3"
+ ".": "5.21.0"
}
diff --git a/.stats.yml b/.stats.yml
index 905a02c44..2dd0aef46 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml
-openapi_spec_hash: e933ec43b46f45c348adb78840e5808d
-config_hash: bf45940f0a7805b4ec2017eecdd36893
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-380330a93b5d010391ca3b36ea193c5353b0dfdf2ddd02789ef84a84ce427e82.yml
+openapi_spec_hash: 859703234259ecdd2a3c6f4de88eb504
+config_hash: b619b45c1e7facf819f902dee8fa4f97
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a4000e0f..279e64fd8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 5.21.0 (2025-09-17)
+
+Full Changelog: [v5.20.3...v5.21.0](https://github.com/openai/openai-node/compare/v5.20.3...v5.21.0)
+
+### Features
+
+* **api:** type updates for conversations, reasoning_effort and results for evals ([f243f54](https://github.com/openai/openai-node/commit/f243f54072d00cb8d83b8c6093accaaabf34d4cf))
+
## 5.20.3 (2025-09-15)
Full Changelog: [v5.20.2...v5.20.3](https://github.com/openai/openai-node/compare/v5.20.2...v5.20.3)
diff --git a/api.md b/api.md
index 2f274e7cf..3a73f13f0 100644
--- a/api.md
+++ b/api.md
@@ -896,22 +896,17 @@ Methods:
Types:
- ComputerScreenshotContent
-- ContainerFileCitationBody
- Conversation
- ConversationDeleted
- ConversationDeletedResource
-- FileCitationBody
-- InputFileContent
-- InputImageContent
-- InputTextContent
-- LobProb
- Message
-- OutputTextContent
-- RefusalContent
- SummaryTextContent
- TextContent
-- TopLogProb
-- URLCitationBody
+- InputTextContent
+- OutputTextContent
+- RefusalContent
+- InputImageContent
+- InputFileContent
Methods:
diff --git a/jsr.json b/jsr.json
index 240031a5e..0fdb8b961 100644
--- a/jsr.json
+++ b/jsr.json
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
- "version": "5.20.3",
+ "version": "5.21.0",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
diff --git a/package.json b/package.json
index 665166bbf..7ff223d9f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "openai",
- "version": "5.20.3",
+ "version": "5.21.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI ",
"types": "dist/index.d.ts",
diff --git a/src/resources/conversations/conversations.ts b/src/resources/conversations/conversations.ts
index fbd3dcbd9..30775981c 100644
--- a/src/resources/conversations/conversations.ts
+++ b/src/resources/conversations/conversations.ts
@@ -54,6 +54,9 @@ export class Conversations extends APIResource {
}
}
+/**
+ * A screenshot of a computer.
+ */
export interface ComputerScreenshotContent {
/**
* The identifier of an uploaded file that contains the screenshot.
@@ -72,38 +75,6 @@ export interface ComputerScreenshotContent {
type: 'computer_screenshot';
}
-export interface ContainerFileCitationBody {
- /**
- * The ID of the container file.
- */
- container_id: string;
-
- /**
- * The index of the last character of the container file citation in the message.
- */
- end_index: number;
-
- /**
- * The ID of the file.
- */
- file_id: string;
-
- /**
- * The filename of the container file cited.
- */
- filename: string;
-
- /**
- * The index of the first character of the container file citation in the message.
- */
- start_index: number;
-
- /**
- * The type of the container file citation. Always `container_file_citation`.
- */
- type: 'container_file_citation';
-}
-
export interface Conversation {
/**
* The unique ID of the conversation.
@@ -147,96 +118,9 @@ export interface ConversationDeletedResource {
object: 'conversation.deleted';
}
-export interface FileCitationBody {
- /**
- * The ID of the file.
- */
- file_id: string;
-
- /**
- * The filename of the file cited.
- */
- filename: string;
-
- /**
- * The index of the file in the list of files.
- */
- index: number;
-
- /**
- * The type of the file citation. Always `file_citation`.
- */
- type: 'file_citation';
-}
-
-export interface InputFileContent {
- /**
- * The ID of the file to be sent to the model.
- */
- file_id: string | null;
-
- /**
- * The type of the input item. Always `input_file`.
- */
- type: 'input_file';
-
- /**
- * The URL of the file to be sent to the model.
- */
- file_url?: string;
-
- /**
- * The name of the file to be sent to the model.
- */
- filename?: string;
-}
-
-export interface InputImageContent {
- /**
- * The detail level of the image to be sent to the model. One of `high`, `low`, or
- * `auto`. Defaults to `auto`.
- */
- detail: 'low' | 'high' | 'auto';
-
- /**
- * The ID of the file to be sent to the model.
- */
- file_id: string | null;
-
- /**
- * The URL of the image to be sent to the model. A fully qualified URL or base64
- * encoded image in a data URL.
- */
- image_url: string | null;
-
- /**
- * The type of the input item. Always `input_image`.
- */
- type: 'input_image';
-}
-
-export interface InputTextContent {
- /**
- * The text input to the model.
- */
- text: string;
-
- /**
- * The type of the input item. Always `input_text`.
- */
- type: 'input_text';
-}
-
-export interface LobProb {
- token: string;
-
- bytes: Array;
-
- logprob: number;
-
- top_logprobs: Array;
-}
-
+/**
+ * A message to or from the model.
+ */
export interface Message {
/**
* The unique ID of the message.
@@ -247,14 +131,14 @@ export interface Message {
* The content of the message
*/
content: Array<
- | InputTextContent
- | OutputTextContent
+ | ResponsesAPI.ResponseInputText
+ | ResponsesAPI.ResponseOutputText
| TextContent
| SummaryTextContent
- | RefusalContent
- | InputImageContent
+ | ResponsesAPI.ResponseOutputRefusal
+ | ResponsesAPI.ResponseInputImage
| ComputerScreenshotContent
- | InputFileContent
+ | ResponsesAPI.ResponseInputFile
>;
/**
@@ -275,83 +159,33 @@ export interface Message {
type: 'message';
}
-export interface OutputTextContent {
- /**
- * The annotations of the text output.
- */
- annotations: Array;
-
- /**
- * The text output from the model.
- */
- text: string;
-
- /**
- * The type of the output text. Always `output_text`.
- */
- type: 'output_text';
-
- logprobs?: Array;
-}
-
-export interface RefusalContent {
- /**
- * The refusal explanation from the model.
- */
- refusal: string;
-
- /**
- * The type of the refusal. Always `refusal`.
- */
- type: 'refusal';
-}
-
+/**
+ * A summary text from the model.
+ */
export interface SummaryTextContent {
text: string;
type: 'summary_text';
}
+/**
+ * A text content.
+ */
export interface TextContent {
text: string;
type: 'text';
}
-export interface TopLogProb {
- token: string;
+export type InputTextContent = ResponsesAPI.ResponseInputText;
- bytes: Array;
+export type OutputTextContent = ResponsesAPI.ResponseOutputText;
- logprob: number;
-}
+export type RefusalContent = ResponsesAPI.ResponseOutputRefusal;
-export interface URLCitationBody {
- /**
- * The index of the last character of the URL citation in the message.
- */
- end_index: number;
+export type InputImageContent = ResponsesAPI.ResponseInputImage;
- /**
- * The index of the first character of the URL citation in the message.
- */
- start_index: number;
-
- /**
- * The title of the web resource.
- */
- title: string;
-
- /**
- * The type of the URL citation. Always `url_citation`.
- */
- type: 'url_citation';
-
- /**
- * The URL of the web resource.
- */
- url: string;
-}
+export type InputFileContent = ResponsesAPI.ResponseInputFile;
export interface ConversationCreateParams {
/**
@@ -387,22 +221,17 @@ Conversations.Items = Items;
export declare namespace Conversations {
export {
type ComputerScreenshotContent as ComputerScreenshotContent,
- type ContainerFileCitationBody as ContainerFileCitationBody,
type Conversation as Conversation,
type ConversationDeleted as ConversationDeleted,
type ConversationDeletedResource as ConversationDeletedResource,
- type FileCitationBody as FileCitationBody,
- type InputFileContent as InputFileContent,
- type InputImageContent as InputImageContent,
- type InputTextContent as InputTextContent,
- type LobProb as LobProb,
type Message as Message,
- type OutputTextContent as OutputTextContent,
- type RefusalContent as RefusalContent,
type SummaryTextContent as SummaryTextContent,
type TextContent as TextContent,
- type TopLogProb as TopLogProb,
- type URLCitationBody as URLCitationBody,
+ type InputTextContent as InputTextContent,
+ type OutputTextContent as OutputTextContent,
+ type RefusalContent as RefusalContent,
+ type InputImageContent as InputImageContent,
+ type InputFileContent as InputFileContent,
type ConversationCreateParams as ConversationCreateParams,
type ConversationUpdateParams as ConversationUpdateParams,
};
diff --git a/src/resources/evals/runs/output-items.ts b/src/resources/evals/runs/output-items.ts
index 1aded2f91..16a8956b4 100644
--- a/src/resources/evals/runs/output-items.ts
+++ b/src/resources/evals/runs/output-items.ts
@@ -74,9 +74,9 @@ export interface OutputItemRetrieveResponse {
object: 'eval.run.output_item';
/**
- * A list of results from the evaluation run.
+ * A list of grader results for this output item.
*/
- results: Array<{ [key: string]: unknown }>;
+ results: Array;
/**
* The identifier of the evaluation run associated with this output item.
@@ -95,6 +95,38 @@ export interface OutputItemRetrieveResponse {
}
export namespace OutputItemRetrieveResponse {
+ /**
+ * A single grader result for an evaluation run output item.
+ */
+ export interface Result {
+ /**
+ * The name of the grader.
+ */
+ name: string;
+
+ /**
+ * Whether the grader considered the output a pass.
+ */
+ passed: boolean;
+
+ /**
+ * The numeric score produced by the grader.
+ */
+ score: number;
+
+ /**
+ * Optional sample or intermediate data produced by the grader.
+ */
+ sample?: { [key: string]: unknown } | null;
+
+ /**
+ * The grader type (for example, "string-check-grader").
+ */
+ type?: string;
+
+ [k: string]: unknown;
+ }
+
/**
* A sample containing the input and output of the evaluation run.
*/
@@ -240,9 +272,9 @@ export interface OutputItemListResponse {
object: 'eval.run.output_item';
/**
- * A list of results from the evaluation run.
+ * A list of grader results for this output item.
*/
- results: Array<{ [key: string]: unknown }>;
+ results: Array;
/**
* The identifier of the evaluation run associated with this output item.
@@ -261,6 +293,38 @@ export interface OutputItemListResponse {
}
export namespace OutputItemListResponse {
+ /**
+ * A single grader result for an evaluation run output item.
+ */
+ export interface Result {
+ /**
+ * The name of the grader.
+ */
+ name: string;
+
+ /**
+ * Whether the grader considered the output a pass.
+ */
+ passed: boolean;
+
+ /**
+ * The numeric score produced by the grader.
+ */
+ score: number;
+
+ /**
+ * Optional sample or intermediate data produced by the grader.
+ */
+ sample?: { [key: string]: unknown } | null;
+
+ /**
+ * The grader type (for example, "string-check-grader").
+ */
+ type?: string;
+
+ [k: string]: unknown;
+ }
+
/**
* A sample containing the input and output of the evaluation run.
*/
diff --git a/src/resources/evals/runs/runs.ts b/src/resources/evals/runs/runs.ts
index 502a510e9..ecb990c44 100644
--- a/src/resources/evals/runs/runs.ts
+++ b/src/resources/evals/runs/runs.ts
@@ -285,6 +285,15 @@ export namespace CreateEvalCompletionsRunDataSource {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* An object specifying the format that the model must output.
*
@@ -721,6 +730,15 @@ export namespace RunCreateResponse {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* A seed value to initialize the randomness, during sampling.
*/
@@ -1198,6 +1216,15 @@ export namespace RunRetrieveResponse {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* A seed value to initialize the randomness, during sampling.
*/
@@ -1672,6 +1699,15 @@ export namespace RunListResponse {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* A seed value to initialize the randomness, during sampling.
*/
@@ -2157,6 +2193,15 @@ export namespace RunCancelResponse {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* A seed value to initialize the randomness, during sampling.
*/
@@ -2581,6 +2626,15 @@ export namespace RunCreateParams {
*/
max_completion_tokens?: number;
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
/**
* A seed value to initialize the randomness, during sampling.
*/
diff --git a/src/resources/graders/grader-models.ts b/src/resources/graders/grader-models.ts
index 021493f0d..0dee926f1 100644
--- a/src/resources/graders/grader-models.ts
+++ b/src/resources/graders/grader-models.ts
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
+import * as Shared from '../shared';
import * as ResponsesAPI from '../responses/responses';
export class GraderModels extends APIResource {}
@@ -193,7 +194,7 @@ export interface ScoreModelGrader {
/**
* The sampling parameters for the model.
*/
- sampling_params?: unknown;
+ sampling_params?: ScoreModelGrader.SamplingParams;
}
export namespace ScoreModelGrader {
@@ -265,6 +266,40 @@ export namespace ScoreModelGrader {
detail?: string;
}
}
+
+ /**
+ * The sampling parameters for the model.
+ */
+ export interface SamplingParams {
+ /**
+ * The maximum number of tokens the grader model may generate in its response.
+ */
+ max_completions_tokens?: number | null;
+
+ /**
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
+ * effort can result in faster responses and fewer tokens used on reasoning in a
+ * response.
+ */
+ reasoning_effort?: Shared.ReasoningEffort | null;
+
+ /**
+ * A seed value to initialize the randomness, during sampling.
+ */
+ seed?: number | null;
+
+ /**
+ * A higher temperature increases randomness in the outputs.
+ */
+ temperature?: number | null;
+
+ /**
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
+ */
+ top_p?: number | null;
+ }
}
/**
diff --git a/src/version.ts b/src/version.ts
index aebe1eb29..2d3d20404 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '5.20.3'; // x-release-please-version
+export const VERSION = '5.21.0'; // x-release-please-version