Skip to content

Commit f54395b

Browse files
feat(api): o1-pro now available through the API (#1398)
1 parent 88e0f50 commit f54395b

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 81
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f3bce04386c4fcfd5037e0477fbaa39010003fd1558eb5185fe4a71dd6a05fdd.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b26121d5df6eb5d3032a45a267473798b15fcfec76dd44a3256cf1238be05fa4.yml

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Types:
44

5+
- <code><a href="./src/resources/shared.ts">AllModels</a></code>
56
- <code><a href="./src/resources/shared.ts">ChatModel</a></code>
67
- <code><a href="./src/resources/shared.ts">ComparisonFilter</a></code>
78
- <code><a href="./src/resources/shared.ts">CompoundFilter</a></code>
@@ -14,6 +15,7 @@ Types:
1415
- <code><a href="./src/resources/shared.ts">ResponseFormatJSONObject</a></code>
1516
- <code><a href="./src/resources/shared.ts">ResponseFormatJSONSchema</a></code>
1617
- <code><a href="./src/resources/shared.ts">ResponseFormatText</a></code>
18+
- <code><a href="./src/resources/shared.ts">ResponsesModel</a></code>
1719

1820
# Completions
1921

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ export declare namespace OpenAI {
508508

509509
export { Responses as Responses };
510510

511+
export type AllModels = API.AllModels;
511512
export type ChatModel = API.ChatModel;
512513
export type ComparisonFilter = API.ComparisonFilter;
513514
export type CompoundFilter = API.CompoundFilter;
@@ -520,6 +521,7 @@ export declare namespace OpenAI {
520521
export type ResponseFormatJSONObject = API.ResponseFormatJSONObject;
521522
export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema;
522523
export type ResponseFormatText = API.ResponseFormatText;
524+
export type ResponsesModel = API.ResponsesModel;
523525
}
524526

525527
export { toFile, fileFromPath } from './uploads';

src/resources/responses/responses.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export interface Response {
263263
* [model guide](https://platform.openai.com/docs/models) to browse and compare
264264
* available models.
265265
*/
266-
model: (string & {}) | Shared.ChatModel;
266+
model: Shared.ResponsesModel;
267267

268268
/**
269269
* The object type of this resource - always set to `response`.
@@ -1417,7 +1417,7 @@ export interface ResponseFunctionToolCall {
14171417
*/
14181418
export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
14191419
/**
1420-
* The unique ID of the function call tool output.
1420+
* The unique ID of the function tool call.
14211421
*/
14221422
id: string;
14231423
}
@@ -2615,7 +2615,7 @@ export interface ResponseCreateParamsBase {
26152615
* [model guide](https://platform.openai.com/docs/models) to browse and compare
26162616
* available models.
26172617
*/
2618-
model: (string & {}) | Shared.ChatModel;
2618+
model: Shared.ResponsesModel;
26192619

26202620
/**
26212621
* Specify additional output data to include in the model response. Currently

src/resources/shared.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
export type AllModels =
4+
| string
5+
| ChatModel
6+
| string
7+
| ChatModel
8+
| 'o1-pro'
9+
| 'o1-pro-2025-03-19'
10+
| 'computer-use-preview'
11+
| 'computer-use-preview-2025-03-11';
12+
313
export type ChatModel =
414
| 'o3-mini'
515
| 'o3-mini-2025-01-31'
@@ -9,11 +19,6 @@ export type ChatModel =
919
| 'o1-preview-2024-09-12'
1020
| 'o1-mini'
1121
| 'o1-mini-2024-09-12'
12-
| 'computer-use-preview'
13-
| 'computer-use-preview-2025-02-04'
14-
| 'computer-use-preview-2025-03-11'
15-
| 'gpt-4.5-preview'
16-
| 'gpt-4.5-preview-2025-02-27'
1722
| 'gpt-4o'
1823
| 'gpt-4o-2024-11-20'
1924
| 'gpt-4o-2024-08-06'
@@ -23,6 +28,10 @@ export type ChatModel =
2328
| 'gpt-4o-audio-preview-2024-12-17'
2429
| 'gpt-4o-mini-audio-preview'
2530
| 'gpt-4o-mini-audio-preview-2024-12-17'
31+
| 'gpt-4o-search-preview'
32+
| 'gpt-4o-mini-search-preview'
33+
| 'gpt-4o-search-preview-2025-03-11'
34+
| 'gpt-4o-mini-search-preview-2025-03-11'
2635
| 'chatgpt-4o-latest'
2736
| 'gpt-4o-mini'
2837
| 'gpt-4o-mini-2024-07-18'
@@ -265,3 +274,11 @@ export interface ResponseFormatText {
265274
*/
266275
type: 'text';
267276
}
277+
278+
export type ResponsesModel =
279+
| (string & {})
280+
| ChatModel
281+
| 'o1-pro'
282+
| 'o1-pro-2025-03-19'
283+
| 'computer-use-preview'
284+
| 'computer-use-preview-2025-03-11';

0 commit comments

Comments
 (0)