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
14 changes: 7 additions & 7 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: dd4c6a7b-158a-4b11-9b4a-128435aaa1f0
openapi_spec_hash: 4af7018ff56446e0398fc7946a92680f
openapi_transformed_spec_hash: b2689771e08c3fdc6ae8f0433dc2c784
config_hash: 5c00fe18ea913ed0186f9894adc02a70
codegen_sha: 9bc71a62e18aa941ba073325f46e29ff05e1e90c
codegen_hash: 803a072c019069cce4b17ef21da0980c4d6086b7ba935ff45b9d8b9f00d7acdd
public_codegen_sha: 734497bdc1d37e9709c026b67eaec668fe37f753
generation_id: ee9a1017-930f-49f4-9724-5633d30d1c71
openapi_spec_hash: 0ba3e4acd88b521d832e2a42d5471e00
openapi_transformed_spec_hash: 0a6002520553b981f4c0bf6555a0a623
config_hash: d8813efd847d1966dd7f03bb648c41dc
codegen_sha: 7df32a6b1fe20434a95b0c9bbeb981810f5f3d20
codegen_hash: 37a95ae987fcdd52ebbc324b4fa6aee8c76099df8af4b97250fb4ca5cf36965d
public_codegen_sha: 86966c00928eccb2f77611935d572af7edd15619
733 changes: 351 additions & 382 deletions api_reference/openapi.transformed.yml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/openai/resources/admin/organization/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ def costs(
end_time: int | Omit = omit,
group_by: List[Literal["project_id", "line_item", "api_key_id"]] | Omit = omit,
limit: int | Omit = omit,
line_items: SequenceNotStr[str] | Omit = omit,
page: str | Omit = omit,
project_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -437,6 +438,9 @@ def costs(
limit: A limit on the number of buckets to be returned. Limit can range between 1 and
180, and the default is 7.

line_items: Return only costs for these exact line item names. Each value must match the
complete `line_item` value, for example `gpt-5.6-sol, input_tokens`.

page: A cursor for use in pagination. Corresponding to the `next_page` field from the
previous response.

Expand Down Expand Up @@ -465,6 +469,7 @@ def costs(
"end_time": end_time,
"group_by": group_by,
"limit": limit,
"line_items": line_items,
"page": page,
"project_ids": project_ids,
},
Expand Down Expand Up @@ -1364,6 +1369,7 @@ async def costs(
end_time: int | Omit = omit,
group_by: List[Literal["project_id", "line_item", "api_key_id"]] | Omit = omit,
limit: int | Omit = omit,
line_items: SequenceNotStr[str] | Omit = omit,
page: str | Omit = omit,
project_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -1392,6 +1398,9 @@ async def costs(
limit: A limit on the number of buckets to be returned. Limit can range between 1 and
180, and the default is 7.

line_items: Return only costs for these exact line item names. Each value must match the
complete `line_item` value, for example `gpt-5.6-sol, input_tokens`.

page: A cursor for use in pagination. Corresponding to the `next_page` field from the
previous response.

Expand Down Expand Up @@ -1420,6 +1429,7 @@ async def costs(
"end_time": end_time,
"group_by": group_by,
"limit": limit,
"line_items": line_items,
"page": page,
"project_ids": project_ids,
},
Expand Down
72 changes: 30 additions & 42 deletions src/openai/resources/beta/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -382,9 +382,7 @@ def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -733,9 +731,9 @@ def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -785,9 +783,7 @@ def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -1129,9 +1125,9 @@ def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -1181,9 +1177,7 @@ def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -1917,9 +1911,9 @@ def compact(
[Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).

Args:
model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -2285,9 +2279,9 @@ async def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -2337,9 +2331,7 @@ async def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -2688,9 +2680,9 @@ async def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -2740,9 +2732,7 @@ async def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -3084,9 +3074,9 @@ async def create(
Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -3136,9 +3126,7 @@ async def create(
- Organizations with ZDR enabled default to `in_memory` when
`prompt_cache_retention` is not specified.

reasoning: **gpt-5 and o-series models only**

Configuration options for
reasoning: Configuration options for
[reasoning models](https://platform.openai.com/docs/guides/reasoning).

safety_identifier: A stable identifier used to help detect users of your application that may be
Expand Down Expand Up @@ -3872,9 +3860,9 @@ async def compact(
[Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).

Args:
model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
range of models with different capabilities, performance characteristics, and
price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down
36 changes: 18 additions & 18 deletions src/openai/resources/chat/completions/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -658,9 +658,9 @@ def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -990,9 +990,9 @@ def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -1937,9 +1937,9 @@ async def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -2269,9 +2269,9 @@ async def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down Expand Up @@ -2601,9 +2601,9 @@ async def create(
[images](https://platform.openai.com/docs/guides/vision), and
[audio](https://platform.openai.com/docs/guides/audio).

model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model: Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

Expand Down
Loading
Loading