From f61782398f3eb73d8f77101ad418de4edcabc088 Mon Sep 17 00:00:00 2001 From: jbeckwith-oai <269036200+jbeckwith-oai@users.noreply.github.com> Date: Fri, 2 Oct 2026 04:01:55 +0000 Subject: [PATCH] fix(api): prioritize Python request routing fields Castiron-Internal-PR: https://github.com/openai/openai-python-internal/pull/160 Castiron-Source-SHA: 656e88c51bc2bd41723d286f7330123ea3501834 Castiron-Public-Base-SHA: 93bd2aa0fe0bb6658d510551f2670b231749385f --- .castiron.stats.yml | 8 ++--- src/openai/resources/audio/speech.py | 4 +-- src/openai/resources/beta/agents/agents.py | 12 ++++---- .../beta/agents/sessions/sessions.py | 4 +-- src/openai/resources/beta/assistants.py | 4 +-- .../resources/beta/responses/input_tokens.py | 4 +-- .../resources/beta/responses/responses.py | 16 +++++----- .../resources/beta/threads/runs/runs.py | 12 ++++---- src/openai/resources/beta/threads/threads.py | 8 ++--- .../resources/chat/completions/completions.py | 12 ++++---- src/openai/resources/completions.py | 4 +-- src/openai/resources/embeddings.py | 4 +-- src/openai/resources/images.py | 8 ++--- src/openai/resources/moderations.py | 4 +-- src/openai/resources/realtime/calls.py | 4 +-- .../resources/responses/input_tokens.py | 4 +-- src/openai/resources/responses/responses.py | 16 +++++----- src/openai/types/beta/session_turn_error.py | 29 +------------------ .../beta/agents/vaults/test_credentials.py | 6 ---- 19 files changed, 65 insertions(+), 98 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index fa964778a6..fba9e6c4c5 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 862285b0-bba7-4d7b-934b-63759482d34f +generation_id: d2b5e56a-7b5c-4539-98d6-a5459de003da openapi_spec_hash: c829925be8009e5eaedbc7e25a75bbb4 openapi_transformed_spec_hash: 06558c212f804512d9bbd22d9162355c config_hash: 75548929fa5c67ad9d1d94b5a30a56e9 -codegen_sha: cad107aa3bd1d80294233ba5cad18f0db8151a23 -codegen_hash: 256f429bb05c452738ab7d660f8cf6c2ed641e0b5e9d7e9a9f21c6c1a24bf818 -public_codegen_sha: 8fdc56a6031ebe1660d2a10292b8db826b2b02b0 +codegen_sha: ae58f4187453cdc87fc2f95eab1d8007bd39a698 +codegen_hash: e4805e8a2047f6dcf32bd17947a6dc02178b7cd91f238eba5f3a1584754f621a +public_codegen_sha: 5c5451216a28165dc1efb8f37aae9d3a7d05e4ae diff --git a/src/openai/resources/audio/speech.py b/src/openai/resources/audio/speech.py index fc698e2655..9380bbe67e 100644 --- a/src/openai/resources/audio/speech.py +++ b/src/openai/resources/audio/speech.py @@ -109,8 +109,8 @@ def create( "/audio/speech", body=maybe_transform( { - "input": input, "model": model, + "input": input, "voice": voice, "instructions": instructions, "response_format": response_format, @@ -214,8 +214,8 @@ async def create( "/audio/speech", body=await async_maybe_transform( { - "input": input, "model": model, + "input": input, "voice": voice, "instructions": instructions, "response_format": response_format, diff --git a/src/openai/resources/beta/agents/agents.py b/src/openai/resources/beta/agents/agents.py index 69c71bd6ae..90f39a035d 100644 --- a/src/openai/resources/beta/agents/agents.py +++ b/src/openai/resources/beta/agents/agents.py @@ -150,12 +150,12 @@ def create( body=maybe_transform( { "model": model, + "service_tier": service_tier, "instructions": instructions, "metadata": metadata, "multi_agent": multi_agent, "name": name, "reasoning": reasoning, - "service_tier": service_tier, "text": text, "tools": tools, }, @@ -281,13 +281,13 @@ def update( path_template("/agents/{agent_id}", agent_id=agent_id), body=maybe_transform( { + "model": model, + "service_tier": service_tier, "instructions": instructions, "metadata": metadata, - "model": model, "multi_agent": multi_agent, "name": name, "reasoning": reasoning, - "service_tier": service_tier, "text": text, "tools": tools, }, @@ -502,12 +502,12 @@ async def create( body=await async_maybe_transform( { "model": model, + "service_tier": service_tier, "instructions": instructions, "metadata": metadata, "multi_agent": multi_agent, "name": name, "reasoning": reasoning, - "service_tier": service_tier, "text": text, "tools": tools, }, @@ -633,13 +633,13 @@ async def update( path_template("/agents/{agent_id}", agent_id=agent_id), body=await async_maybe_transform( { + "model": model, + "service_tier": service_tier, "instructions": instructions, "metadata": metadata, - "model": model, "multi_agent": multi_agent, "name": name, "reasoning": reasoning, - "service_tier": service_tier, "text": text, "tools": tools, }, diff --git a/src/openai/resources/beta/agents/sessions/sessions.py b/src/openai/resources/beta/agents/sessions/sessions.py index 80edcbc259..b8f86eeec1 100644 --- a/src/openai/resources/beta/agents/sessions/sessions.py +++ b/src/openai/resources/beta/agents/sessions/sessions.py @@ -338,12 +338,12 @@ def create( "/agents/sessions", body=maybe_transform( { + "stream": stream, "environment": environment, "agent": agent, "agent_id": agent_id, "input": input, "metadata": metadata, - "stream": stream, "vault_ids": vault_ids, }, session_create_params.SessionCreateParamsStreaming @@ -828,12 +828,12 @@ async def create( "/agents/sessions", body=await async_maybe_transform( { + "stream": stream, "environment": environment, "agent": agent, "agent_id": agent_id, "input": input, "metadata": metadata, - "stream": stream, "vault_ids": vault_ids, }, session_create_params.SessionCreateParamsStreaming diff --git a/src/openai/resources/beta/assistants.py b/src/openai/resources/beta/assistants.py index a5c616b554..3dea39d337 100644 --- a/src/openai/resources/beta/assistants.py +++ b/src/openai/resources/beta/assistants.py @@ -380,10 +380,10 @@ def update( path_template("/assistants/{assistant_id}", assistant_id=assistant_id), body=maybe_transform( { + "model": model, "description": description, "instructions": instructions, "metadata": metadata, - "model": model, "name": name, "reasoning_effort": reasoning_effort, "response_format": response_format, @@ -859,10 +859,10 @@ async def update( path_template("/assistants/{assistant_id}", assistant_id=assistant_id), body=await async_maybe_transform( { + "model": model, "description": description, "instructions": instructions, "metadata": metadata, - "model": model, "name": name, "reasoning_effort": reasoning_effort, "response_format": response_format, diff --git a/src/openai/resources/beta/responses/input_tokens.py b/src/openai/resources/beta/responses/input_tokens.py index 74c7b2b94b..21b01a9b75 100644 --- a/src/openai/resources/beta/responses/input_tokens.py +++ b/src/openai/resources/beta/responses/input_tokens.py @@ -139,10 +139,10 @@ def count( "/responses/input_tokens?beta=true", body=maybe_transform( { + "model": model, "conversation": conversation, "input": input, "instructions": instructions, - "model": model, "parallel_tool_calls": parallel_tool_calls, "personality": personality, "previous_response_id": previous_response_id, @@ -282,10 +282,10 @@ async def count( "/responses/input_tokens?beta=true", body=await async_maybe_transform( { + "model": model, "conversation": conversation, "input": input, "instructions": instructions, - "model": model, "parallel_tool_calls": parallel_tool_calls, "personality": personality, "previous_response_id": previous_response_id, diff --git a/src/openai/resources/beta/responses/responses.py b/src/openai/resources/beta/responses/responses.py index 3aa3297b36..8cce7bc439 100644 --- a/src/openai/resources/beta/responses/responses.py +++ b/src/openai/resources/beta/responses/responses.py @@ -1504,6 +1504,9 @@ def create( "/responses?beta=true", body=maybe_transform( { + "model": model, + "stream": stream, + "service_tier": service_tier, "access_programs": access_programs, "background": background, "context_management": context_management, @@ -1514,7 +1517,6 @@ def create( "max_output_tokens": max_output_tokens, "max_tool_calls": max_tool_calls, "metadata": metadata, - "model": model, "moderation": moderation, "multi_agent": multi_agent, "parallel_tool_calls": parallel_tool_calls, @@ -1525,9 +1527,7 @@ def create( "prompt_cache_retention": prompt_cache_retention, "reasoning": reasoning, "safety_identifier": safety_identifier, - "service_tier": service_tier, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "text": text, @@ -2046,13 +2046,13 @@ def compact( body=maybe_transform( { "model": model, + "service_tier": service_tier, "input": input, "instructions": instructions, "previous_response_id": previous_response_id, "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, - "service_tier": service_tier, }, response_compact_params.ResponseCompactParams, ), @@ -3522,6 +3522,9 @@ async def create( "/responses?beta=true", body=await async_maybe_transform( { + "model": model, + "stream": stream, + "service_tier": service_tier, "access_programs": access_programs, "background": background, "context_management": context_management, @@ -3532,7 +3535,6 @@ async def create( "max_output_tokens": max_output_tokens, "max_tool_calls": max_tool_calls, "metadata": metadata, - "model": model, "moderation": moderation, "multi_agent": multi_agent, "parallel_tool_calls": parallel_tool_calls, @@ -3543,9 +3545,7 @@ async def create( "prompt_cache_retention": prompt_cache_retention, "reasoning": reasoning, "safety_identifier": safety_identifier, - "service_tier": service_tier, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "text": text, @@ -4064,13 +4064,13 @@ async def compact( body=await async_maybe_transform( { "model": model, + "service_tier": service_tier, "input": input, "instructions": instructions, "previous_response_id": previous_response_id, "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, - "service_tier": service_tier, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/resources/beta/threads/runs/runs.py b/src/openai/resources/beta/threads/runs/runs.py index 5f2ece0375..0d0253d520 100644 --- a/src/openai/resources/beta/threads/runs/runs.py +++ b/src/openai/resources/beta/threads/runs/runs.py @@ -580,6 +580,8 @@ def create( path_template("/threads/{thread_id}/runs", thread_id=thread_id), body=maybe_transform( { + "model": model, + "stream": stream, "assistant_id": assistant_id, "additional_instructions": additional_instructions, "additional_messages": additional_messages, @@ -587,11 +589,9 @@ def create( "max_completion_tokens": max_completion_tokens, "max_prompt_tokens": max_prompt_tokens, "metadata": metadata, - "model": model, "parallel_tool_calls": parallel_tool_calls, "reasoning_effort": reasoning_effort, "response_format": response_format, - "stream": stream, "temperature": temperature, "tool_choice": tool_choice, "tools": tools, @@ -1366,8 +1366,8 @@ def submit_tool_outputs( path_template("/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", thread_id=thread_id, run_id=run_id), body=maybe_transform( { - "tool_outputs": tool_outputs, "stream": stream, + "tool_outputs": tool_outputs, }, run_submit_tool_outputs_params.RunSubmitToolOutputsParamsStreaming if stream @@ -2049,6 +2049,8 @@ async def create( path_template("/threads/{thread_id}/runs", thread_id=thread_id), body=await async_maybe_transform( { + "model": model, + "stream": stream, "assistant_id": assistant_id, "additional_instructions": additional_instructions, "additional_messages": additional_messages, @@ -2056,11 +2058,9 @@ async def create( "max_completion_tokens": max_completion_tokens, "max_prompt_tokens": max_prompt_tokens, "metadata": metadata, - "model": model, "parallel_tool_calls": parallel_tool_calls, "reasoning_effort": reasoning_effort, "response_format": response_format, - "stream": stream, "temperature": temperature, "tool_choice": tool_choice, "tools": tools, @@ -2834,8 +2834,8 @@ async def submit_tool_outputs( path_template("/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", thread_id=thread_id, run_id=run_id), body=await async_maybe_transform( { - "tool_outputs": tool_outputs, "stream": stream, + "tool_outputs": tool_outputs, }, run_submit_tool_outputs_params.RunSubmitToolOutputsParamsStreaming if stream diff --git a/src/openai/resources/beta/threads/threads.py b/src/openai/resources/beta/threads/threads.py index 09ecb75f4c..66e1467b2c 100644 --- a/src/openai/resources/beta/threads/threads.py +++ b/src/openai/resources/beta/threads/threads.py @@ -731,15 +731,15 @@ def create_and_run( "/threads/runs", body=maybe_transform( { + "model": model, + "stream": stream, "assistant_id": assistant_id, "instructions": instructions, "max_completion_tokens": max_completion_tokens, "max_prompt_tokens": max_prompt_tokens, "metadata": metadata, - "model": model, "parallel_tool_calls": parallel_tool_calls, "response_format": response_format, - "stream": stream, "temperature": temperature, "thread": thread, "tool_choice": tool_choice, @@ -1622,15 +1622,15 @@ async def create_and_run( "/threads/runs", body=await async_maybe_transform( { + "model": model, + "stream": stream, "assistant_id": assistant_id, "instructions": instructions, "max_completion_tokens": max_completion_tokens, "max_prompt_tokens": max_prompt_tokens, "metadata": metadata, - "model": model, "parallel_tool_calls": parallel_tool_calls, "response_format": response_format, - "stream": stream, "temperature": temperature, "thread": thread, "tool_choice": tool_choice, diff --git a/src/openai/resources/chat/completions/completions.py b/src/openai/resources/chat/completions/completions.py index 0920d50f5d..b2b65683f9 100644 --- a/src/openai/resources/chat/completions/completions.py +++ b/src/openai/resources/chat/completions/completions.py @@ -1319,8 +1319,10 @@ def create( "/chat/completions", body=maybe_transform( { - "messages": messages, "model": model, + "stream": stream, + "service_tier": service_tier, + "messages": messages, "audio": audio, "frequency_penalty": frequency_penalty, "function_call": function_call, @@ -1343,10 +1345,8 @@ def create( "response_format": response_format, "safety_identifier": safety_identifier, "seed": seed, - "service_tier": service_tier, "stop": stop, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "tool_choice": tool_choice, @@ -2953,8 +2953,10 @@ async def create( "/chat/completions", body=await async_maybe_transform( { - "messages": messages, "model": model, + "stream": stream, + "service_tier": service_tier, + "messages": messages, "audio": audio, "frequency_penalty": frequency_penalty, "function_call": function_call, @@ -2977,10 +2979,8 @@ async def create( "response_format": response_format, "safety_identifier": safety_identifier, "seed": seed, - "service_tier": service_tier, "stop": stop, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "tool_choice": tool_choice, diff --git a/src/openai/resources/completions.py b/src/openai/resources/completions.py index f15bde2d2c..136e3e98ca 100644 --- a/src/openai/resources/completions.py +++ b/src/openai/resources/completions.py @@ -557,6 +557,7 @@ def create( body=maybe_transform( { "model": model, + "stream": stream, "prompt": prompt, "best_of": best_of, "echo": echo, @@ -568,7 +569,6 @@ def create( "presence_penalty": presence_penalty, "seed": seed, "stop": stop, - "stream": stream, "stream_options": stream_options, "suffix": suffix, "temperature": temperature, @@ -1127,6 +1127,7 @@ async def create( body=await async_maybe_transform( { "model": model, + "stream": stream, "prompt": prompt, "best_of": best_of, "echo": echo, @@ -1138,7 +1139,6 @@ async def create( "presence_penalty": presence_penalty, "seed": seed, "stop": stop, - "stream": stream, "stream_options": stream_options, "suffix": suffix, "temperature": temperature, diff --git a/src/openai/resources/embeddings.py b/src/openai/resources/embeddings.py index 75bf9b49f4..f244b00d9f 100644 --- a/src/openai/resources/embeddings.py +++ b/src/openai/resources/embeddings.py @@ -101,8 +101,8 @@ def create( timeout: Override the client-level default timeout for this request, in seconds """ params = { - "input": input, "model": model, + "input": input, "user": user, "dimensions": dimensions, "encoding_format": encoding_format, @@ -203,8 +203,8 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ params = { - "input": input, "model": model, + "input": input, "user": user, "dimensions": dimensions, "encoding_format": encoding_format, diff --git a/src/openai/resources/images.py b/src/openai/resources/images.py index 7c3df384d5..285c92088c 100644 --- a/src/openai/resources/images.py +++ b/src/openai/resources/images.py @@ -1010,9 +1010,10 @@ def generate( "/images/generations", body=maybe_transform( { + "model": model, + "stream": stream, "prompt": prompt, "background": background, - "model": model, "moderation": moderation, "n": n, "output_compression": output_compression, @@ -1021,7 +1022,6 @@ def generate( "quality": quality, "response_format": response_format, "size": size, - "stream": stream, "style": style, "user": user, }, @@ -2027,9 +2027,10 @@ async def generate( "/images/generations", body=await async_maybe_transform( { + "model": model, + "stream": stream, "prompt": prompt, "background": background, - "model": model, "moderation": moderation, "n": n, "output_compression": output_compression, @@ -2038,7 +2039,6 @@ async def generate( "quality": quality, "response_format": response_format, "size": size, - "stream": stream, "style": style, "user": user, }, diff --git a/src/openai/resources/moderations.py b/src/openai/resources/moderations.py index 763ac69c70..8bbe3b3aab 100644 --- a/src/openai/resources/moderations.py +++ b/src/openai/resources/moderations.py @@ -84,8 +84,8 @@ def create( "/moderations", body=maybe_transform( { - "input": input, "model": model, + "input": input, }, moderation_create_params.ModerationCreateParams, ), @@ -163,8 +163,8 @@ async def create( "/moderations", body=await async_maybe_transform( { - "input": input, "model": model, + "input": input, }, moderation_create_params.ModerationCreateParams, ), diff --git a/src/openai/resources/realtime/calls.py b/src/openai/resources/realtime/calls.py index b008491507..2f75d31c49 100644 --- a/src/openai/resources/realtime/calls.py +++ b/src/openai/resources/realtime/calls.py @@ -268,12 +268,12 @@ def accept( path_template("/realtime/calls/{call_id}/accept", call_id=call_id), body=maybe_transform( { + "model": model, "type": type, "audio": audio, "include": include, "instructions": instructions, "max_output_tokens": max_output_tokens, - "model": model, "output_modalities": output_modalities, "parallel_tool_calls": parallel_tool_calls, "prompt": prompt, @@ -648,12 +648,12 @@ async def accept( path_template("/realtime/calls/{call_id}/accept", call_id=call_id), body=await async_maybe_transform( { + "model": model, "type": type, "audio": audio, "include": include, "instructions": instructions, "max_output_tokens": max_output_tokens, - "model": model, "output_modalities": output_modalities, "parallel_tool_calls": parallel_tool_calls, "prompt": prompt, diff --git a/src/openai/resources/responses/input_tokens.py b/src/openai/resources/responses/input_tokens.py index 2748ce756c..bd3f209a5b 100644 --- a/src/openai/resources/responses/input_tokens.py +++ b/src/openai/resources/responses/input_tokens.py @@ -135,10 +135,10 @@ def count( "/responses/input_tokens", body=maybe_transform( { + "model": model, "conversation": conversation, "input": input, "instructions": instructions, - "model": model, "parallel_tool_calls": parallel_tool_calls, "personality": personality, "previous_response_id": previous_response_id, @@ -273,10 +273,10 @@ async def count( "/responses/input_tokens", body=await async_maybe_transform( { + "model": model, "conversation": conversation, "input": input, "instructions": instructions, - "model": model, "parallel_tool_calls": parallel_tool_calls, "personality": personality, "previous_response_id": previous_response_id, diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index bf11a21851..25cc854f53 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -1056,6 +1056,9 @@ def create( "/responses", body=maybe_transform( { + "model": model, + "stream": stream, + "service_tier": service_tier, "access_programs": access_programs, "background": background, "context_management": context_management, @@ -1066,7 +1069,6 @@ def create( "max_output_tokens": max_output_tokens, "max_tool_calls": max_tool_calls, "metadata": metadata, - "model": model, "moderation": moderation, "parallel_tool_calls": parallel_tool_calls, "previous_response_id": previous_response_id, @@ -1076,9 +1078,7 @@ def create( "prompt_cache_retention": prompt_cache_retention, "reasoning": reasoning, "safety_identifier": safety_identifier, - "service_tier": service_tier, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "text": text, @@ -1963,13 +1963,13 @@ def compact( body=maybe_transform( { "model": model, + "service_tier": service_tier, "input": input, "instructions": instructions, "previous_response_id": previous_response_id, "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, - "service_tier": service_tier, }, response_compact_params.ResponseCompactParams, ), @@ -2965,6 +2965,9 @@ async def create( "/responses", body=await async_maybe_transform( { + "model": model, + "stream": stream, + "service_tier": service_tier, "access_programs": access_programs, "background": background, "context_management": context_management, @@ -2975,7 +2978,6 @@ async def create( "max_output_tokens": max_output_tokens, "max_tool_calls": max_tool_calls, "metadata": metadata, - "model": model, "moderation": moderation, "parallel_tool_calls": parallel_tool_calls, "previous_response_id": previous_response_id, @@ -2985,9 +2987,7 @@ async def create( "prompt_cache_retention": prompt_cache_retention, "reasoning": reasoning, "safety_identifier": safety_identifier, - "service_tier": service_tier, "store": store, - "stream": stream, "stream_options": stream_options, "temperature": temperature, "text": text, @@ -3871,13 +3871,13 @@ async def compact( body=await async_maybe_transform( { "model": model, + "service_tier": service_tier, "input": input, "instructions": instructions, "previous_response_id": previous_response_id, "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, - "service_tier": service_tier, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/beta/session_turn_error.py b/src/openai/types/beta/session_turn_error.py index c3de226568..009e558a25 100644 --- a/src/openai/types/beta/session_turn_error.py +++ b/src/openai/types/beta/session_turn_error.py @@ -31,34 +31,7 @@ class SessionTurnError(BaseModel): "request_timeout", "internal_error", ] - """A stable, machine-readable failure category. - - - `context_length_exceeded` - The request exceeds the model's context window. - - `session_budget_exceeded` - The session has reached its usage budget. - - `usage_limit_exceeded` - The organization has reached a usage, plan, or - billing limit. - - `credit_balance_exhausted` - The organization has no API credits remaining. - - `rate_limit_exceeded` - The request exceeds the available rate limit. - - `flex_unavailable` - Flex processing is temporarily unavailable. - - `server_overloaded` - The model service is temporarily overloaded. - - `cyber_policy` - The request was rejected by a safety policy. - - `misalignment_policy_violation` - The request was blocked by the safety - systems. - - `connection_failed` - The request could not connect to the model service. - - `server_error` - The model service encountered an unexpected error. - - `authentication_error` - The API credentials are invalid or lack the required - access. - - `invalid_request` - The request contains invalid input or configuration. - - `resource_not_found` - The requested model or resource is unavailable. - - `sandbox_error` - The request could not complete in its execution environment. - - `executor_version_incompatible` - The executor must be upgraded before it can - run this turn. - - `active_turn_not_steerable` - The session cannot accept additional input while - a request is running. - - `request_timeout` - The request timed out before the model service responded. - - `internal_error` - An unexpected internal error prevented the session request - from completing. - """ + """A stable, machine-readable failure category.""" message: str """A customer-safe explanation of the failure.""" diff --git a/tests/api_resources/beta/agents/vaults/test_credentials.py b/tests/api_resources/beta/agents/vaults/test_credentials.py index 1ac8c48095..7b44a2ca51 100644 --- a/tests/api_resources/beta/agents/vaults/test_credentials.py +++ b/tests/api_resources/beta/agents/vaults/test_credentials.py @@ -159,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", - metadata={}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -190,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", - metadata={}, ) assert response.is_closed is True @@ -203,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", - metadata={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -468,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", - metadata={}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -499,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", - metadata={}, ) assert response.is_closed is True @@ -512,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", - metadata={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"