Skip to content
Open
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 @@
{
".": "6.12.0"
".": "6.13.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 136
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-41f98da99f44ebe6204fce5c1dc9940f85f3472779e797b674c4fdc20306c77d.yml
openapi_spec_hash: c61259027f421f501bdc6b23cf9e430e
config_hash: 141b101c9f13b90e21af74e1686f1f41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-fe8e67bdc351a518b113ab48e775750190e207807903d6b03ab22c438c38a588.yml
openapi_spec_hash: 8af972190647ffb9dcec516e19d8761a
config_hash: 856bee50ee3617e85a9bc9274db01dbb
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 6.13.0 (2025-12-15)

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

### Features

* **api:** api update ([bc759dc](https://github.com/openai/openai-node/commit/bc759dc39518412b58b2ebf7e57758776971ce15))
* **api:** fix grader input list, add dated slugs for sora-2 ([6b2a38f](https://github.com/openai/openai-node/commit/6b2a38fb040eb45535818fb0157ae55949033dc1))

## 6.12.0 (2025-12-11)

Full Changelog: [v6.11.0...v6.12.0](https://github.com/openai/openai-node/compare/v6.11.0...v6.12.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Methods:

Types:

- <code><a href="./src/resources/graders/grader-models.ts">GraderInputs</a></code>
- <code><a href="./src/resources/graders/grader-models.ts">LabelModelGrader</a></code>
- <code><a href="./src/resources/graders/grader-models.ts">MultiGrader</a></code>
- <code><a href="./src/resources/graders/grader-models.ts">PythonGrader</a></code>
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": "6.12.0",
"version": "6.13.0",
"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": "6.12.0",
"version": "6.13.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions src/resources/evals/evals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,15 +769,16 @@ export namespace EvalCreateParams {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -808,7 +809,7 @@ export namespace EvalCreateParams {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down
43 changes: 25 additions & 18 deletions src/resources/evals/runs/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../../core/resource';
import * as Shared from '../../shared';
import * as GraderModelsAPI from '../../graders/grader-models';
import * as ResponsesAPI from '../../responses/responses';
import * as CompletionsAPI from '../../chat/completions/completions';
import * as OutputItemsAPI from './output-items';
Expand Down Expand Up @@ -206,15 +207,16 @@ export namespace CreateEvalCompletionsRunDataSource {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -245,7 +247,7 @@ export namespace CreateEvalCompletionsRunDataSource {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -667,15 +669,16 @@ export namespace RunCreateResponse {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -706,7 +709,7 @@ export namespace RunCreateResponse {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -1169,15 +1172,16 @@ export namespace RunRetrieveResponse {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -1208,7 +1212,7 @@ export namespace RunRetrieveResponse {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -1668,15 +1672,16 @@ export namespace RunListResponse {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -1707,7 +1712,7 @@ export namespace RunListResponse {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -2178,15 +2183,16 @@ export namespace RunCancelResponse {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -2217,7 +2223,7 @@ export namespace RunCancelResponse {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -2627,15 +2633,16 @@ export namespace RunCreateParams {
*/
export interface EvalItem {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| EvalItem.OutputText
| EvalItem.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -2666,7 +2673,7 @@ export namespace RunCreateParams {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down
66 changes: 60 additions & 6 deletions src/resources/graders/grader-models.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,62 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../core/resource';
import * as GraderModelsAPI from './grader-models';
import * as Shared from '../shared';
import * as ResponsesAPI from '../responses/responses';

export class GraderModels extends APIResource {}

/**
* A list of inputs, each of which may be either an input text, output text, input
* image, or input audio object.
*/
export type GraderInputs = Array<
| string
| ResponsesAPI.ResponseInputText
| GraderInputs.OutputText
| GraderInputs.InputImage
| ResponsesAPI.ResponseInputAudio
>;

export namespace GraderInputs {
/**
* A text output from the model.
*/
export interface OutputText {
/**
* The text output from the model.
*/
text: string;

/**
* The type of the output text. Always `output_text`.
*/
type: 'output_text';
}

/**
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
* The URL of the image input.
*/
image_url: string;

/**
* The type of the image input. Always `input_image`.
*/
type: 'input_image';

/**
* The detail level of the image to be sent to the model. One of `high`, `low`, or
* `auto`. Defaults to `auto`.
*/
detail?: string;
}
}

/**
* A LabelModelGrader object which uses a model to assign labels to each item in
* the evaluation.
Expand Down Expand Up @@ -49,15 +100,16 @@ export namespace LabelModelGrader {
*/
export interface Input {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| Input.OutputText
| Input.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -88,7 +140,7 @@ export namespace LabelModelGrader {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -208,15 +260,16 @@ export namespace ScoreModelGrader {
*/
export interface Input {
/**
* Inputs to the model - can contain template strings.
* Inputs to the model - can contain template strings. Supports text, output text,
* input images, and input audio, either as a single item or an array of items.
*/
content:
| string
| ResponsesAPI.ResponseInputText
| Input.OutputText
| Input.InputImage
| ResponsesAPI.ResponseInputAudio
| Array<unknown>;
| GraderModelsAPI.GraderInputs;

/**
* The role of the message input. One of `user`, `assistant`, `system`, or
Expand Down Expand Up @@ -247,7 +300,7 @@ export namespace ScoreModelGrader {
}

/**
* An image input to the model.
* An image input block used within EvalItem content arrays.
*/
export interface InputImage {
/**
Expand Down Expand Up @@ -386,6 +439,7 @@ export interface TextSimilarityGrader {

export declare namespace GraderModels {
export {
type GraderInputs as GraderInputs,
type LabelModelGrader as LabelModelGrader,
type MultiGrader as MultiGrader,
type PythonGrader as PythonGrader,
Expand Down
2 changes: 2 additions & 0 deletions src/resources/graders/graders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { APIResource } from '../../core/resource';
import * as GraderModelsAPI from './grader-models';
import {
GraderInputs,
GraderModels,
LabelModelGrader,
MultiGrader,
Expand All @@ -21,6 +22,7 @@ Graders.GraderModels = GraderModels;
export declare namespace Graders {
export {
GraderModels as GraderModels,
type GraderInputs as GraderInputs,
type LabelModelGrader as LabelModelGrader,
type MultiGrader as MultiGrader,
type PythonGrader as PythonGrader,
Expand Down
Loading