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,7 +1,7 @@
schema_version: 1
generation_id: a703ecb8-183a-4c22-8e77-18203e398b8f
openapi_spec_hash: 52d15bd95ffcc576831a8ca7e180916c
openapi_transformed_spec_hash: 77b815b67f6981a5aa066591d9dac163
config_hash: 01f2d28b82141ac460c9d9e8cc45ee74
codegen_sha: 1b8f9204c450821b2b1348d998e8dff20643c92a
codegen_hash: 0c31d87d7acc6add6f5302e2333d8b49f1bb678b7187c171e8b00dbe8ca2e4ea
generation_id: 728acbb1-0215-430b-b809-3c94b73fb7b8
openapi_spec_hash: 95b8b142415913b5a7beac665b74dc0e
openapi_transformed_spec_hash: cf6502e7d6d450e285f5c23128167142
config_hash: 324072e5fd63aac926519c90531b7789
codegen_sha: 1bfd60377b278b5cfc5951d897167a214956e45f
codegen_hash: 40ffb85d504b3e11a9ed15284f95e25c428d534a5072a5164e5b23cdb1d70cfc
1,261 changes: 661 additions & 600 deletions api_reference/openapi.transformed.yml

Large diffs are not rendered by default.

106 changes: 55 additions & 51 deletions scripts/castiron/generated-files.json

Large diffs are not rendered by default.

