diff --git a/.castiron.stats.yml b/.castiron.stats.yml index e9b9830a3b..114f8be469 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -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: 8201fc3a-01b9-4448-881a-235175bb31dc +openapi_spec_hash: fab08c2fec3b3d48fe3dacb03a098e44 +openapi_transformed_spec_hash: 3aaecb059340443ef1b2d783439b1a10 config_hash: 84cdcc959ee7140cc9a65e9b642c097b -codegen_sha: 41ac0d43560df6c0983b529a6112e2c437ead2d1 -codegen_hash: 614193cc88f476d3dbfe7d149d8adf21489f235af4454fb1e93628fe43e1e351 -public_codegen_sha: 2722089d4e9342c45f1ddbda6e7b4b72511d961f +codegen_sha: bf96e48cbc295253520266217a5d104556d06abc +codegen_hash: 9b9fdfdef42eee49f4577fc0dfa1cde9a88c29e47cf9222ff99a356e5466a6a0 +public_codegen_sha: 83d8728da764f7328630ba3faae435bb5b7cd9c3 diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index fdf4896149..6e884e94d4 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -28461,8 +28461,8 @@ paths: $ref: '#/components/schemas/ErrorResponse-2' post: operationId: rotateVaultCredential - summary: Rotate a vault credential - description: Rotates a vault credential's write-only secret and returns only credential metadata. See [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults). + summary: Update a vault credential + description: Updates credential metadata or rotates its write-only secret. See [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults). tags: - Vaults parameters: @@ -28489,7 +28489,7 @@ paths: $ref: '#/components/schemas/RotateVaultCredentialParams' responses: '200': - description: The rotated vault credential without secret values. + description: The updated vault credential without secret values. content: application/json: schema: @@ -35529,6 +35529,7 @@ components: propertyName: type seed: type: integer + format: int64 minimum: -9223372036854775808 maximum: 9223372036854775807 nullable: true @@ -35539,7 +35540,6 @@ components: Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. x-oaiMeta: beta: true - format: int64 stream_options: $ref: '#/components/schemas/ChatCompletionStreamOptions' tools: @@ -65416,6 +65416,10 @@ components: - type: 'null' user_location: $ref: '#/components/schemas/WebSearchApproximateLocation' + 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. search_context_size: type: string enum: @@ -68571,7 +68575,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' @@ -81281,6 +81285,16 @@ components: auth: $ref: '#/components/schemas/VaultCredentialAuthResource' description: The authentication method and non-secret configuration of the credential. + metadata: + type: object + additionalProperties: + type: string + minLength: 0 + propertyNames: + type: string + minLength: 0 + minProperties: 0 + description: Application-defined key-value pairs associated with this credential. created_at: type: integer format: int64 @@ -81295,6 +81309,7 @@ components: - vault_id - name - auth + - metadata - created_at - updated_at additionalProperties: false @@ -81623,6 +81638,19 @@ components: auth: $ref: '#/components/schemas/CreateVaultCredentialAuthParam' description: The authentication method and write-only secret values to store. + metadata: + type: object + additionalProperties: + type: string + minLength: 0 + maxLength: 512 + propertyNames: + type: string + minLength: 1 + maxLength: 64 + minProperties: 0 + maxProperties: 16 + description: Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Defaults to an empty map. required: - auth - name @@ -81802,10 +81830,21 @@ components: auth: $ref: '#/components/schemas/RotateVaultCredentialAuthParam' description: Replacement values for the credential's existing authentication method. - required: - - auth + metadata: + type: object + additionalProperties: + type: string + minLength: 0 + maxLength: 512 + propertyNames: + type: string + minLength: 1 + maxLength: 64 + minProperties: 0 + maxProperties: 16 + description: Replaces all metadata. Omit to preserve it, or pass {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. additionalProperties: false - description: Secret, expiry, and OAuth refresh scope updates for an existing vault credential. + description: Metadata, secret, expiry, and OAuth refresh scope updates for an existing vault credential. Supply at least one of `auth` or `metadata`. DeletedVaultCredentialResource: type: object properties: @@ -84506,7 +84545,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' @@ -85464,6 +85503,10 @@ components: - type: 'null' user_location: $ref: '#/components/schemas/BetaWebSearchApproximateLocation' + 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. search_context_size: type: string enum: diff --git a/src/openai/resources/beta/agents/vaults/credentials.py b/src/openai/resources/beta/agents/vaults/credentials.py index 44845670a2..71cabc242b 100644 --- a/src/openai/resources/beta/agents/vaults/credentials.py +++ b/src/openai/resources/beta/agents/vaults/credentials.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Optional from typing_extensions import Literal import httpx2 @@ -55,6 +55,7 @@ def create( *, auth: CredentialAuthCreateParam, name: str, + metadata: Dict[str, 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, @@ -74,6 +75,9 @@ def create( name: The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after trimming. + metadata: Up to 16 string key-value pairs, with keys up to 64 and values up to 512 + characters. Defaults to an empty map. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -91,6 +95,7 @@ def create( { "auth": auth, "name": name, + "metadata": metadata, }, credential_create_params.CredentialCreateParams, ), @@ -154,7 +159,8 @@ def update( credential_id: str, *, vault_id: str, - auth: CredentialAuthRotateParam, + auth: CredentialAuthRotateParam | Omit = omit, + metadata: Dict[str, 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, @@ -162,14 +168,17 @@ def update( extra_body: Body | None = None, timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> Credential: - """ - Rotates a vault credential's write-only secret and returns only credential - metadata. See + """Updates credential metadata or rotates its write-only secret. + + See [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults). Args: auth: Replacement values for the credential's existing authentication method. + metadata: Replaces all metadata. Omit to preserve it, or pass {} to clear it. Up to 16 + string key-value pairs, with keys up to 64 and values up to 512 characters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -187,7 +196,13 @@ def update( path_template( "/vaults/{vault_id}/credentials/{credential_id}", vault_id=vault_id, credential_id=credential_id ), - body=maybe_transform({"auth": auth}, credential_update_params.CredentialUpdateParams), + body=maybe_transform( + { + "auth": auth, + "metadata": metadata, + }, + credential_update_params.CredentialUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -338,6 +353,7 @@ async def create( *, auth: CredentialAuthCreateParam, name: str, + metadata: Dict[str, 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, @@ -357,6 +373,9 @@ async def create( name: The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after trimming. + metadata: Up to 16 string key-value pairs, with keys up to 64 and values up to 512 + characters. Defaults to an empty map. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -374,6 +393,7 @@ async def create( { "auth": auth, "name": name, + "metadata": metadata, }, credential_create_params.CredentialCreateParams, ), @@ -437,7 +457,8 @@ async def update( credential_id: str, *, vault_id: str, - auth: CredentialAuthRotateParam, + auth: CredentialAuthRotateParam | Omit = omit, + metadata: Dict[str, 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, @@ -445,14 +466,17 @@ async def update( extra_body: Body | None = None, timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> Credential: - """ - Rotates a vault credential's write-only secret and returns only credential - metadata. See + """Updates credential metadata or rotates its write-only secret. + + See [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults). Args: auth: Replacement values for the credential's existing authentication method. + metadata: Replaces all metadata. Omit to preserve it, or pass {} to clear it. Up to 16 + string key-value pairs, with keys up to 64 and values up to 512 characters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -470,7 +494,13 @@ async def update( path_template( "/vaults/{vault_id}/credentials/{credential_id}", vault_id=vault_id, credential_id=credential_id ), - body=await async_maybe_transform({"auth": auth}, credential_update_params.CredentialUpdateParams), + body=await async_maybe_transform( + { + "auth": auth, + "metadata": metadata, + }, + credential_update_params.CredentialUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/openai/types/beta/agents/vaults/credential.py b/src/openai/types/beta/agents/vaults/credential.py index fae1e7e1fe..903072e7ee 100644 --- a/src/openai/types/beta/agents/vaults/credential.py +++ b/src/openai/types/beta/agents/vaults/credential.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details. +from typing import Dict from typing_extensions import Literal from ....._models import BaseModel @@ -20,6 +21,9 @@ class Credential(BaseModel): created_at: int """The Unix timestamp, in seconds, when the credential was created.""" + metadata: Dict[str, str] + """Application-defined key-value pairs associated with this credential.""" + name: str """The human-readable name of the credential.""" diff --git a/src/openai/types/beta/agents/vaults/credential_create_params.py b/src/openai/types/beta/agents/vaults/credential_create_params.py index 8b411f89d0..e37ab7ab57 100644 --- a/src/openai/types/beta/agents/vaults/credential_create_params.py +++ b/src/openai/types/beta/agents/vaults/credential_create_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, TypedDict from .credential_auth_create_param import CredentialAuthCreateParam @@ -18,3 +19,9 @@ class CredentialCreateParams(TypedDict, total=False): It must contain 1 to 256 UTF-8 bytes after trimming. """ + + metadata: Dict[str, str] + """ + Up to 16 string key-value pairs, with keys up to 64 and values up to 512 + characters. Defaults to an empty map. + """ diff --git a/src/openai/types/beta/agents/vaults/credential_update_params.py b/src/openai/types/beta/agents/vaults/credential_update_params.py index 4373177d90..31aabcfb36 100644 --- a/src/openai/types/beta/agents/vaults/credential_update_params.py +++ b/src/openai/types/beta/agents/vaults/credential_update_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, TypedDict from .credential_auth_rotate_param import CredentialAuthRotateParam @@ -12,5 +13,12 @@ class CredentialUpdateParams(TypedDict, total=False): vault_id: Required[str] - auth: Required[CredentialAuthRotateParam] + auth: CredentialAuthRotateParam """Replacement values for the credential's existing authentication method.""" + + metadata: Dict[str, str] + """Replaces all metadata. + + Omit to preserve it, or pass {} to clear it. Up to 16 string key-value pairs, + with keys up to 64 and values up to 512 characters. + """ diff --git a/src/openai/types/beta/beta_web_search_preview_tool.py b/src/openai/types/beta/beta_web_search_preview_tool.py index 968e480885..967d7b7a38 100644 --- a/src/openai/types/beta/beta_web_search_preview_tool.py +++ b/src/openai/types/beta/beta_web_search_preview_tool.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/beta/beta_web_search_preview_tool_param.py b/src/openai/types/beta/beta_web_search_preview_tool_param.py index 40b245d566..c5fae46f6a 100644 --- a/src/openai/types/beta/beta_web_search_preview_tool_param.py +++ b/src/openai/types/beta/beta_web_search_preview_tool_param.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/beta/beta_web_search_tool.py b/src/openai/types/beta/beta_web_search_tool.py index bdf61e6d90..6adcf29869 100644 --- a/src/openai/types/beta/beta_web_search_tool.py +++ b/src/openai/types/beta/beta_web_search_tool.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/beta/beta_web_search_tool_param.py b/src/openai/types/beta/beta_web_search_tool_param.py index e3a3ae5621..1d6cdf5965 100644 --- a/src/openai/types/beta/beta_web_search_tool_param.py +++ b/src/openai/types/beta/beta_web_search_tool_param.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/responses/web_search_preview_tool.py b/src/openai/types/responses/web_search_preview_tool.py index 0de61b2821..5bd2005cbe 100644 --- a/src/openai/types/responses/web_search_preview_tool.py +++ b/src/openai/types/responses/web_search_preview_tool.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/responses/web_search_preview_tool_param.py b/src/openai/types/responses/web_search_preview_tool_param.py index d18068586a..fc4f07c394 100644 --- a/src/openai/types/responses/web_search_preview_tool_param.py +++ b/src/openai/types/responses/web_search_preview_tool_param.py @@ -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`.""" @@ -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. + """ diff --git a/src/openai/types/responses/web_search_tool.py b/src/openai/types/responses/web_search_tool.py index f6323e6642..bbdc014e7f 100644 --- a/src/openai/types/responses/web_search_tool.py +++ b/src/openai/types/responses/web_search_tool.py @@ -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`.""" @@ -77,4 +82,9 @@ class WebSearchTool(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. + """ diff --git a/src/openai/types/responses/web_search_tool_param.py b/src/openai/types/responses/web_search_tool_param.py index 1129babeab..1e6568a113 100644 --- a/src/openai/types/responses/web_search_tool_param.py +++ b/src/openai/types/responses/web_search_tool_param.py @@ -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`.""" @@ -79,4 +84,9 @@ class WebSearchToolParam(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. + """ diff --git a/tests/api_resources/beta/agents/vaults/test_credentials.py b/tests/api_resources/beta/agents/vaults/test_credentials.py index 16f3fcf2b8..1c9cda5379 100644 --- a/tests/api_resources/beta/agents/vaults/test_credentials.py +++ b/tests/api_resources/beta/agents/vaults/test_credentials.py @@ -53,6 +53,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: }, }, name="x", + metadata={"foo": "string"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -158,7 +159,6 @@ def test_method_update(self, client: OpenAI) -> None: credential = client.beta.agents.vaults.credentials.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -180,6 +180,7 @@ def test_method_update_with_all_params(self, client: OpenAI) -> None: }, }, }, + metadata={"foo": "string"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -188,7 +189,6 @@ def test_raw_response_update(self, client: OpenAI) -> None: response = client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) assert response.is_closed is True @@ -201,7 +201,6 @@ def test_streaming_response_update(self, client: OpenAI) -> None: with client.beta.agents.vaults.credentials.with_streaming_response.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,14 +216,12 @@ def test_path_params_update(self, client: OpenAI) -> None: client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="credential_id", vault_id="", - auth={"type": "mcp_oauth"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `credential_id` but received ''"): client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) @parametrize @@ -362,6 +359,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> }, }, name="x", + metadata={"foo": "string"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -467,7 +465,6 @@ async def test_method_update(self, async_client: AsyncOpenAI) -> None: credential = await async_client.beta.agents.vaults.credentials.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -489,6 +486,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) -> }, }, }, + metadata={"foo": "string"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -497,7 +495,6 @@ async def test_raw_response_update(self, async_client: AsyncOpenAI) -> None: response = await async_client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) assert response.is_closed is True @@ -510,7 +507,6 @@ async def test_streaming_response_update(self, async_client: AsyncOpenAI) -> Non async with async_client.beta.agents.vaults.credentials.with_streaming_response.update( credential_id="credential_id", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -526,14 +522,12 @@ async def test_path_params_update(self, async_client: AsyncOpenAI) -> None: await async_client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="credential_id", vault_id="", - auth={"type": "mcp_oauth"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `credential_id` but received ''"): await async_client.beta.agents.vaults.credentials.with_raw_response.update( credential_id="", vault_id="vault_id", - auth={"type": "mcp_oauth"}, ) @parametrize diff --git a/tests/test_environment_credentials.py b/tests/test_environment_credentials.py index bc41133640..0b2e58a270 100644 --- a/tests/test_environment_credentials.py +++ b/tests/test_environment_credentials.py @@ -32,6 +32,7 @@ def credential_response(auth: object) -> dict[str, object]: "created_at": 1, "updated_at": 1, "auth": auth, + "metadata": {}, }