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
12 changes: 6 additions & 6 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: d9e3b632-5822-43f8-a0de-0cd04d09db33
openapi_spec_hash: 687580b2f55d2dada661f0387a4b3e0d
openapi_transformed_spec_hash: 904296217a5077aa14766c6c58aa87d9
generation_id: 4bda3ef4-13a5-473f-b0cd-6fa6b69a0db8
openapi_spec_hash: 6fbcb590bdf88b5d464546b290ab35e7
openapi_transformed_spec_hash: 4e4a94f25153ab253178d6c098cb4f0e
config_hash: 84cdcc959ee7140cc9a65e9b642c097b
codegen_sha: 41ac0d43560df6c0983b529a6112e2c437ead2d1
codegen_hash: 614193cc88f476d3dbfe7d149d8adf21489f235af4454fb1e93628fe43e1e351
public_codegen_sha: 2722089d4e9342c45f1ddbda6e7b4b72511d961f
codegen_sha: c11ad8ad6a402c5cabfff79093c308035fe39644
codegen_hash: dc4765fced94aa65178e5fbda91d2844a712ac8d8e8b7fd8993fde98dbb1cb04
public_codegen_sha: d54ac7ae41705340870935d4d6484843cb5d9d29
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.19.1"
".": "3.19.2"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [3.19.2](https://github.com/openai/openai-python/compare/v3.19.1...v3.19.2) (2026-09-23)


### Bug Fixes

* preserve single files for fallback extraction paths ([#3875](https://github.com/openai/openai-python/issues/3875)) ([bfd3680](https://github.com/openai/openai-python/commit/bfd3680c8d3b715bb3175b82cd0fa1c1fb53162f))


### Chores

* **api:** clarify approximate web search location defaults ([#3953](https://github.com/openai/openai-python/issues/3953)) ([a95c95e](https://github.com/openai/openai-python/commit/a95c95ed372476168e9893723ff694ead5db8586))
* **api:** clarify Realtime modality array definitions ([#3954](https://github.com/openai/openai-python/issues/3954)) ([e79cf53](https://github.com/openai/openai-python/commit/e79cf53878b1d8580fac3a46e375eb98d9ca161d))
* **api:** correct fine-tuning bounds and Realtime response reference ([#3949](https://github.com/openai/openai-python/issues/3949)) ([325a948](https://github.com/openai/openai-python/commit/325a948a545add0201e082e778ca11b90ddb9426))

## [3.19.1](https://github.com/openai/openai-python/compare/v3.19.0...v3.19.1) (2026-09-23)


Expand Down
45 changes: 27 additions & 18 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36954,15 +36954,15 @@ components:
description: |
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
overfitting.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
title: Auto
- type: number
minimum: 0
exclusiveMinimum: true
exclusiveMinimum: 0
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one full cycle
Expand Down Expand Up @@ -41281,15 +41281,15 @@ components:
beta:
description: |
The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
- type: number
minimum: 0
maximum: 2
exclusiveMinimum: true
exclusiveMinimum: 0
batch_size:
description: |
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Expand All @@ -41305,14 +41305,14 @@ components:
learning_rate_multiplier:
description: |
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
- type: number
minimum: 0
exclusiveMinimum: true
exclusiveMinimum: 0
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
Expand Down Expand Up @@ -41369,14 +41369,14 @@ components:
learning_rate_multiplier:
description: |
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
- type: number
minimum: 0
exclusiveMinimum: true
exclusiveMinimum: 0
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
Expand All @@ -41402,15 +41402,15 @@ components:
compute_multiplier:
description: |
Multiplier on amount of compute used for exploring search space during training.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
- type: number
minimum: 0.00001
maximum: 10
exclusiveMinimum: true
exclusiveMinimum: 0.00001
eval_interval:
description: |
The number of training steps between evaluation runs.
Expand Down Expand Up @@ -41469,14 +41469,14 @@ components:
learning_rate_multiplier:
description: |
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
- type: number
minimum: 0
exclusiveMinimum: true
exclusiveMinimum: 0
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
Expand Down Expand Up @@ -41649,15 +41649,15 @@ components:
description: |
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
overfitting.
default: auto
anyOf:
- type: string
enum:
- auto
x-stainless-const: true
title: Auto
- type: number
minimum: 0
exclusiveMinimum: true
exclusiveMinimum: 0
n_epochs:
description: |
The number of epochs to train the model for. An epoch refers to one full cycle
Expand Down Expand Up @@ -51336,6 +51336,9 @@ components:
The session configuration for either a realtime or transcription session.
discriminator:
propertyName: type
mapping:
realtime: '#/components/schemas/RealtimeSessionCreateResponseGA'
transcription: '#/components/schemas/RealtimeTranscriptionSessionCreateResponseGA'
anyOf:
- $ref: '#/components/schemas/RealtimeSessionCreateResponseGA'
- $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateResponseGA'
Expand Down Expand Up @@ -54153,6 +54156,7 @@ components:
- realtime.session
description: The object type. Always `realtime.session`.
modalities:
type: array
description: |
The set of modalities the model can respond with. To disable audio,
set this to ["text"].
Expand Down Expand Up @@ -54366,6 +54370,7 @@ components:
- value
- expires_at
modalities:
type: array
description: |
The set of modalities the model can respond with. To disable audio,
set this to ["text"].
Expand Down Expand Up @@ -65318,7 +65323,9 @@ components:
- type: object
title: Web search approximate location
description: |
The approximate location of the user.
The approximate location of the user. If omitted or null, defaults to the
United States. To avoid this fallback, pass `{"type": "approximate"}` without
location fields. To localize results, provide the relevant location fields.
properties:
type:
type: string
Expand Down Expand Up @@ -68571,7 +68578,7 @@ components:
user_location:
anyOf:
- $ref: '#/components/schemas/ApproximateLocation'
description: The user's location.
description: 'The approximate location of the user. If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.'
- type: 'null'
search_context_size:
$ref: '#/components/schemas/SearchContextSize'
Expand Down Expand Up @@ -84506,7 +84513,7 @@ components:
user_location:
anyOf:
- $ref: '#/components/schemas/BetaApproximateLocation'
description: The user's location.
description: 'The approximate location of the user. If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.'
- type: 'null'
search_context_size:
$ref: '#/components/schemas/BetaSearchContextSize'
Expand Down Expand Up @@ -85479,7 +85486,9 @@ components:
- type: object
title: Web search approximate location
description: |
The approximate location of the user.
The approximate location of the user. If omitted or null, defaults to the
United States. To avoid this fallback, pass `{"type": "approximate"}` without
location fields. To localize results, provide the relevant location fields.
properties:
type:
type: string
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 = "3.19.1"
version = "3.19.2"
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/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _extract_items(
try:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
if all(p == "<array>" for p in path[index:]) and (index == len(path) or is_list(obj[key])):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__title__ = "openai"
__version__ = "3.19.1" # x-release-please-version
__version__ = "3.19.2" # x-release-please-version
12 changes: 10 additions & 2 deletions src/openai/types/beta/beta_web_search_preview_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@


class UserLocation(BaseModel):
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.
"""

type: Literal["approximate"]
"""The type of location approximation. Always `approximate`."""
Expand Down Expand Up @@ -55,4 +58,9 @@ class BetaWebSearchPreviewTool(BaseModel):
"""

user_location: Optional[UserLocation] = None
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
12 changes: 10 additions & 2 deletions src/openai/types/beta/beta_web_search_preview_tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@


class UserLocation(TypedDict, total=False):
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.
"""

type: Required[Literal["approximate"]]
"""The type of location approximation. Always `approximate`."""
Expand Down Expand Up @@ -55,4 +58,9 @@ class BetaWebSearchPreviewToolParam(TypedDict, total=False):
"""

user_location: Optional[UserLocation]
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
14 changes: 12 additions & 2 deletions src/openai/types/beta/beta_web_search_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ class Filters(BaseModel):


class UserLocation(BaseModel):
"""The approximate location of the user."""
"""The approximate location of the user.

If omitted or null, defaults to the
United States. To avoid this fallback, pass `{"type": "approximate"}` without
location fields. To localize results, provide the relevant location fields.
"""

city: Optional[str] = None
"""Free text input for the city of the user, e.g. `San Francisco`."""
Expand Down Expand Up @@ -77,4 +82,9 @@ class BetaWebSearchTool(BaseModel):
"""

user_location: Optional[UserLocation] = None
"""The approximate location of the user."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
14 changes: 12 additions & 2 deletions src/openai/types/beta/beta_web_search_tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ class Filters(TypedDict, total=False):


class UserLocation(TypedDict, total=False):
"""The approximate location of the user."""
"""The approximate location of the user.

If omitted or null, defaults to the
United States. To avoid this fallback, pass `{"type": "approximate"}` without
location fields. To localize results, provide the relevant location fields.
"""

city: Optional[str]
"""Free text input for the city of the user, e.g. `San Francisco`."""
Expand Down Expand Up @@ -79,4 +84,9 @@ class BetaWebSearchToolParam(TypedDict, total=False):
"""

user_location: Optional[UserLocation]
"""The approximate location of the user."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
12 changes: 10 additions & 2 deletions src/openai/types/responses/web_search_preview_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@


class UserLocation(BaseModel):
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.
"""

type: Literal["approximate"]
"""The type of location approximation. Always `approximate`."""
Expand Down Expand Up @@ -55,4 +58,9 @@ class WebSearchPreviewTool(BaseModel):
"""

user_location: Optional[UserLocation] = None
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
12 changes: 10 additions & 2 deletions src/openai/types/responses/web_search_preview_tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@


class UserLocation(TypedDict, total=False):
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.
"""

type: Required[Literal["approximate"]]
"""The type of location approximation. Always `approximate`."""
Expand Down Expand Up @@ -55,4 +58,9 @@ class WebSearchPreviewToolParam(TypedDict, total=False):
"""

user_location: Optional[UserLocation]
"""The user's location."""
"""The approximate location of the user.

If omitted or null, defaults to the United States. To avoid this fallback, pass
`{"type": "approximate"}` without location fields. To localize results, provide
the relevant location fields.
"""
Loading
Loading