106 changes: 104 additions & 2 deletions src/openai/resources/admin/organization/external_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,48 @@ def create(
"""
...

@overload
def create(
self,
*,
key_ocid: str,
name: str,
region: str,
type: Literal["oci"],
vault_ocid: str,
key_version_ocid: str | Omit = omit,
purpose: Union[Literal["ekm"], Literal["psp_decryption"]] | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx2.Timeout | None | NotGiven = not_given,
) -> ExternalKey:
"""
Add an external key config for an organization
Args:
key_ocid: The OCI Vault key OCID
name: A friendly name to identify this config
region: The OCI region containing the vault
vault_ocid: The customer OCI Vault OCID
key_version_ocid: The exact OCI key version OCID for PSP decryption.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
"""
...

@required_args(
["external_id", "kms_arn", "name", "role_arn", "type"],
[
Expand All @@ -202,6 +244,7 @@ def create(
"workload_identity_provider_id",
],
["key_name", "name", "tenant_id", "type", "vault_uri"],
["key_ocid", "name", "region", "type", "vault_ocid"],
)
def create(
self,
Expand All @@ -210,7 +253,7 @@ def create(
kms_arn: str | Omit = omit,
name: str,
role_arn: str | Omit = omit,
type: Literal["aws"] | Literal["gcp"] | Literal["azure"],
type: Literal["aws"] | Literal["gcp"] | Literal["azure"] | Literal["oci"],
purpose: Union[Literal["ekm"], Literal["psp_decryption"]] | Omit = omit,
audience: str | Omit = omit,
kms_key_location: str | Omit = omit,
Expand All @@ -225,6 +268,10 @@ def create(
tenant_id: str | Omit = omit,
vault_uri: str | Omit = omit,
key_version: str | Omit = omit,
key_ocid: str | Omit = omit,
region: str | Omit = omit,
vault_ocid: str | Omit = omit,
key_version_ocid: str | 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 Down Expand Up @@ -255,6 +302,10 @@ def create(
"tenant_id": tenant_id,
"vault_uri": vault_uri,
"key_version": key_version,
"key_ocid": key_ocid,
"region": region,
"vault_ocid": vault_ocid,
"key_version_ocid": key_version_ocid,
},
external_key_create_params.ExternalKeyCreateParams,
),
Expand Down Expand Up @@ -595,6 +646,48 @@ async def create(
"""
...

@overload
async def create(
self,
*,
key_ocid: str,
name: str,
region: str,
type: Literal["oci"],
vault_ocid: str,
key_version_ocid: str | Omit = omit,
purpose: Union[Literal["ekm"], Literal["psp_decryption"]] | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx2.Timeout | None | NotGiven = not_given,
) -> ExternalKey:
"""
Add an external key config for an organization
Args:
key_ocid: The OCI Vault key OCID
name: A friendly name to identify this config
region: The OCI region containing the vault
vault_ocid: The customer OCI Vault OCID
key_version_ocid: The exact OCI key version OCID for PSP decryption.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
"""
...

@required_args(
["external_id", "kms_arn", "name", "role_arn", "type"],
[
Expand All @@ -610,6 +703,7 @@ async def create(
"workload_identity_provider_id",
],
["key_name", "name", "tenant_id", "type", "vault_uri"],
["key_ocid", "name", "region", "type", "vault_ocid"],
)
async def create(
self,
Expand All @@ -618,7 +712,7 @@ async def create(
kms_arn: str | Omit = omit,
name: str,
role_arn: str | Omit = omit,
type: Literal["aws"] | Literal["gcp"] | Literal["azure"],
type: Literal["aws"] | Literal["gcp"] | Literal["azure"] | Literal["oci"],
purpose: Union[Literal["ekm"], Literal["psp_decryption"]] | Omit = omit,
audience: str | Omit = omit,
kms_key_location: str | Omit = omit,
Expand All @@ -633,6 +727,10 @@ async def create(
tenant_id: str | Omit = omit,
vault_uri: str | Omit = omit,
key_version: str | Omit = omit,
key_ocid: str | Omit = omit,
region: str | Omit = omit,
vault_ocid: str | Omit = omit,
key_version_ocid: str | 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 Down Expand Up @@ -663,6 +761,10 @@ async def create(
"tenant_id": tenant_id,
"vault_uri": vault_uri,
"key_version": key_version,
"key_ocid": key_ocid,
"region": region,
"vault_ocid": vault_ocid,
"key_version_ocid": key_version_ocid,
},
external_key_create_params.ExternalKeyCreateParams,
),
Expand Down
36 changes: 28 additions & 8 deletions src/openai/resources/beta/agents/sessions/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream: Literal[False] | Omit = omit,
Expand All @@ -187,6 +188,7 @@ def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream_options: session_create_params.StreamOptions | Omit = omit,
Expand All @@ -209,6 +211,7 @@ def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream_options: session_create_params.StreamOptions | Omit = omit,
Expand All @@ -230,6 +233,7 @@ def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream: Literal[False] | Literal[True] | Omit = omit,
Expand All @@ -250,6 +254,7 @@ def create(
"agent_id": agent_id,
"input": input,
"metadata": metadata,
"prompt_cache_options": prompt_cache_options,
"review": review,
"spend_control": spend_control,
"stream_options": stream_options,
Expand Down Expand Up @@ -328,6 +333,7 @@ def update(
*,
agent: session_update_params.Agent | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_update_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_update_params.SpendControl] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -337,10 +343,10 @@ def update(
extra_body: Body | None = None,
timeout: float | httpx2.Timeout | None | NotGiven = not_given,
) -> AgentSession:
"""Updates session tools, metadata, model, reasoning effort, or service tier.
Model
settings apply to subsequent turns. Omitted fields are unchanged. See
"""
Updates session tools, metadata, model, reasoning effort, service tier, or the
default prompt cache lifetime. Model settings apply to subsequent turns. Omitted
fields are unchanged. See
[managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
Args:
Expand All @@ -350,6 +356,9 @@ def update(
Up to 16 string key-value pairs, with keys up to 64 and values up to 512
characters.
prompt_cache_options: Default prompt cache lifetime for future turns. Send null to clear the session
default.
review: Default action review for new root turns. Existing turns and their subagents
keep their review mode.
Expand Down Expand Up @@ -377,6 +386,7 @@ def update(
{
"agent": agent,
"metadata": metadata,
"prompt_cache_options": prompt_cache_options,
"review": review,
"spend_control": spend_control,
},
Expand Down Expand Up @@ -592,6 +602,7 @@ async def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream: Literal[False] | Omit = omit,
Expand All @@ -615,6 +626,7 @@ async def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream_options: session_create_params.StreamOptions | Omit = omit,
Expand All @@ -637,6 +649,7 @@ async def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream_options: session_create_params.StreamOptions | Omit = omit,
Expand All @@ -658,6 +671,7 @@ async def create(
agent_id: str | Omit = omit,
input: Union[str, Iterable[AgentSessionInputMessageParam], None] | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_create_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_create_params.SpendControl] | Omit = omit,
stream: Literal[False] | Literal[True] | Omit = omit,
Expand All @@ -678,6 +692,7 @@ async def create(
"agent_id": agent_id,
"input": input,
"metadata": metadata,
"prompt_cache_options": prompt_cache_options,
"review": review,
"spend_control": spend_control,
"stream_options": stream_options,
Expand Down Expand Up @@ -756,6 +771,7 @@ async def update(
*,
agent: session_update_params.Agent | Omit = omit,
metadata: Optional[Dict[str, str]] | Omit = omit,
prompt_cache_options: Optional[session_update_params.PromptCacheOptions] | Omit = omit,
review: Literal["none", "auto_review"] | Omit = omit,
spend_control: Optional[session_update_params.SpendControl] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -765,10 +781,10 @@ async def update(
extra_body: Body | None = None,
timeout: float | httpx2.Timeout | None | NotGiven = not_given,
) -> AgentSession:
"""Updates session tools, metadata, model, reasoning effort, or service tier.
Model
settings apply to subsequent turns. Omitted fields are unchanged. See
"""
Updates session tools, metadata, model, reasoning effort, service tier, or the
default prompt cache lifetime. Model settings apply to subsequent turns. Omitted
fields are unchanged. See
[managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
Args:
Expand All @@ -778,6 +794,9 @@ async def update(
Up to 16 string key-value pairs, with keys up to 64 and values up to 512
characters.
prompt_cache_options: Default prompt cache lifetime for future turns. Send null to clear the session
default.
review: Default action review for new root turns. Existing turns and their subagents
keep their review mode.
Expand Down Expand Up @@ -805,6 +824,7 @@ async def update(
{
"agent": agent,
"metadata": metadata,
"prompt_cache_options": prompt_cache_options,
"review": review,
"spend_control": spend_control,
},
Expand Down
28 changes: 18 additions & 10 deletions src/openai/resources/beta/responses/input_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@ def count(
tools: An array of tools the model may call while generating a response. You can
specify which tool to use by setting the `tool_choice` parameter.
truncation: The truncation strategy to use for the model response. - `auto`: If the input to
this Response exceeds the model's context window size, the model will truncate
the response to fit the context window by dropping items from the beginning of
the conversation. - `disabled` (default): If the input size will exceed the
context window size for a model, the request will fail with a 400 error.
truncation: The truncation strategy to use for the model response.
- `auto`: If the input to this Response exceeds the model's context window size,
the model will truncate the response to fit the context window by dropping
items from the beginning of the conversation. On some models, trimming can
begin earlier because the API subtracts the model's maximum output allowance
from its input limit before counting tokens.
- `disabled` (default): If the input size will exceed the context window size
for a model, the request will fail with a 400 error.
extra_headers: Send extra headers
Expand Down Expand Up @@ -260,11 +264,15 @@ async def count(
tools: An array of tools the model may call while generating a response. You can
specify which tool to use by setting the `tool_choice` parameter.
truncation: The truncation strategy to use for the model response. - `auto`: If the input to
this Response exceeds the model's context window size, the model will truncate
the response to fit the context window by dropping items from the beginning of
the conversation. - `disabled` (default): If the input size will exceed the
context window size for a model, the request will fail with a 400 error.
truncation: The truncation strategy to use for the model response.
- `auto`: If the input to this Response exceeds the model's context window size,
the model will truncate the response to fit the context window by dropping
items from the beginning of the conversation. On some models, trimming can
begin earlier because the API subtracts the model's maximum output allowance
from its input limit before counting tokens.
- `disabled` (default): If the input size will exceed the context window size
for a model, the request will fail with a 400 error.
extra_headers: Send extra headers
Expand Down
Loading
Loading