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 @@
{
".": "2.10.0"
".": "2.11.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 137
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-88d85ff87ad8983262af2b729762a6e05fd509468bb691529bc2f81e4ce27c69.yml
openapi_spec_hash: 46a55acbccd0147534017b92c1f4dd99
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-41f98da99f44ebe6204fce5c1dc9940f85f3472779e797b674c4fdc20306c77d.yml
openapi_spec_hash: c61259027f421f501bdc6b23cf9e430e
config_hash: 141b101c9f13b90e21af74e1686f1f41
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.11.0 (2025-12-11)

Full Changelog: [v2.10.0...v2.11.0](https://github.com/openai/openai-python/compare/v2.10.0...v2.11.0)

### Features

* **api:** gpt 5.2 ([dd9b8e8](https://github.com/openai/openai-python/commit/dd9b8e85cf91fe0d7470143fba10fe950ec740c4))

## 2.10.0 (2025-12-10)

Full Changelog: [v2.9.0...v2.10.0](https://github.com/openai/openai-python/compare/v2.9.0...v2.10.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "2.10.0"
version = "2.11.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "2.10.0" # x-release-please-version
__version__ = "2.11.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/openai/resources/beta/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -323,7 +323,7 @@ def update(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -577,7 +577,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -792,7 +792,7 @@ async def update(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down
12 changes: 6 additions & 6 deletions src/openai/resources/beta/threads/runs/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -341,7 +341,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -499,7 +499,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -1633,7 +1633,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -1795,7 +1795,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down Expand Up @@ -1953,7 +1953,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
Expand Down
12 changes: 6 additions & 6 deletions src/openai/resources/chat/completions/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down Expand Up @@ -732,7 +732,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down Expand Up @@ -1034,7 +1034,7 @@ def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down Expand Up @@ -1907,7 +1907,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down Expand Up @@ -2218,7 +2218,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down Expand Up @@ -2520,7 +2520,7 @@ async def create(
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.

response_format: An object specifying the format that the model must output.

Expand Down
10 changes: 10 additions & 0 deletions src/openai/resources/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,11 @@ def compact(
*,
model: Union[
Literal[
"gpt-5.2",
"gpt-5.2-2025-12-11",
"gpt-5.2-chat-latest",
"gpt-5.2-pro",
"gpt-5.2-pro-2025-12-11",
"gpt-5.1",
"gpt-5.1-2025-11-13",
"gpt-5.1-codex",
Expand Down Expand Up @@ -3141,6 +3146,11 @@ async def compact(
*,
model: Union[
Literal[
"gpt-5.2",
"gpt-5.2-2025-12-11",
"gpt-5.2-chat-latest",
"gpt-5.2-pro",
"gpt-5.2-pro-2025-12-11",
"gpt-5.1",
"gpt-5.1-2025-11-13",
"gpt-5.1-codex",
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/beta/assistant_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AssistantCreateParams(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: Optional[AssistantResponseFormatOptionParam]
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/beta/assistant_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AssistantUpdateParams(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: Optional[AssistantResponseFormatOptionParam]
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/beta/threads/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class RunCreateParamsBase(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: Optional[AssistantResponseFormatOptionParam]
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class CompletionCreateParamsBase(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: ResponseFormat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class SamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: Optional[SamplingParamsResponseFormat] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class SamplingParams(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

response_format: SamplingParamsResponseFormat
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/evals/run_cancel_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class DataSourceResponsesSourceResponses(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

temperature: Optional[float] = None
Expand Down Expand Up @@ -278,7 +278,7 @@ class DataSourceResponsesSamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int] = None
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/evals/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class DataSourceCreateEvalResponsesRunDataSourceSourceResponses(TypedDict, total
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

temperature: Optional[float]
Expand Down Expand Up @@ -296,7 +296,7 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParams(TypedDict, total=
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: int
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/evals/run_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class DataSourceResponsesSourceResponses(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

temperature: Optional[float] = None
Expand Down Expand Up @@ -278,7 +278,7 @@ class DataSourceResponsesSamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int] = None
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/evals/run_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class DataSourceResponsesSourceResponses(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

temperature: Optional[float] = None
Expand Down Expand Up @@ -278,7 +278,7 @@ class DataSourceResponsesSamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int] = None
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/evals/run_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class DataSourceResponsesSourceResponses(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

temperature: Optional[float] = None
Expand Down Expand Up @@ -278,7 +278,7 @@ class DataSourceResponsesSamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int] = None
Expand Down
8 changes: 6 additions & 2 deletions src/openai/types/graders/score_model_grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SamplingParams(BaseModel):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int] = None
Expand All @@ -108,7 +108,11 @@ class ScoreModelGrader(BaseModel):
"""A ScoreModelGrader object that uses a model to assign a score to the input."""

input: List[Input]
"""The input text. This may include template strings."""
"""The input messages evaluated by the grader.

Supports text, output text, input image, and input audio content blocks, and may
include template strings.
"""

model: str
"""The model to use for the evaluation."""
Expand Down
8 changes: 6 additions & 2 deletions src/openai/types/graders/score_model_grader_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class SamplingParams(TypedDict, total=False):
- All models before `gpt-5.1` default to `medium` reasoning effort, and do not
support `none`.
- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
- `xhigh` is currently only supported for `gpt-5.1-codex-max`.
- `xhigh` is supported for all models after `gpt-5.1-codex-max`.
"""

seed: Optional[int]
Expand All @@ -114,7 +114,11 @@ class ScoreModelGraderParam(TypedDict, total=False):
"""A ScoreModelGrader object that uses a model to assign a score to the input."""

input: Required[Iterable[Input]]
"""The input text. This may include template strings."""
"""The input messages evaluated by the grader.
Supports text, output text, input image, and input audio content blocks, and may
include template strings.
"""

model: Required[str]
"""The model to use for the evaluation."""
Expand Down
Loading