Skip to content

Commit 40a19d8

Browse files
stainless-app[bot]meorphis
authored and
meorphis
committedMar 19, 2025
feat(api): o1-pro now available through the API (#2228)
1 parent bff8da9 commit 40a19d8

15 files changed

+1868
-24
lines changed
 

‎.stats.yml

+1-1
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

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
```python
44
from openai.types import (
5+
AllModels,
56
ChatModel,
67
ComparisonFilter,
78
CompoundFilter,
@@ -14,6 +15,7 @@ from openai.types import (
1415
ResponseFormatJSONObject,
1516
ResponseFormatJSONSchema,
1617
ResponseFormatText,
18+
ResponsesModel,
1719
)
1820
```
1921

‎src/openai/resources/responses/responses.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from ...types.responses.parsed_response import ParsedResponse
4545
from ...lib.streaming.responses._responses import ResponseStreamManager, AsyncResponseStreamManager
4646
from ...types.responses.response_includable import ResponseIncludable
47+
from ...types.shared_params.responses_model import ResponsesModel
4748
from ...types.responses.response_input_param import ResponseInputParam
4849
from ...types.responses.response_stream_event import ResponseStreamEvent
4950
from ...types.responses.response_text_config_param import ResponseTextConfigParam
@@ -80,7 +81,7 @@ def create(
8081
self,
8182
*,
8283
input: Union[str, ResponseInputParam],
83-
model: Union[str, ChatModel],
84+
model: ResponsesModel,
8485
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
8586
instructions: Optional[str] | NotGiven = NOT_GIVEN,
8687
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -245,7 +246,7 @@ def create(
245246
self,
246247
*,
247248
input: Union[str, ResponseInputParam],
248-
model: Union[str, ChatModel],
249+
model: ResponsesModel,
249250
stream: Literal[True],
250251
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
251252
instructions: Optional[str] | NotGiven = NOT_GIVEN,
@@ -410,7 +411,7 @@ def create(
410411
self,
411412
*,
412413
input: Union[str, ResponseInputParam],
413-
model: Union[str, ChatModel],
414+
model: ResponsesModel,
414415
stream: bool,
415416
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
416417
instructions: Optional[str] | NotGiven = NOT_GIVEN,
@@ -575,7 +576,7 @@ def create(
575576
self,
576577
*,
577578
input: Union[str, ResponseInputParam],
578-
model: Union[str, ChatModel],
579+
model: ResponsesModel,
579580
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
580581
instructions: Optional[str] | NotGiven = NOT_GIVEN,
581582
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -892,7 +893,7 @@ async def create(
892893
self,
893894
*,
894895
input: Union[str, ResponseInputParam],
895-
model: Union[str, ChatModel],
896+
model: ResponsesModel,
896897
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
897898
instructions: Optional[str] | NotGiven = NOT_GIVEN,
898899
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -1057,7 +1058,7 @@ async def create(
10571058
self,
10581059
*,
10591060
input: Union[str, ResponseInputParam],
1060-
model: Union[str, ChatModel],
1061+
model: ResponsesModel,
10611062
stream: Literal[True],
10621063
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
10631064
instructions: Optional[str] | NotGiven = NOT_GIVEN,
@@ -1222,7 +1223,7 @@ async def create(
12221223
self,
12231224
*,
12241225
input: Union[str, ResponseInputParam],
1225-
model: Union[str, ChatModel],
1226+
model: ResponsesModel,
12261227
stream: bool,
12271228
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
12281229
instructions: Optional[str] | NotGiven = NOT_GIVEN,
@@ -1387,7 +1388,7 @@ async def create(
13871388
self,
13881389
*,
13891390
input: Union[str, ResponseInputParam],
1390-
model: Union[str, ChatModel],
1391+
model: ResponsesModel,
13911392
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
13921393
instructions: Optional[str] | NotGiven = NOT_GIVEN,
13931394
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,

0 commit comments

Comments
 (0)