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
10 changes: 5 additions & 5 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version: 1
generation_id: 0c2924ad-3d75-402c-b2a0-8ada82e1eb30
openapi_spec_hash: 4a78b0a569e983cfa84f047eb35b7cef
openapi_transformed_spec_hash: ea8e29bb1c978d3c90da2d514cc3b195
generation_id: 8defad98-453a-468b-8464-781e09fd2762
openapi_spec_hash: bf74c2ea8d8af0a1b2420a9507ce4c86
openapi_transformed_spec_hash: fd3d7f02692ebe761c69b0271e4c0335
config_hash: 98b84a99474d4d011c1aaa92435f067a
codegen_sha: 80b1fc2610ba0909f9274a594d23a6be63eb675d
codegen_hash: c6dad89cac7037b2609aacd9ab2004f3d0bb42a44bcd5862261dd9acf1c5b114
codegen_sha: 72337d33ad3b239e57dd5963ff8e6223272acad4
codegen_hash: 8ec58a11d0a9e1f5ac7c424a6b3371149dde4d3565d15aa6813c4bbb330adb8b
2,085 changes: 1,039 additions & 1,046 deletions api_reference/openapi.transformed.yml

Large diffs are not rendered by default.

122 changes: 61 additions & 61 deletions scripts/castiron/generated-files.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal

import httpx2

from ..... import _legacy_response
from ....._types import Body, Query, Headers, NotGiven, not_given
from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ....._utils import path_template, maybe_transform, async_maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
Expand Down Expand Up @@ -84,6 +85,7 @@ def update(
currency: Literal["USD"],
interval: Literal["month"],
threshold_amount: int,
notification_channel: Optional[spend_limit_update_params.NotificationChannel] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -102,6 +104,9 @@ def update(

threshold_amount: The hard spend limit amount, in cents.

notification_channel: Configure email notifications when the spend limit is reached. Leave this out to
keep the current settings, or send null to reset to owner-only notifications.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -119,6 +124,7 @@ def update(
"currency": currency,
"interval": interval,
"threshold_amount": threshold_amount,
"notification_channel": notification_channel,
},
spend_limit_update_params.SpendLimitUpdateParams,
),
Expand Down Expand Up @@ -234,6 +240,7 @@ async def update(
currency: Literal["USD"],
interval: Literal["month"],
threshold_amount: int,
notification_channel: Optional[spend_limit_update_params.NotificationChannel] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -252,6 +259,9 @@ async def update(

threshold_amount: The hard spend limit amount, in cents.

notification_channel: Configure email notifications when the spend limit is reached. Leave this out to
keep the current settings, or send null to reset to owner-only notifications.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -269,6 +279,7 @@ async def update(
"currency": currency,
"interval": interval,
"threshold_amount": threshold_amount,
"notification_channel": notification_channel,
},
spend_limit_update_params.SpendLimitUpdateParams,
),
Expand Down
13 changes: 12 additions & 1 deletion src/openai/resources/admin/organization/spend_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal

import httpx2

from .... import _legacy_response
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
Expand Down Expand Up @@ -69,6 +70,7 @@ def update(
currency: Literal["USD"],
interval: Literal["month"],
threshold_amount: int,
notification_channel: Optional[spend_limit_update_params.NotificationChannel] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -87,6 +89,9 @@ def update(

threshold_amount: The hard spend limit amount, in cents.

notification_channel: Configure email notifications when the spend limit is reached. Leave this out to
keep the current settings, or send null to reset to owner-only notifications.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -102,6 +107,7 @@ def update(
"currency": currency,
"interval": interval,
"threshold_amount": threshold_amount,
"notification_channel": notification_channel,
},
spend_limit_update_params.SpendLimitUpdateParams,
),
Expand Down Expand Up @@ -188,6 +194,7 @@ async def update(
currency: Literal["USD"],
interval: Literal["month"],
threshold_amount: int,
notification_channel: Optional[spend_limit_update_params.NotificationChannel] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -206,6 +213,9 @@ async def update(

threshold_amount: The hard spend limit amount, in cents.

notification_channel: Configure email notifications when the spend limit is reached. Leave this out to
keep the current settings, or send null to reset to owner-only notifications.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -221,6 +231,7 @@ async def update(
"currency": currency,
"interval": interval,
"threshold_amount": threshold_amount,
"notification_channel": notification_channel,
},
spend_limit_update_params.SpendLimitUpdateParams,
),
Expand Down
4 changes: 2 additions & 2 deletions src/openai/resources/admin/organization/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def costs(
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-6-astra, input_tokens`.
complete `line_item` value, for example `gpt-6.2-astra, input_tokens`.

page: A cursor for use in pagination. Corresponding to the `next_page` field from the
previous response.
Expand Down Expand Up @@ -1517,7 +1517,7 @@ async def costs(
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-6-astra, input_tokens`.
complete `line_item` value, for example `gpt-6.2-astra, input_tokens`.

page: A cursor for use in pagination. Corresponding to the `next_page` field from the
previous response.
Expand Down
12 changes: 8 additions & 4 deletions src/openai/resources/beta/agents/sessions/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def list(
"""
Lists published root-turn traces as OTLP JSON, ordered by turn creation time and
ID. Unpublished traces are skipped. Each page returns data available when read;
it does not wait for late traces. Trace reads and the JSON response are limited
to 16 MiB per request. If the limit is exceeded, request fewer traces.
it does not wait for late traces. Pages may contain fewer traces than requested
to fit the 16 MiB response limit. When `has_more` is true, pass `last_id` as
`after` to continue. If the first trace exceeds 16 MiB before conversion or
cannot fit on a page by itself, the API returns a `trace_too_large` error.

Args:
after: Return resources after this resource ID in the selected order.
Expand Down Expand Up @@ -140,8 +142,10 @@ def list(
"""
Lists published root-turn traces as OTLP JSON, ordered by turn creation time and
ID. Unpublished traces are skipped. Each page returns data available when read;
it does not wait for late traces. Trace reads and the JSON response are limited
to 16 MiB per request. If the limit is exceeded, request fewer traces.
it does not wait for late traces. Pages may contain fewer traces than requested
to fit the 16 MiB response limit. When `has_more` is true, pass `last_id` as
`after` to continue. If the first trace exceeds 16 MiB before conversion or
cannot fit on a page by itself, the API returns a `trace_too_large` error.

Args:
after: Return resources after this resource ID in the selected order.
Expand Down
56 changes: 32 additions & 24 deletions src/openai/resources/beta/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -884,9 +884,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -1390,9 +1390,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -2283,6 +2283,7 @@ def compact(
prompt_cache_key: Optional[str] | Omit = omit,
prompt_cache_options: Optional[response_compact_params.PromptCacheOptions] | Omit = omit,
prompt_cache_retention: Optional[Literal["in_memory", "24h"]] | Omit = omit,
safety_identifier: Optional[str] | Omit = omit,
service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] | Omit = omit,
betas: List[Literal["responses_multi_agent=v1"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -2302,9 +2303,9 @@ def compact(
[Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).

Args:
model: Model ID used to generate the response, like `gpt-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -2413,6 +2414,8 @@ def compact(

prompt_cache_retention: How long to retain a prompt cache entry created by this request.

safety_identifier: A stable identifier used for safety monitoring and abuse detection.

service_tier: Specifies the processing type used for serving the request. - If set to 'auto',
then the request will be processed with the service tier configured in the
Project settings. Unless otherwise configured, the Project will use 'default'. -
Expand Down Expand Up @@ -2455,6 +2458,7 @@ def compact(
"prompt_cache_key": prompt_cache_key,
"prompt_cache_options": prompt_cache_options,
"prompt_cache_retention": prompt_cache_retention,
"safety_identifier": safety_identifier,
},
response_compact_params.ResponseCompactParams,
),
Expand Down Expand Up @@ -2782,9 +2786,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -3295,9 +3299,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -3801,9 +3805,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-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -4694,6 +4698,7 @@ async def compact(
prompt_cache_key: Optional[str] | Omit = omit,
prompt_cache_options: Optional[response_compact_params.PromptCacheOptions] | Omit = omit,
prompt_cache_retention: Optional[Literal["in_memory", "24h"]] | Omit = omit,
safety_identifier: Optional[str] | Omit = omit,
service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] | Omit = omit,
betas: List[Literal["responses_multi_agent=v1"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -4713,9 +4718,9 @@ async def compact(
[Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).

Args:
model: Model ID used to generate the response, like `gpt-6-astra`. 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-6.2-astra`. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
[model guide](https://developers.openai.com/api/docs/models) to browse and
compare available models.

Expand Down Expand Up @@ -4824,6 +4829,8 @@ async def compact(

prompt_cache_retention: How long to retain a prompt cache entry created by this request.

safety_identifier: A stable identifier used for safety monitoring and abuse detection.

service_tier: Specifies the processing type used for serving the request. - If set to 'auto',
then the request will be processed with the service tier configured in the
Project settings. Unless otherwise configured, the Project will use 'default'. -
Expand Down Expand Up @@ -4866,6 +4873,7 @@ async def compact(
"prompt_cache_key": prompt_cache_key,
"prompt_cache_options": prompt_cache_options,
"prompt_cache_retention": prompt_cache_retention,
"safety_identifier": safety_identifier,
},
response_compact_params.ResponseCompactParams,
),
Expand Down
Loading
Loading