From 6517ef7d6421adfcec5d1eedb466785718f182ec Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 21 Oct 2026 00:07:57 -0700 Subject: [PATCH] fix(openai): handle SDK 3 error shapes, audio deltas, Azure deployment URLs, and httpx2 token exchange errors OpenAI SDK 3 sends HTTP through httpx2, rejects an empty api_key, and ships new Responses error codes and types. This maps the new error codes and the SDK 3 missing-credentials message, keeps the raw upstream error code, copies audio deltas without unset fields, strips operation paths from full Azure deployment URLs, closes the websocket passthrough cleanly on httpx2 token exchange errors, and replaces the recursive cause walk with a bounded loop. Tests route the SDK 3 workload identity token exchange through respx and build router clients SDK 3 accepts. The lazy OpenAPI snapshot and dashboard API types are regenerated --- .../exception_mapping_utils.py | 9 +- .../litellm_core_utils/streaming_handler.py | 7 +- litellm/llms/azure/common_utils.py | 18 +- litellm/llms/custom_httpx/transport_errors.py | 17 +- litellm/proxy/_lazy_openapi_snapshot.json | 1151 ++++++++++++++++- .../common_utils/responses_stream_errors.py | 2 +- .../llm_passthrough_endpoints.py | 3 +- litellm/responses/streaming_iterator.py | 3 + tests/unit/conftest.py | 28 + .../test_exception_mapping_utils.py | 6 +- .../chat/test_azure_ai_transformation.py | 5 + .../openai/test_openai_workload_identity.py | 17 +- .../openai/test_moderations.py | 2 + .../test_llm_pass_through_endpoints.py | 2 +- .../test_openai_ws_passthrough_routes.py | 2 +- tests/unit/realtime_api/test_main.py | 4 +- .../test_streaming_iterator_error_events.py | 3 + tests/unit/test_router/test_router.py | 2 +- .../test_router_provider_endpoints.py | 9 +- ui/litellm-dashboard/src/lib/http/schema.d.ts | 929 +++++++++++-- 20 files changed, 2062 insertions(+), 157 deletions(-) diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py index e7f2f5dc359..10db9c3b438 100644 --- a/litellm/litellm_core_utils/exception_mapping_utils.py +++ b/litellm/litellm_core_utils/exception_mapping_utils.py @@ -271,6 +271,10 @@ class _ProviderHTTPException(Protocol): _ERROR_BODY_ADAPTER: Final = TypeAdapter(dict[str, object]) +_OPENAI_CLIENT_MISSING_CREDENTIALS_MESSAGES: Final = ( + "The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable", + "Missing credentials. Please pass an `api_key`", +) def _openai_cyber_policy_body(original_exception: _ProviderHTTPException) -> Mapping[str, object] | None: @@ -439,10 +443,7 @@ def _map_openai_exception( litellm_debug_info=extra_information, body=getattr(original_exception, "body", None), ) - elif ( - "The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable" - in error_str - ): + elif any(marker in error_str for marker in _OPENAI_CLIENT_MISSING_CREDENTIALS_MESSAGES): raise AuthenticationError( message=f"AuthenticationError: {exception_provider} - {message}", llm_provider=custom_llm_provider, diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index 045943fdd88..edb997173b7 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -1056,7 +1056,12 @@ class CustomStreamWrapper: """ Copy a specific attribute from source delta to target delta. """ - setattr(target_delta, attribute_name, getattr(source_delta, attribute_name)) + value: Final = stored_attribute(source_delta, attribute_name) + setattr( + target_delta, + attribute_name, + value.model_dump(exclude_unset=True) if isinstance(value, BaseModel) else value, + ) def _has_any_special_delta_attributes(self, delta: object) -> bool: """ diff --git a/litellm/llms/azure/common_utils.py b/litellm/llms/azure/common_utils.py index 52e3cdf380e..2d864fa7a08 100644 --- a/litellm/llms/azure/common_utils.py +++ b/litellm/llms/azure/common_utils.py @@ -8,6 +8,7 @@ from contextlib import closing from functools import lru_cache from types import MappingProxyType from typing import Final, Literal, NamedTuple, cast +from urllib.parse import urlsplit, urlunsplit import httpx from openai import AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, OpenAI @@ -326,13 +327,26 @@ def get_azure_ad_token_from_oidc( return azure_ad_token_access_token +_DEPLOYMENT_OPERATION_PATH: Final = re.compile( + r"(?P.*/openai/deployments/[^/]+)" + r"/(?:chat/completions|completions|embeddings|audio/(?:transcriptions|translations|speech)|images/(?:generations|edits))/?" +) + + +def _azure_deployment_base_url(deployment_url: str) -> str: + parts: Final = urlsplit(deployment_url) + operation_path: Final = _DEPLOYMENT_OPERATION_PATH.fullmatch(parts.path) + deployment_path: Final = parts.path if operation_path is None else operation_path["deployment"] + return urlunsplit(parts._replace(path=deployment_path, query="", fragment="")) + + def select_azure_base_url_or_endpoint(azure_client_params: dict): azure_endpoint: Final = azure_client_params.get("azure_endpoint", None) - if azure_endpoint is not None: + if isinstance(azure_endpoint, str): # see : https://github.com/openai/openai-python/blob/3d61ed42aba652b547029095a7eb269ad4e1e957/src/openai/lib/azure.py#L192 if "/openai/deployments" in azure_endpoint: # this is base_url, not an azure_endpoint - azure_client_params["base_url"] = azure_endpoint + azure_client_params["base_url"] = _azure_deployment_base_url(azure_endpoint) azure_client_params.pop("azure_endpoint") return azure_client_params diff --git a/litellm/llms/custom_httpx/transport_errors.py b/litellm/llms/custom_httpx/transport_errors.py index f3a2b04a4ea..20c4c0aadc4 100644 --- a/litellm/llms/custom_httpx/transport_errors.py +++ b/litellm/llms/custom_httpx/transport_errors.py @@ -1,6 +1,9 @@ import sys from collections.abc import Iterator from enum import Enum +from functools import partial +from itertools import accumulate, takewhile +from operator import is_not from typing import Final, TypeAlias import httpx @@ -42,13 +45,15 @@ def transport_error_classes(kind: TransportErrorKind) -> tuple[type[BaseExceptio return tuple(error_class for error_class, error_kind in _transport_errors() if error_kind is kind) -def _explicit_causes(error: BaseException | None, depth: int) -> Iterator[BaseException]: - if error is None or depth == 0: - return - yield error - yield from _explicit_causes(error.__cause__, depth - 1) +def _next_cause(error: BaseException | None, _depth: int) -> BaseException | None: + return None if error is None else error.__cause__ + + +def _explicit_causes(error: BaseException) -> Iterator[BaseException | None]: + causes: Final = accumulate(range(1, _MAX_CAUSE_DEPTH), _next_cause, initial=error) + return takewhile(partial(is_not, None), causes) def chained_transport_error_kind(error: BaseException) -> TransportErrorKind | None: - kinds: Final = (transport_error_kind(cause) for cause in _explicit_causes(error, _MAX_CAUSE_DEPTH)) + kinds: Final = (transport_error_kind(cause) for cause in _explicit_causes(error)) return next((kind for kind in kinds if kind is not None), None) diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index 545b317055a..2334286dbde 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.json +++ b/litellm/proxy/_lazy_openapi_snapshot.json @@ -22556,8 +22556,15 @@ "title": "Queries" }, "query": { - "title": "Query", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Query" }, "sources": { "anyOf": [ @@ -22580,7 +22587,6 @@ } }, "required": [ - "query", "type" ], "title": "ActionSearch", @@ -22644,6 +22650,98 @@ "title": "ActionWait", "type": "object" }, + "AdditionalTools": { + "additionalProperties": true, + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "role": { + "enum": [ + "unknown", + "user", + "assistant", + "system", + "critic", + "discriminator", + "developer", + "tool" + ], + "title": "Role", + "type": "string" + }, + "tools": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/FunctionTool" + }, + { + "$ref": "#/components/schemas/FileSearchTool" + }, + { + "$ref": "#/components/schemas/ComputerTool" + }, + { + "$ref": "#/components/schemas/ComputerUsePreviewTool" + }, + { + "$ref": "#/components/schemas/WebSearchTool" + }, + { + "$ref": "#/components/schemas/Mcp" + }, + { + "$ref": "#/components/schemas/CodeInterpreter" + }, + { + "$ref": "#/components/schemas/ProgrammaticToolCalling" + }, + { + "$ref": "#/components/schemas/ImageGeneration" + }, + { + "$ref": "#/components/schemas/LocalShell" + }, + { + "$ref": "#/components/schemas/FunctionShellTool" + }, + { + "$ref": "#/components/schemas/CustomTool" + }, + { + "$ref": "#/components/schemas/NamespaceTool" + }, + { + "$ref": "#/components/schemas/ToolSearchTool" + }, + { + "$ref": "#/components/schemas/WebSearchPreviewTool" + }, + { + "$ref": "#/components/schemas/ApplyPatchTool" + } + ] + }, + "title": "Tools", + "type": "array" + }, + "type": { + "const": "additional_tools", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "role", + "tools", + "type" + ], + "title": "AdditionalTools", + "type": "object" + }, "AnnotationContainerFileCitation": { "additionalProperties": true, "description": "A citation for a container file used to generate a model response.", @@ -22782,6 +22880,24 @@ "additionalProperties": true, "description": "Allows the assistant to create, delete, or update files using unified diffs.", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, "type": { "const": "apply_patch", "title": "Type", @@ -22899,6 +23015,41 @@ "title": "CachedTokensDetails", "type": "object" }, + "CallerDirect": { + "additionalProperties": true, + "properties": { + "type": { + "const": "direct", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CallerDirect", + "type": "object" + }, + "CallerProgram": { + "additionalProperties": true, + "properties": { + "caller_id": { + "title": "Caller Id", + "type": "string" + }, + "type": { + "const": "program", + "title": "Type", + "type": "string" + } + }, + "required": [ + "caller_id", + "type" + ], + "title": "CallerProgram", + "type": "object" + }, "Click": { "additionalProperties": true, "description": "A click action.", @@ -22955,6 +23106,24 @@ "additionalProperties": true, "description": "A tool that runs Python code to help generate a response to a prompt.", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, "container": { "anyOf": [ { @@ -23132,7 +23301,7 @@ }, "ComputerTool": { "additionalProperties": true, - "description": "A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).", + "description": "A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).", "properties": { "type": { "const": "computer", @@ -23148,7 +23317,7 @@ }, "ComputerUsePreviewTool": { "additionalProperties": true, - "description": "A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).", + "description": "A tool that controls a virtual computer.\n\nLearn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).", "properties": { "display_height": { "title": "Display Height", @@ -23384,8 +23553,37 @@ }, "CustomTool": { "additionalProperties": true, - "description": "A custom tool that processes input using a specified format.\n\nLearn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)", + "description": "A custom tool that processes input using a specified format.\n\nLearn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "defer_loading": { "anyOf": [ { @@ -23665,7 +23863,7 @@ }, "FileSearchTool": { "additionalProperties": true, - "description": "A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).", + "description": "A tool that searches for relevant content from uploaded files.\n\nLearn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).", "properties": { "filters": { "anyOf": [ @@ -23748,6 +23946,24 @@ "additionalProperties": true, "description": "A tool that allows the model to execute shell commands.", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, "environment": { "anyOf": [ { @@ -23779,8 +23995,37 @@ }, "FunctionTool": { "additionalProperties": true, - "description": "Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://platform.openai.com/docs/guides/function-calling).", + "description": "Defines a function in your own code the model can choose to call.\n\nLearn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "defer_loading": { "anyOf": [ { @@ -23807,6 +24052,18 @@ "title": "Name", "type": "string" }, + "output_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Output Schema" + }, "parameters": { "anyOf": [ { @@ -23996,6 +24253,31 @@ "title": "Grammar", "type": "object" }, + "HTTPError": { + "additionalProperties": true, + "properties": { + "code": { + "title": "Code", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + }, + "type": { + "const": "http_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "code", + "message", + "type" + ], + "title": "HTTPError", + "type": "object" + }, "HTTPValidationError": { "properties": { "detail": { @@ -24079,7 +24361,14 @@ "enum": [ "gpt-image-1", "gpt-image-1-mini", - "gpt-image-1.5" + "gpt-image-2", + "gpt-image-2-2026-04-21", + "gpt-image-2.5-sunburst", + "gpt-image-2.5-sunburst-2026-09-08", + "gpt-image-2.5-flare", + "gpt-image-2.5-flare-2026-09-08", + "gpt-image-1.5", + "chatgpt-image-latest" ], "type": "string" }, @@ -24149,6 +24438,8 @@ "low", "medium", "high", + "xhigh", + "max", "auto" ], "type": "string" @@ -24161,6 +24452,9 @@ }, "size": { "anyOf": [ + { + "type": "string" + }, { "enum": [ "1024x1024", @@ -24192,10 +24486,87 @@ "additionalProperties": true, "description": "An image generation request made by the model.", "properties": { + "action": { + "anyOf": [ + { + "enum": [ + "generate", + "edit", + "auto" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Action" + }, + "background": { + "anyOf": [ + { + "enum": [ + "transparent", + "opaque", + "auto" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Background" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImageGenerationCallError" + }, + { + "type": "null" + } + ] + }, "id": { "title": "Id", "type": "string" }, + "output_format": { + "anyOf": [ + { + "enum": [ + "png", + "webp", + "jpeg" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Output Format" + }, + "quality": { + "anyOf": [ + { + "enum": [ + "low", + "medium", + "high", + "xhigh", + "max", + "auto" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Quality" + }, "result": { "anyOf": [ { @@ -24207,6 +24578,36 @@ ], "title": "Result" }, + "revised_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Revised Prompt" + }, + "size": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "1024x1024", + "1024x1536", + "1536x1024" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Size" + }, "status": { "enum": [ "in_progress", @@ -24231,6 +24632,86 @@ "title": "ImageGenerationCall", "type": "object" }, + "ImageGenerationCallError": { + "additionalProperties": true, + "description": "Details of a moderation failure, when available.", + "properties": { + "code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Code" + }, + "message": { + "title": "Message", + "type": "string" + }, + "moderation_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImageGenerationCallErrorModerationDetails" + }, + { + "type": "null" + } + ] + }, + "param": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Param" + }, + "type": { + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "ImageGenerationCallError", + "type": "object" + }, + "ImageGenerationCallErrorModerationDetails": { + "additionalProperties": true, + "description": "Public details for a `moderation_blocked` error, when available.", + "properties": { + "categories": { + "items": { + "type": "string" + }, + "title": "Categories", + "type": "array" + }, + "moderation_stage": { + "enum": [ + "input", + "output", + "unknown" + ], + "title": "Moderation Stage", + "type": "string" + } + }, + "required": [ + "categories", + "moderation_stage" + ], + "title": "ImageGenerationCallErrorModerationDetails", + "type": "object" + }, "ImageGenerationInputImageMask": { "additionalProperties": true, "description": "Optional mask for inpainting.\n\nContains `image_url`\n(string, optional) and `file_id` (string, optional).", @@ -24270,7 +24751,9 @@ { "enum": [ "max_output_tokens", - "content_filter" + "max_messages", + "content_filter", + "steered" ], "type": "string" }, @@ -24712,8 +25195,26 @@ }, "Mcp": { "additionalProperties": true, - "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).", + "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).", "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, "allowed_tools": { "anyOf": [ { @@ -24832,6 +25333,17 @@ ], "title": "Server Url" }, + "tunnel_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tunnel Id" + }, "type": { "const": "mcp", "title": "Type", @@ -24978,7 +25490,13 @@ "error": { "anyOf": [ { - "type": "string" + "$ref": "#/components/schemas/McpProtocolError" + }, + { + "$ref": "#/components/schemas/McpToolExecutionError" + }, + { + "$ref": "#/components/schemas/HTTPError" }, { "type": "null" @@ -25127,6 +25645,31 @@ "title": "McpListToolsTool", "type": "object" }, + "McpProtocolError": { + "additionalProperties": true, + "properties": { + "code": { + "title": "Code", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + }, + "type": { + "const": "mcp_protocol_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "code", + "message", + "type" + ], + "title": "McpProtocolError", + "type": "object" + }, "McpRequireApprovalMcpToolApprovalFilter": { "additionalProperties": true, "description": "Specify which of the MCP server's tools require approval.\n\nCan be\n`always`, `never`, or a filter object associated with tools\nthat require approval.", @@ -25221,6 +25764,25 @@ "title": "McpRequireApprovalMcpToolApprovalFilterNever", "type": "object" }, + "McpToolExecutionError": { + "additionalProperties": true, + "properties": { + "content": { + "title": "Content" + }, + "type": { + "const": "mcp_tool_execution_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "type" + ], + "title": "McpToolExecutionError", + "type": "object" + }, "Move": { "additionalProperties": true, "description": "A mouse move action.", @@ -25908,6 +26470,111 @@ "title": "PendingSafetyCheck", "type": "object" }, + "Program": { + "additionalProperties": true, + "properties": { + "call_id": { + "title": "Call Id", + "type": "string" + }, + "code": { + "title": "Code", + "type": "string" + }, + "fingerprint": { + "title": "Fingerprint", + "type": "string" + }, + "id": { + "title": "Id", + "type": "string" + }, + "type": { + "const": "program", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "call_id", + "code", + "fingerprint", + "type" + ], + "title": "Program", + "type": "object" + }, + "ProgramOutput": { + "additionalProperties": true, + "properties": { + "call_id": { + "title": "Call Id", + "type": "string" + }, + "id": { + "title": "Id", + "type": "string" + }, + "result": { + "title": "Result", + "type": "string" + }, + "status": { + "enum": [ + "completed", + "incomplete" + ], + "title": "Status", + "type": "string" + }, + "type": { + "const": "program_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "call_id", + "result", + "status", + "type" + ], + "title": "ProgramOutput", + "type": "object" + }, + "ProgrammaticToolCalling": { + "additionalProperties": true, + "properties": { + "type": { + "const": "programmatic_tool_calling", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ProgrammaticToolCalling", + "type": "object" + }, + "PromptCacheBreakpoint": { + "additionalProperties": true, + "description": "Marks the exact end of a reusable prompt prefix.\n\nThe breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", + "properties": { + "mode": { + "const": "explicit", + "title": "Mode", + "type": "string" + } + }, + "required": [ + "mode" + ], + "title": "PromptCacheBreakpoint", + "type": "object" + }, "RankingOptions": { "additionalProperties": true, "description": "Ranking options for search.", @@ -26029,6 +26696,34 @@ "title": "RealtimeTranscriptionSessionResponse", "type": "object" }, + "Reasoning": { + "additionalProperties": true, + "description": "The reasoning configuration applied by this update.", + "properties": { + "effort": { + "anyOf": [ + { + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Effort" + } + }, + "title": "Reasoning", + "type": "object" + }, "ResponseAPIUsage": { "additionalProperties": true, "properties": { @@ -26092,6 +26787,20 @@ "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -26153,6 +26862,20 @@ "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -26274,7 +26997,7 @@ }, "ResponseCompactionItem": { "additionalProperties": true, - "description": "A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).", + "description": "A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).", "properties": { "created_by": { "anyOf": [ @@ -26311,7 +27034,7 @@ }, "ResponseComputerToolCall": { "additionalProperties": true, - "description": "A tool call to a computer use tool.\n\nSee the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.", + "description": "A tool call to a computer use tool.\n\nSee the\n[computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.", "properties": { "action": { "anyOf": [ @@ -26533,6 +27256,37 @@ "title": "ResponseComputerToolCallOutputScreenshot", "type": "object" }, + "ResponseConfigurationUpdateItem": { + "additionalProperties": true, + "description": "A configuration update that applies to subsequent responses until it is\nreplaced by another configuration update.", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "reasoning": { + "anyOf": [ + { + "$ref": "#/components/schemas/Reasoning" + }, + { + "type": "null" + } + ] + }, + "type": { + "const": "configuration_update", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "title": "ResponseConfigurationUpdateItem", + "type": "object" + }, "ResponseContainerReference": { "additionalProperties": true, "description": "Represents a container created with /v1/containers.", @@ -26558,10 +27312,35 @@ "additionalProperties": true, "description": "A call to a custom tool created by the model.", "properties": { + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "call_id": { "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "id": { "anyOf": [ { @@ -26611,10 +27390,35 @@ "additionalProperties": true, "description": "A call to a custom tool created by the model.", "properties": { + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "call_id": { "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -26683,6 +27487,20 @@ "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -26749,7 +27567,7 @@ }, "ResponseFileSearchToolCall": { "additionalProperties": true, - "description": "The results of a file search tool call.\n\nSee the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.", + "description": "The results of a file search tool call.\n\nSee the\n[file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.", "properties": { "id": { "title": "Id", @@ -26836,7 +27654,7 @@ }, "ResponseFormatTextJSONSchemaConfigParam": { "additionalProperties": true, - "description": "JSON Schema response format.\n\nUsed to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).", + "description": "JSON Schema response format.\n\nUsed to generate structured JSON responses.\nLearn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).", "properties": { "description": { "title": "Description", @@ -26887,6 +27705,20 @@ "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -26949,6 +27781,20 @@ "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -27009,16 +27855,41 @@ }, "ResponseFunctionToolCall": { "additionalProperties": true, - "description": "A tool call to run a function.\n\nSee the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.", + "description": "A tool call to run a function.\n\nSee the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.", "properties": { "arguments": { "title": "Arguments", "type": "string" }, + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "call_id": { "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "id": { "anyOf": [ { @@ -27078,16 +27949,41 @@ }, "ResponseFunctionToolCallItem": { "additionalProperties": true, - "description": "A tool call to run a function.\n\nSee the\n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.", + "description": "A tool call to run a function.\n\nSee the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.", "properties": { "arguments": { "title": "Arguments", "type": "string" }, + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "call_id": { "title": "Call Id", "type": "string" }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" + }, "created_by": { "anyOf": [ { @@ -27148,8 +28044,29 @@ "additionalProperties": true, "properties": { "call_id": { - "title": "Call Id", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Id" + }, + "caller": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallerDirect" + }, + { + "$ref": "#/components/schemas/CallerProgram" + }, + { + "type": "null" + } + ], + "title": "Caller" }, "created_by": { "anyOf": [ @@ -27166,6 +28083,28 @@ "title": "Id", "type": "string" }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "namespace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Namespace" + }, "output": { "anyOf": [ { @@ -27207,7 +28146,6 @@ }, "required": [ "id", - "call_id", "output", "status", "type" @@ -27217,7 +28155,7 @@ }, "ResponseFunctionWebSearch": { "additionalProperties": true, - "description": "The results of a web search tool call.\n\nSee the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.", + "description": "The results of a web search tool call.\n\nSee the\n[web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.", "properties": { "action": { "anyOf": [ @@ -27242,7 +28180,8 @@ "in_progress", "searching", "completed", - "failed" + "failed", + "incomplete" ], "title": "Status", "type": "string" @@ -27270,8 +28209,9 @@ "anyOf": [ { "enum": [ - "high", - "low" + "auto", + "low", + "high" ], "type": "string" }, @@ -27325,6 +28265,16 @@ ], "title": "Filename" }, + "prompt_cache_breakpoint": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptCacheBreakpoint" + }, + { + "type": "null" + } + ] + }, "type": { "const": "input_file", "title": "Type", @@ -27339,7 +28289,7 @@ }, "ResponseInputImage": { "additionalProperties": true, - "description": "An image input to the model.\n\nLearn about [image inputs](https://platform.openai.com/docs/guides/vision).", + "description": "An image input to the model.\n\nLearn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).", "properties": { "detail": { "enum": [ @@ -27373,6 +28323,16 @@ ], "title": "Image Url" }, + "prompt_cache_breakpoint": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptCacheBreakpoint" + }, + { + "type": "null" + } + ] + }, "type": { "const": "input_image", "title": "Type", @@ -27454,6 +28414,16 @@ "additionalProperties": true, "description": "A text input to the model.", "properties": { + "prompt_cache_breakpoint": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptCacheBreakpoint" + }, + { + "type": "null" + } + ] + }, "text": { "title": "Text", "type": "string" @@ -27508,9 +28478,21 @@ { "$ref": "#/components/schemas/ResponseToolSearchOutputItem" }, + { + "$ref": "#/components/schemas/AdditionalTools" + }, + { + "$ref": "#/components/schemas/ResponseConfigurationUpdateItem" + }, { "$ref": "#/components/schemas/ResponseReasoningItem" }, + { + "$ref": "#/components/schemas/Program" + }, + { + "$ref": "#/components/schemas/ProgramOutput" + }, { "$ref": "#/components/schemas/ResponseCompactionItem" }, @@ -27751,7 +28733,7 @@ }, "ResponseReasoningItem": { "additionalProperties": true, - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).", + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://developers.openai.com/api/docs/guides/conversation-state).", "properties": { "content": { "anyOf": [ @@ -27821,7 +28803,7 @@ }, "ResponseTextConfigParam": { "additionalProperties": true, - "description": "Configuration options for a text response from the model.\n\nCan be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)", + "description": "Configuration options for a text response from the model.\n\nCan be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)", "properties": { "format": { "anyOf": [ @@ -27992,6 +28974,9 @@ { "$ref": "#/components/schemas/CodeInterpreter" }, + { + "$ref": "#/components/schemas/ProgrammaticToolCalling" + }, { "$ref": "#/components/schemas/ImageGeneration" }, @@ -28155,12 +29140,21 @@ { "$ref": "#/components/schemas/ResponseReasoningItem" }, + { + "$ref": "#/components/schemas/Program" + }, + { + "$ref": "#/components/schemas/ProgramOutput" + }, { "$ref": "#/components/schemas/ResponseToolSearchCall" }, { "$ref": "#/components/schemas/ResponseToolSearchOutputItem" }, + { + "$ref": "#/components/schemas/AdditionalTools" + }, { "$ref": "#/components/schemas/ResponseCompactionItem" }, @@ -28355,6 +29349,9 @@ { "$ref": "#/components/schemas/ToolChoiceCustomParam" }, + { + "$ref": "#/components/schemas/ToolChoiceSpecificProgrammaticToolCallingParam" + }, { "$ref": "#/components/schemas/ToolChoiceApplyPatchParam" }, @@ -28393,6 +29390,9 @@ { "$ref": "#/components/schemas/CodeInterpreter" }, + { + "$ref": "#/components/schemas/ProgrammaticToolCalling" + }, { "$ref": "#/components/schemas/ImageGeneration" }, @@ -28845,9 +29845,24 @@ "title": "ToolChoiceShellParam", "type": "object" }, + "ToolChoiceSpecificProgrammaticToolCallingParam": { + "additionalProperties": true, + "properties": { + "type": { + "const": "programmatic_tool_calling", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceSpecificProgrammaticToolCallingParam", + "type": "object" + }, "ToolChoiceTypesParam": { "additionalProperties": true, - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).", + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).", "properties": { "type": { "enum": [ @@ -28873,6 +29888,35 @@ "ToolFunction": { "additionalProperties": true, "properties": { + "allowed_callers": { + "anyOf": [ + { + "items": { + "enum": [ + "direct", + "programmatic" + ], + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Callers" + }, + "async": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Async" + }, "defer_loading": { "anyOf": [ { @@ -28899,6 +29943,18 @@ "title": "Name", "type": "string" }, + "output_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Output Schema" + }, "parameters": { "anyOf": [ {}, @@ -29062,7 +30118,7 @@ }, "WebSearchPreviewTool": { "additionalProperties": true, - "description": "This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).", + "description": "This tool searches the web for relevant results to use in a response.\n\nLearn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).", "properties": { "search_content_types": { "anyOf": [ @@ -29125,8 +30181,19 @@ }, "WebSearchTool": { "additionalProperties": true, - "description": "Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search).", + "description": "Search the Internet for sources related to the prompt.\n\nLearn more about the\n[web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).", "properties": { + "external_web_access": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "External Web Access" + }, "filters": { "anyOf": [ { @@ -29180,7 +30247,7 @@ }, "openai__types__responses__web_search_preview_tool__UserLocation": { "additionalProperties": true, - "description": "The user's location.", + "description": "The approximate location of the user.\n\nIf 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.", "properties": { "city": { "anyOf": [ @@ -29240,7 +30307,7 @@ }, "openai__types__responses__web_search_tool__UserLocation": { "additionalProperties": true, - "description": "The approximate location of the user.", + "description": "The approximate location of the user.\n\nIf omitted or null, defaults to the\nUnited States. To avoid this fallback, pass `{\"type\": \"approximate\"}` without\nlocation fields. To localize results, provide the relevant location fields.", "properties": { "city": { "anyOf": [ @@ -47554,6 +48621,9 @@ "input_audio": { "$ref": "#/components/schemas/InputAudio" }, + "prompt_cache_breakpoint": { + "$ref": "#/components/schemas/PromptCacheBreakpoint" + }, "type": { "const": "input_audio", "title": "Type", @@ -48939,6 +50009,21 @@ "title": "PolicyValidationResponse", "type": "object" }, + "PromptCacheBreakpoint": { + "description": "Marks the exact end of a reusable prompt prefix.\n\nThe breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", + "properties": { + "mode": { + "const": "explicit", + "title": "Mode", + "type": "string" + } + }, + "required": [ + "mode" + ], + "title": "PromptCacheBreakpoint", + "type": "object" + }, "SuggestTemplatesRequest": { "properties": { "attack_examples": { diff --git a/litellm/proxy/common_utils/responses_stream_errors.py b/litellm/proxy/common_utils/responses_stream_errors.py index 3409b4b6657..2b57618ea5f 100644 --- a/litellm/proxy/common_utils/responses_stream_errors.py +++ b/litellm/proxy/common_utils/responses_stream_errors.py @@ -72,7 +72,7 @@ def _failure_details(original: Exception) -> _FailureDetails: upstream: Final = _FailureDetails.model_validate(body) return _FailureDetails( message=upstream.message or mapped.message, - code=upstream.code if upstream.code is not None else mapped.code, + code=upstream.code if "code" in body and body["code"] is not None else mapped.code, type=upstream.type or mapped.type, status_code=mapped.status_code, ) diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index 16fbd1de376..7bc404c6eca 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -22,6 +22,7 @@ from types import MappingProxyType from typing import TYPE_CHECKING, Annotated, Final, Literal, Protocol, cast import httpx +import httpx2 import openai from fastapi import APIRouter, Depends, HTTPException, Request, Response, WebSocket from fastapi.responses import StreamingResponse @@ -3398,7 +3399,7 @@ async def openai_websocket_proxy_route( base_target_url: Final = os.getenv("OPENAI_API_BASE") or "https://api.openai.com/" try: openai_api_key: Final = await _openai_passthrough_credential(base_target_url) - except (openai.OpenAIError, httpx.HTTPError, LiteLLMOpenAIError): + except (openai.OpenAIError, httpx.HTTPError, httpx2.HTTPError, LiteLLMOpenAIError): verbose_proxy_logger.exception("OpenAI workload identity token exchange failed for websocket passthrough") await websocket.close(code=1011, reason=_OPENAI_WS_TOKEN_EXCHANGE_FAILED_REASON) return diff --git a/litellm/responses/streaming_iterator.py b/litellm/responses/streaming_iterator.py index c5dc45566a9..dd6a554cefa 100644 --- a/litellm/responses/streaming_iterator.py +++ b/litellm/responses/streaming_iterator.py @@ -226,6 +226,9 @@ _ERROR_CODE_HTTP_STATUS: Final[Mapping[str, int]] = MappingProxyType( "insufficient_quota": 429, "vector_store_timeout": 504, "invalid_prompt": 400, + "data_residency_mismatch": 400, + "bio_policy": 400, + "misalignment_policy_violation": 403, "invalid_image": 400, "invalid_image_format": 400, "invalid_base64_image": 400, diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index c96e3e2c031..d9ec2cece9e 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -2,8 +2,10 @@ import asyncio import base64 import importlib import os +import sys from collections.abc import Callable, Coroutine, Iterator from dataclasses import dataclass, field +from functools import partial from pathlib import Path from types import MappingProxyType from typing import Final, Literal, TypeAlias @@ -427,6 +429,32 @@ def fake_provider_credentials(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv(name, value) +@pytest.fixture +def openai_token_exchange_via_httpx(monkeypatch: pytest.MonkeyPatch) -> None: + workload_module: Final = sys.modules.get("openai.auth._workload") + native_client_factory: Final = getattr(workload_module, "DefaultHttpx2Client", None) + if native_client_factory is None: + return + import httpx2 + + def send_through_httpx(request: httpx2.Request) -> httpx2.Response: + with httpx.Client(trust_env=False) as client: + try: + response: Final = client.send( + httpx.Request(request.method, str(request.url), headers=dict(request.headers), content=request.content) + ) + except httpx.TransportError as error: + native_error: Final = getattr(httpx2, type(error).__name__, httpx2.TransportError) + raise native_error(str(error), request=request) from error + return httpx2.Response(response.status_code, headers=dict(response.headers), content=response.content) + + monkeypatch.setattr( + workload_module, + "DefaultHttpx2Client", + partial(native_client_factory, transport=httpx2.MockTransport(send_through_httpx), trust_env=False), + ) + + @pytest.fixture async def drained_logging_worker() -> None: await asyncio.wait_for(GLOBAL_LOGGING_WORKER.clear_queue(), timeout=10) diff --git a/tests/unit/litellm_core_utils/test_exception_mapping_utils.py b/tests/unit/litellm_core_utils/test_exception_mapping_utils.py index 5ee14ff530d..365e319e34b 100644 --- a/tests/unit/litellm_core_utils/test_exception_mapping_utils.py +++ b/tests/unit/litellm_core_utils/test_exception_mapping_utils.py @@ -2235,10 +2235,8 @@ def test_completion_perplexity_exception_on_openai_client(monkeypatch): model="perplexity/mistral-7b-instruct", messages=[{"role": "user", "content": "hello"}], ) - assert ( - "The api_key client option must be set either by passing api_key to the client or by setting the PERPLEXITY_API_KEY environment variable" - in str(exc_info.value) - ) + assert "PERPLEXITY_API_KEY" in str(exc_info.value) + assert "OPENAI_API_KEY" not in str(exc_info.value) @pytest.mark.asyncio diff --git a/tests/unit/llms/azure_ai/chat/test_azure_ai_transformation.py b/tests/unit/llms/azure_ai/chat/test_azure_ai_transformation.py index 5186541a62b..1a6d206dbc8 100644 --- a/tests/unit/llms/azure_ai/chat/test_azure_ai_transformation.py +++ b/tests/unit/llms/azure_ai/chat/test_azure_ai_transformation.py @@ -160,6 +160,11 @@ async def test_azure_ai_acompletion_posts_the_conversation_to_the_models_endpoin "/openai/deployments/gpt-4.1-mini/chat/completions", id="full-deployment-url", ), + pytest.param( + "https://example-resource.services.ai.azure.com/openai/deployments/gpt-4.1-mini/chat/completions", + "/openai/deployments/gpt-4.1-mini/chat/completions", + id="full-deployment-url-without-query", + ), ], ) def test_azure_ai_completion_routes_flexible_api_base( diff --git a/tests/unit/llms/openai/test_openai_workload_identity.py b/tests/unit/llms/openai/test_openai_workload_identity.py index 1a1a4ca7047..c85f132e9fd 100644 --- a/tests/unit/llms/openai/test_openai_workload_identity.py +++ b/tests/unit/llms/openai/test_openai_workload_identity.py @@ -56,22 +56,7 @@ CHAT_COMPLETION_BODY: Final = { } -@pytest.fixture(autouse=True) -def mock_sdk_token_exchange_transport(monkeypatch: pytest.MonkeyPatch) -> None: - native_client_factory: Final = getattr(sys.modules.get("openai.auth._workload"), "DefaultHttpx2Client", None) - if native_client_factory is not None: - import httpx2 - - def handle_exchange(request: httpx2.Request) -> httpx2.Response: - response: Final = respx.mock.handler( - httpx.Request(request.method, str(request.url), headers=dict(request.headers), content=request.content) - ) - return httpx2.Response(response.status_code, headers=dict(response.headers), content=response.content) - - monkeypatch.setattr( - "openai.auth._workload.DefaultHttpx2Client", - partial(native_client_factory, transport=httpx2.MockTransport(handle_exchange), trust_env=False), - ) +pytestmark = pytest.mark.usefixtures("openai_token_exchange_via_httpx") @pytest.fixture diff --git a/tests/unit/proxy/guardrails/guardrail_hooks/openai/test_moderations.py b/tests/unit/proxy/guardrails/guardrail_hooks/openai/test_moderations.py index 930309d62ed..8412e72ca6a 100644 --- a/tests/unit/proxy/guardrails/guardrail_hooks/openai/test_moderations.py +++ b/tests/unit/proxy/guardrails/guardrail_hooks/openai/test_moderations.py @@ -1119,6 +1119,7 @@ class _ModerationsEndpointThatRecordsTheAuthorization: @pytest.mark.asyncio +@pytest.mark.usefixtures("openai_token_exchange_via_httpx") @respx.mock async def test_openai_moderation_sends_the_federated_bearer_when_only_workload_identity_is_set( monkeypatch: pytest.MonkeyPatch, tmp_path: Path @@ -1149,6 +1150,7 @@ async def test_openai_moderation_sends_the_federated_bearer_when_only_workload_i @pytest.mark.asyncio +@pytest.mark.usefixtures("openai_token_exchange_via_httpx") @respx.mock async def test_openai_moderation_federates_with_the_identity_in_its_own_guardrail_config( monkeypatch: pytest.MonkeyPatch, tmp_path: Path diff --git a/tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py b/tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py index 0186a33dbc4..c5626df405e 100644 --- a/tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py +++ b/tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py @@ -4058,7 +4058,7 @@ def test_openai_passthrough_forwards_verbatim_to_openai( @pytest.fixture -def openai_wif_env(monkeypatch: pytest.MonkeyPatch, tmp_path) -> None: +def openai_wif_env(monkeypatch: pytest.MonkeyPatch, tmp_path, openai_token_exchange_via_httpx: None) -> None: from litellm.llms.openai.workload_identity import _workload_identity_auth token_file: Final = tmp_path / "subject_token.jwt" diff --git a/tests/unit/proxy/test_openai_ws_passthrough_routes.py b/tests/unit/proxy/test_openai_ws_passthrough_routes.py index 6a9cd972dc2..3c785af2437 100644 --- a/tests/unit/proxy/test_openai_ws_passthrough_routes.py +++ b/tests/unit/proxy/test_openai_ws_passthrough_routes.py @@ -182,7 +182,7 @@ TOKEN_EXCHANGE_URL: Final = "https://auth.openai.com/oauth/token" @pytest.fixture -def openai_wif_token_file(monkeypatch, tmp_path): +def openai_wif_token_file(monkeypatch, tmp_path, openai_token_exchange_via_httpx: None): token_file = tmp_path / "subject_token.jwt" token_file.write_text("subject-token-from-file") monkeypatch.delenv("OPENAI_API_BASE", raising=False) diff --git a/tests/unit/realtime_api/test_main.py b/tests/unit/realtime_api/test_main.py index 4d89ee497a5..4cc181ea41a 100644 --- a/tests/unit/realtime_api/test_main.py +++ b/tests/unit/realtime_api/test_main.py @@ -1081,7 +1081,9 @@ async def test_voice_transcript_blocked_by_guardrail(): @pytest.fixture -def federated_deployment(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> dict[str, str]: +def federated_deployment( + monkeypatch: pytest.MonkeyPatch, tmp_path: Path, openai_token_exchange_via_httpx: None +) -> dict[str, str]: token_file: Final = tmp_path / "subject_token.jwt" token_file.write_text("subject-token") for name in ( diff --git a/tests/unit/responses/test_streaming_iterator_error_events.py b/tests/unit/responses/test_streaming_iterator_error_events.py index 04d2b9ddf81..373c562066d 100644 --- a/tests/unit/responses/test_streaming_iterator_error_events.py +++ b/tests/unit/responses/test_streaming_iterator_error_events.py @@ -608,6 +608,9 @@ def test_every_openai_sdk_response_error_code_has_explicit_status_mapping(): ("empty_image_file", 400), ("failed_to_download_image", 400), ("image_file_not_found", 400), + ("data_residency_mismatch", 400), + ("bio_policy", 400), + ("misalignment_policy_violation", 403), ("totally_unknown_future_code", 500), ("429", 429), ("503", 503), diff --git a/tests/unit/test_router/test_router.py b/tests/unit/test_router/test_router.py index 13ac55fa937..12c057c87d3 100644 --- a/tests/unit/test_router/test_router.py +++ b/tests/unit/test_router/test_router.py @@ -26971,7 +26971,7 @@ def test_router_dynamic_cooldown_correct_retry_after_time(): ] ) - openai_client = openai.OpenAI(api_key="") + openai_client = openai.OpenAI(api_key="sk-fake") cooldown_time = 30 diff --git a/tests/unit/test_router/test_router_provider_endpoints.py b/tests/unit/test_router/test_router_provider_endpoints.py index f8b57410872..cf0b0a5e187 100644 --- a/tests/unit/test_router/test_router_provider_endpoints.py +++ b/tests/unit/test_router/test_router_provider_endpoints.py @@ -95,11 +95,16 @@ def _ratelimit_headers(response: ModelResponse | CustomStreamWrapper) -> dict[st def _openai_router_client() -> AsyncOpenAI: - return AsyncOpenAI(api_key="sk-fake") + return AsyncOpenAI(api_key="sk-fake", http_client=httpx.AsyncClient()) def _azure_router_client() -> AsyncAzureOpenAI: - return AsyncAzureOpenAI(api_key="sk-fake", azure_endpoint="https://azure.test", api_version="2025-02-01-preview") + return AsyncAzureOpenAI( + api_key="sk-fake", + azure_endpoint="https://azure.test", + api_version="2025-02-01-preview", + http_client=httpx.AsyncClient(), + ) @pytest.mark.asyncio diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index 2b174a1141a..165a66866d4 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -25543,7 +25543,7 @@ export interface components { /** Queries */ queries?: string[] | null; /** Query */ - query: string; + query?: string | null; /** Sources */ sources?: components["schemas"]["ActionSearchSource"][] | null; /** @@ -25632,6 +25632,25 @@ export interface components { [key: string]: string; }; }; + /** AdditionalTools */ + AdditionalTools: { + /** Id */ + id: string; + /** + * Role + * @enum {string} + */ + role: "unknown" | "user" | "assistant" | "system" | "critic" | "discriminator" | "developer" | "tool"; + /** Tools */ + tools: (components["schemas"]["FunctionTool"] | components["schemas"]["FileSearchTool"] | components["schemas"]["ComputerTool"] | components["schemas"]["ComputerUsePreviewTool"] | components["schemas"]["WebSearchTool"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellTool"] | components["schemas"]["CustomTool"] | components["schemas"]["NamespaceTool"] | components["schemas"]["ToolSearchTool"] | components["schemas"]["WebSearchPreviewTool"] | components["schemas"]["ApplyPatchTool"])[]; + /** + * Type + * @constant + */ + type: "additional_tools"; + } & { + [key: string]: unknown; + }; /** AdminIgnore */ AdminIgnore: { /** @@ -26277,6 +26296,8 @@ export interface components { ApplyPatchCall: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["ApplyPatchCallCallerDirect"] | components["schemas"]["ApplyPatchCallCallerProgram"] | null; /** Id */ id?: string | null; /** Operation */ @@ -26292,6 +26313,24 @@ export interface components { */ type: "apply_patch_call"; }; + /** ApplyPatchCallCallerDirect */ + ApplyPatchCallCallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + }; + /** ApplyPatchCallCallerProgram */ + ApplyPatchCallCallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + }; /** * ApplyPatchCallOperationCreateFile * @description Instruction for creating a new file via the apply_patch tool. @@ -26342,6 +26381,8 @@ export interface components { ApplyPatchCallOutput: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["ApplyPatchCallOutputCallerDirect"] | components["schemas"]["ApplyPatchCallOutputCallerProgram"] | null; /** Id */ id?: string | null; /** Output */ @@ -26357,11 +26398,31 @@ export interface components { */ type: "apply_patch_call_output"; }; + /** ApplyPatchCallOutputCallerDirect */ + ApplyPatchCallOutputCallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + }; + /** ApplyPatchCallOutputCallerProgram */ + ApplyPatchCallOutputCallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + }; /** * ApplyPatchTool * @description Allows the assistant to create, delete, or update files using unified diffs. */ ApplyPatchTool: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** * Type * @constant @@ -26375,6 +26436,8 @@ export interface components { * @description Allows the assistant to create, delete, or update files using unified diffs. */ ApplyPatchToolParam: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** * Type * @constant @@ -28528,6 +28591,28 @@ export interface components { /** Success And Failure */ success_and_failure: string[]; }; + /** CallerDirect */ + CallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + } & { + [key: string]: unknown; + }; + /** CallerProgram */ + CallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + } & { + [key: string]: unknown; + }; /** * CancelEvalResponse * @description Response from cancelling an evaluation @@ -28724,6 +28809,7 @@ export interface components { /** ChatCompletionAudioObject */ ChatCompletionAudioObject: { input_audio: components["schemas"]["InputAudio"]; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"]; /** * Type * @constant @@ -29453,6 +29539,8 @@ export interface components { * @description A tool that runs Python code to help generate a response to a prompt. */ CodeInterpreter: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** Container */ container: string | components["schemas"]["CodeInterpreterContainerCodeInterpreterToolAuto"]; /** @@ -29484,6 +29572,17 @@ export interface components { } & { [key: string]: unknown; }; + /** + * CompactionTrigger + * @description Compacts the current context. Must be the final input item. + */ + CompactionTrigger: { + /** + * Type + * @constant + */ + type: "compaction_trigger"; + }; /** * ComparisonFilter * @description A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -29657,7 +29756,7 @@ export interface components { * ComputerTool * @description A tool that controls a virtual computer. * - * Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + * Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). */ ComputerTool: { /** @@ -29672,7 +29771,7 @@ export interface components { * ComputerUsePreviewTool * @description A tool that controls a virtual computer. * - * Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + * Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). */ ComputerUsePreviewTool: { /** Display Height */ @@ -29696,7 +29795,7 @@ export interface components { * ComputerUsePreviewToolParam * @description A tool that controls a virtual computer. * - * Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + * Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). */ ComputerUsePreviewToolParam: { /** Display Height */ @@ -31233,9 +31332,13 @@ export interface components { * CustomTool * @description A custom tool that processes input using a specified format. * - * Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + * Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) */ CustomTool: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Async */ + async?: boolean | null; /** Defer Loading */ defer_loading?: boolean | null; /** Description */ @@ -31283,9 +31386,13 @@ export interface components { * CustomToolParam * @description A custom tool that processes input using a specified format. * - * Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + * Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) */ CustomToolParam: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Async */ + async?: boolean; /** Defer Loading */ defer_loading?: boolean; /** Description */ @@ -32464,7 +32571,7 @@ export interface components { * FileSearchTool * @description A tool that searches for relevant content from uploaded files. * - * Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + * Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). */ FileSearchTool: { /** Filters */ @@ -32486,7 +32593,7 @@ export interface components { * FileSearchToolParam * @description A tool that searches for relevant content from uploaded files. * - * Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + * Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). */ FileSearchToolParam: { /** Filters */ @@ -32527,9 +32634,15 @@ export interface components { */ FunctionCallOutput: { /** Call Id */ - call_id: string; + call_id?: string | null; + /** Caller */ + caller?: components["schemas"]["FunctionCallOutputCallerDirect"] | components["schemas"]["FunctionCallOutputCallerProgram"] | null; /** Id */ id?: string | null; + /** Name */ + name?: string | null; + /** Namespace */ + namespace?: string | null; /** Output */ output: string | (components["schemas"]["ResponseInputTextContentParam"] | components["schemas"]["ResponseInputImageContentParam"] | components["schemas"]["ResponseInputFileContentParam"])[]; /** Status */ @@ -32540,11 +32653,31 @@ export interface components { */ type: "function_call_output"; }; + /** FunctionCallOutputCallerDirect */ + FunctionCallOutputCallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + }; + /** FunctionCallOutputCallerProgram */ + FunctionCallOutputCallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + }; /** * FunctionShellTool * @description A tool that allows the model to execute shell commands. */ FunctionShellTool: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** Environment */ environment?: components["schemas"]["ContainerAuto"] | components["schemas"]["LocalEnvironment"] | components["schemas"]["ContainerReference"] | null; /** @@ -32560,6 +32693,8 @@ export interface components { * @description A tool that allows the model to execute shell commands. */ FunctionShellToolParam: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** Environment */ environment?: components["schemas"]["ContainerAutoParam"] | components["schemas"]["LocalEnvironmentParam"] | components["schemas"]["ContainerReferenceParam"] | null; /** @@ -32572,15 +32707,23 @@ export interface components { * FunctionTool * @description Defines a function in your own code the model can choose to call. * - * Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + * Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). */ FunctionTool: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Async */ + async?: boolean | null; /** Defer Loading */ defer_loading?: boolean | null; /** Description */ description?: string | null; /** Name */ name: string; + /** Output Schema */ + output_schema?: { + [key: string]: unknown; + } | null; /** Parameters */ parameters?: { [key: string]: unknown; @@ -32599,15 +32742,23 @@ export interface components { * FunctionToolParam * @description Defines a function in your own code the model can choose to call. * - * Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + * Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). */ FunctionToolParam: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Async */ + async?: boolean; /** Defer Loading */ defer_loading?: boolean; /** Description */ description?: string | null; /** Name */ name: string; + /** Output Schema */ + output_schema?: { + [key: string]: unknown; + } | null; /** Parameters */ parameters: { [key: string]: unknown; @@ -33304,6 +33455,20 @@ export interface components { */ type: "http"; }; + /** HTTPError */ + HTTPError: { + /** Code */ + code: number; + /** Message */ + message: string; + /** + * Type + * @constant + */ + type: "http_error"; + } & { + [key: string]: unknown; + }; /** HTTPValidationError */ HTTPValidationError: { /** Detail */ @@ -33409,7 +33574,7 @@ export interface components { input_fidelity?: ("high" | "low") | null; input_image_mask?: components["schemas"]["ImageGenerationInputImageMask"] | null; /** Model */ - model?: string | ("gpt-image-1" | "gpt-image-1-mini" | "gpt-image-1.5") | null; + model?: string | ("gpt-image-1" | "gpt-image-1-mini" | "gpt-image-2" | "gpt-image-2-2026-04-21" | "gpt-image-2.5-sunburst" | "gpt-image-2.5-sunburst-2026-09-08" | "gpt-image-2.5-flare" | "gpt-image-2.5-flare-2026-09-08" | "gpt-image-1.5" | "chatgpt-image-latest") | null; /** Moderation */ moderation?: ("auto" | "low") | null; /** Output Compression */ @@ -33419,9 +33584,9 @@ export interface components { /** Partial Images */ partial_images?: number | null; /** Quality */ - quality?: ("low" | "medium" | "high" | "auto") | null; + quality?: ("low" | "medium" | "high" | "xhigh" | "max" | "auto") | null; /** Size */ - size?: ("1024x1024" | "1024x1536" | "1536x1024" | "auto") | null; + size?: string | ("1024x1024" | "1024x1536" | "1536x1024" | "auto") | null; /** * Type * @constant @@ -33435,10 +33600,23 @@ export interface components { * @description An image generation request made by the model. */ ImageGenerationCall: { + /** Action */ + action?: ("generate" | "edit" | "auto") | null; + /** Background */ + background?: ("transparent" | "opaque" | "auto") | null; + error?: components["schemas"]["ImageGenerationCallError"] | null; /** Id */ id: string; + /** Output Format */ + output_format?: ("png" | "webp" | "jpeg") | null; + /** Quality */ + quality?: ("low" | "medium" | "high" | "xhigh" | "max" | "auto") | null; /** Result */ result?: string | null; + /** Revised Prompt */ + revised_prompt?: string | null; + /** Size */ + size?: string | ("1024x1024" | "1024x1536" | "1536x1024") | null; /** * Status * @enum {string} @@ -33452,6 +33630,38 @@ export interface components { } & { [key: string]: unknown; }; + /** + * ImageGenerationCallError + * @description Details of a moderation failure, when available. + */ + ImageGenerationCallError: { + /** Code */ + code?: string | null; + /** Message */ + message: string; + moderation_details?: components["schemas"]["ImageGenerationCallErrorModerationDetails"] | null; + /** Param */ + param?: string | null; + /** Type */ + type: string; + } & { + [key: string]: unknown; + }; + /** + * ImageGenerationCallErrorModerationDetails + * @description Public details for a `moderation_blocked` error, when available. + */ + ImageGenerationCallErrorModerationDetails: { + /** Categories */ + categories: string[]; + /** + * Moderation Stage + * @enum {string} + */ + moderation_stage: "input" | "output" | "unknown"; + } & { + [key: string]: unknown; + }; /** * ImageGenerationInputImageMask * @description Optional mask for inpainting. @@ -33495,7 +33705,7 @@ export interface components { */ IncompleteDetails: { /** Reason */ - reason?: ("max_output_tokens" | "content_filter") | null; + reason?: ("max_output_tokens" | "max_messages" | "content_filter" | "steered") | null; } & { [key: string]: unknown; }; @@ -35592,7 +35802,7 @@ export interface components { [key: string]: unknown; }[] | null; /** Timeout */ - timeout?: number | string | null; + timeout?: number | string | components["schemas"]["Timeout"] | null; /** Timeout By Service Tier */ timeout_by_service_tier?: { [key: string]: number; @@ -37964,9 +38174,11 @@ export interface components { /** * Mcp * @description Give the model access to additional tools via remote Model Context Protocol - * (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + * (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). */ Mcp: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; /** Allowed Tools */ allowed_tools?: string[] | components["schemas"]["McpAllowedToolsMcpToolFilter"] | null; /** Authorization */ @@ -37987,6 +38199,8 @@ export interface components { server_label: string; /** Server Url */ server_url?: string | null; + /** Tunnel Id */ + tunnel_id?: string | null; /** * Type * @constant @@ -38059,7 +38273,7 @@ export interface components { /** Arguments */ arguments: string; /** Error */ - error?: string | null; + error?: components["schemas"]["McpProtocolError"] | components["schemas"]["McpToolExecutionError"] | components["schemas"]["HTTPError"] | null; /** Id */ id: string; /** Name */ @@ -38115,6 +38329,20 @@ export interface components { } & { [key: string]: unknown; }; + /** McpProtocolError */ + McpProtocolError: { + /** Code */ + code: number; + /** Message */ + message: string; + /** + * Type + * @constant + */ + type: "mcp_protocol_error"; + } & { + [key: string]: unknown; + }; /** * McpRequireApprovalMcpToolApprovalFilter * @description Specify which of the MCP server's tools require approval. @@ -38153,6 +38381,18 @@ export interface components { } & { [key: string]: unknown; }; + /** McpToolExecutionError */ + McpToolExecutionError: { + /** Content */ + content: unknown; + /** + * Type + * @constant + */ + type: "mcp_tool_execution_error"; + } & { + [key: string]: unknown; + }; /** Member */ Member: { /** @@ -41508,6 +41748,55 @@ export interface components { */ version_status: string; }; + /** Program */ + Program: { + /** Call Id */ + call_id: string; + /** Code */ + code: string; + /** Fingerprint */ + fingerprint: string; + /** Id */ + id: string; + /** + * Type + * @constant + */ + type: "program"; + } & { + [key: string]: unknown; + }; + /** ProgramOutput */ + ProgramOutput: { + /** Call Id */ + call_id: string; + /** Id */ + id: string; + /** Result */ + result: string; + /** + * Status + * @enum {string} + */ + status: "completed" | "incomplete"; + /** + * Type + * @constant + */ + type: "program_output"; + } & { + [key: string]: unknown; + }; + /** ProgrammaticToolCalling */ + ProgrammaticToolCalling: { + /** + * Type + * @constant + */ + type: "programmatic_tool_calling"; + } & { + [key: string]: unknown; + }; /** Prompt */ Prompt: { litellm_params: components["schemas"]["PromptLiteLLMParams"]; @@ -41515,6 +41804,21 @@ export interface components { prompt_id: string; prompt_info?: components["schemas"]["PromptInfo"] | null; }; + /** + * PromptCacheBreakpoint + * @description Marks the exact end of a reusable prompt prefix. + * + * The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + */ + PromptCacheBreakpoint: { + /** + * Mode + * @constant + */ + mode: "explicit"; + } & { + [key: string]: unknown; + }; /** PromptCacheOptions */ PromptCacheOptions: { /** @@ -42000,18 +42304,13 @@ export interface components { }; /** * Reasoning - * @description **gpt-5 and o-series models only** - * - * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * @description The reasoning configuration applied by this update. */ Reasoning: { /** Effort */ - effort?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh") | null; - /** Generate Summary */ - generate_summary?: ("auto" | "concise" | "detailed") | null; - /** Summary */ - summary?: ("auto" | "concise" | "detailed") | null; + effort?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null; + } & { + [key: string]: unknown; }; /** RegenerateKeyRequest */ RegenerateKeyRequest: { @@ -42875,6 +43174,8 @@ export interface components { ResponseApplyPatchToolCall: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -42901,6 +43202,8 @@ export interface components { ResponseApplyPatchToolCallOutput: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -42972,7 +43275,7 @@ export interface components { }; /** * ResponseCompactionItem - * @description A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + * @description A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). */ ResponseCompactionItem: { /** Created By */ @@ -42991,7 +43294,7 @@ export interface components { }; /** * ResponseCompactionItemParamParam - * @description A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + * @description A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). */ ResponseCompactionItemParamParam: { /** Encrypted Content */ @@ -43009,7 +43312,7 @@ export interface components { * @description A tool call to a computer use tool. * * See the - * [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + * [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. */ ResponseComputerToolCall: { /** Action */ @@ -43096,7 +43399,7 @@ export interface components { * @description A tool call to a computer use tool. * * See the - * [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + * [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. */ ResponseComputerToolCallParam: { /** Action */ @@ -43120,6 +43423,41 @@ export interface components { */ type: "computer_call"; }; + /** + * ResponseConfigurationUpdateItem + * @description A configuration update that applies to subsequent responses until it is + * replaced by another configuration update. + */ + ResponseConfigurationUpdateItem: { + /** Id */ + id: string; + reasoning?: components["schemas"]["Reasoning"] | null; + /** + * Type + * @constant + */ + type: "configuration_update"; + } & { + [key: string]: unknown; + }; + /** + * ResponseConfigurationUpdateItemParamParam + * @description An update to the conversation's response configuration. + * + * The configuration + * remains in effect for subsequent responses until it is replaced by another + * configuration update. + */ + ResponseConfigurationUpdateItemParamParam: { + /** Id */ + id?: string | null; + reasoning?: components["schemas"]["openai__types__responses__response_configuration_update_item_param_param__Reasoning"]; + /** + * Type + * @constant + */ + type: "configuration_update"; + }; /** * ResponseContainerReference * @description Represents a container created with /v1/containers. @@ -43140,8 +43478,12 @@ export interface components { * @description A call to a custom tool created by the model. */ ResponseCustomToolCall: { + /** Async */ + async?: boolean | null; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Id */ id?: string | null; /** Input */ @@ -43163,8 +43505,12 @@ export interface components { * @description A call to a custom tool created by the model. */ ResponseCustomToolCallItem: { + /** Async */ + async?: boolean | null; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -43195,6 +43541,8 @@ export interface components { ResponseCustomToolCallOutputItem: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -43221,6 +43569,8 @@ export interface components { ResponseCustomToolCallOutputParam: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Id */ id?: string; /** Output */ @@ -43236,8 +43586,12 @@ export interface components { * @description A call to a custom tool created by the model. */ ResponseCustomToolCallParam: { + /** Async */ + async?: boolean; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Id */ id?: string; /** Input */ @@ -43257,7 +43611,7 @@ export interface components { * @description The results of a file search tool call. * * See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. */ ResponseFileSearchToolCall: { /** Id */ @@ -43284,7 +43638,7 @@ export interface components { * @description The results of a file search tool call. * * See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. */ ResponseFileSearchToolCallParam: { /** Id */ @@ -43340,7 +43694,7 @@ export interface components { * @description JSON Schema response format. * * Used to generate structured JSON responses. - * Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + * Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). */ ResponseFormatTextJSONSchemaConfigParam: { /** Description */ @@ -43381,6 +43735,8 @@ export interface components { action: components["schemas"]["Action"]; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Environment */ @@ -43407,6 +43763,8 @@ export interface components { ResponseFunctionShellToolCallOutput: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -43433,13 +43791,17 @@ export interface components { * @description A tool call to run a function. * * See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. */ ResponseFunctionToolCall: { /** Arguments */ arguments: string; + /** Async */ + async?: boolean | null; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Id */ id?: string | null; /** Name */ @@ -43461,13 +43823,17 @@ export interface components { * @description A tool call to run a function. * * See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. */ ResponseFunctionToolCallItem: { /** Arguments */ arguments: string; + /** Async */ + async?: boolean | null; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ @@ -43492,11 +43858,17 @@ export interface components { /** ResponseFunctionToolCallOutputItem */ ResponseFunctionToolCallOutputItem: { /** Call Id */ - call_id: string; + call_id?: string | null; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Created By */ created_by?: string | null; /** Id */ id: string; + /** Name */ + name?: string | null; + /** Namespace */ + namespace?: string | null; /** Output */ output: string | (components["schemas"]["ResponseInputText"] | components["schemas"]["ResponseInputImage"] | components["schemas"]["ResponseInputFile"])[]; /** @@ -43517,13 +43889,17 @@ export interface components { * @description A tool call to run a function. * * See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. */ ResponseFunctionToolCallParam: { /** Arguments */ arguments: string; + /** Async */ + async?: boolean; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["CallerDirect"] | components["schemas"]["CallerProgram"] | null; /** Id */ id?: string; /** Name */ @@ -43546,7 +43922,7 @@ export interface components { * @description The results of a web search tool call. * * See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. */ ResponseFunctionWebSearch: { /** Action */ @@ -43557,7 +43933,7 @@ export interface components { * Status * @enum {string} */ - status: "in_progress" | "searching" | "completed" | "failed"; + status: "in_progress" | "searching" | "completed" | "failed" | "incomplete"; /** * Type * @constant @@ -43571,7 +43947,7 @@ export interface components { * @description The results of a web search tool call. * * See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. */ ResponseFunctionWebSearchParam: { /** Action */ @@ -43582,7 +43958,7 @@ export interface components { * Status * @enum {string} */ - status: "in_progress" | "searching" | "completed" | "failed"; + status: "in_progress" | "searching" | "completed" | "incomplete" | "failed"; /** * Type * @constant @@ -43595,7 +43971,7 @@ export interface components { */ ResponseInputFile: { /** Detail */ - detail?: ("high" | "low") | null; + detail?: ("auto" | "low" | "high") | null; /** File Data */ file_data?: string | null; /** File Id */ @@ -43604,6 +43980,7 @@ export interface components { file_url?: string | null; /** Filename */ filename?: string | null; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** * Type * @constant @@ -43621,7 +43998,7 @@ export interface components { * Detail * @enum {string} */ - detail?: "low" | "high"; + detail?: "auto" | "low" | "high"; /** File Data */ file_data?: string | null; /** File Id */ @@ -43630,6 +44007,7 @@ export interface components { file_url?: string | null; /** Filename */ filename?: string | null; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** * Type * @constant @@ -43645,7 +44023,7 @@ export interface components { * Detail * @enum {string} */ - detail?: "low" | "high"; + detail?: "auto" | "low" | "high"; /** File Data */ file_data?: string; /** File Id */ @@ -43654,6 +44032,7 @@ export interface components { file_url?: string; /** Filename */ filename?: string; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"]; /** * Type * @constant @@ -43664,7 +44043,7 @@ export interface components { * ResponseInputImage * @description An image input to the model. * - * Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + * Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). */ ResponseInputImage: { /** @@ -43676,6 +44055,7 @@ export interface components { file_id?: string | null; /** Image Url */ image_url?: string | null; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** * Type * @constant @@ -43688,7 +44068,7 @@ export interface components { * ResponseInputImageContentParam * @description An image input to the model. * - * Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + * Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) */ ResponseInputImageContentParam: { /** Detail */ @@ -43697,6 +44077,7 @@ export interface components { file_id?: string | null; /** Image Url */ image_url?: string | null; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** * Type * @constant @@ -43707,7 +44088,7 @@ export interface components { * ResponseInputImageParam * @description An image input to the model. * - * Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + * Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). */ ResponseInputImageParam: { /** @@ -43719,6 +44100,7 @@ export interface components { file_id?: string | null; /** Image Url */ image_url?: string | null; + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"]; /** * Type * @constant @@ -43751,6 +44133,7 @@ export interface components { * @description A text input to the model. */ ResponseInputText: { + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** Text */ text: string; /** @@ -43766,6 +44149,7 @@ export interface components { * @description A text input to the model. */ ResponseInputTextContentParam: { + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"] | null; /** Text */ text: string; /** @@ -43779,6 +44163,7 @@ export interface components { * @description A text input to the model. */ ResponseInputTextParam: { + prompt_cache_breakpoint?: components["schemas"]["PromptCacheBreakpoint"]; /** Text */ text: string; /** @@ -43793,7 +44178,7 @@ export interface components { */ ResponseItemList: { /** Data */ - data: (components["schemas"]["ResponseInputMessageItem"] | components["schemas"]["ResponseOutputMessage"] | components["schemas"]["ResponseFileSearchToolCall"] | components["schemas"]["ResponseComputerToolCall"] | components["schemas"]["ResponseComputerToolCallOutputItem"] | components["schemas"]["ResponseFunctionWebSearch"] | components["schemas"]["ResponseFunctionToolCallItem"] | components["schemas"]["ResponseFunctionToolCallOutputItem"] | components["schemas"]["ResponseToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItem"] | components["schemas"]["ResponseReasoningItem"] | components["schemas"]["ResponseCompactionItem"] | components["schemas"]["ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCall"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ResponseFunctionShellToolCall"] | components["schemas"]["ResponseFunctionShellToolCallOutput"] | components["schemas"]["ResponseApplyPatchToolCall"] | components["schemas"]["ResponseApplyPatchToolCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallItem"] | components["schemas"]["ResponseCustomToolCallOutputItem"])[]; + data: (components["schemas"]["ResponseInputMessageItem"] | components["schemas"]["ResponseOutputMessage"] | components["schemas"]["ResponseFileSearchToolCall"] | components["schemas"]["ResponseComputerToolCall"] | components["schemas"]["ResponseComputerToolCallOutputItem"] | components["schemas"]["ResponseFunctionWebSearch"] | components["schemas"]["ResponseFunctionToolCallItem"] | components["schemas"]["ResponseFunctionToolCallOutputItem"] | components["schemas"]["ResponseToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItem"] | components["schemas"]["AdditionalTools"] | components["schemas"]["ResponseConfigurationUpdateItem"] | components["schemas"]["ResponseReasoningItem"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"] | components["schemas"]["ResponseCompactionItem"] | components["schemas"]["ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCall"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ResponseFunctionShellToolCall"] | components["schemas"]["ResponseFunctionShellToolCallOutput"] | components["schemas"]["ResponseApplyPatchToolCall"] | components["schemas"]["ResponseApplyPatchToolCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallItem"] | components["schemas"]["ResponseCustomToolCallOutputItem"])[]; /** First Id */ first_id: string; /** Has More */ @@ -43950,7 +44335,7 @@ export interface components { * @description A description of the chain of thought used by a reasoning model while generating * a response. Be sure to include these items in your `input` to the Responses API * for subsequent turns of a conversation if you are manually - * [managing context](https://platform.openai.com/docs/guides/conversation-state). + * [managing context](https://developers.openai.com/api/docs/guides/conversation-state). */ ResponseReasoningItem: { /** Content */ @@ -43976,7 +44361,7 @@ export interface components { * @description A description of the chain of thought used by a reasoning model while generating * a response. Be sure to include these items in your `input` to the Responses API * for subsequent turns of a conversation if you are manually - * [managing context](https://platform.openai.com/docs/guides/conversation-state). + * [managing context](https://developers.openai.com/api/docs/guides/conversation-state). */ ResponseReasoningItemParam: { /** Content */ @@ -44004,8 +44389,8 @@ export interface components { * * Can be plain * text or structured JSON data. Learn more: - * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + * - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ ResponseTextConfigParam: { /** Format */ @@ -44062,7 +44447,7 @@ export interface components { */ status: "in_progress" | "completed" | "incomplete"; /** Tools */ - tools: (components["schemas"]["FunctionTool"] | components["schemas"]["FileSearchTool"] | components["schemas"]["ComputerTool"] | components["schemas"]["ComputerUsePreviewTool"] | components["schemas"]["WebSearchTool"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellTool"] | components["schemas"]["CustomTool"] | components["schemas"]["NamespaceTool"] | components["schemas"]["ToolSearchTool"] | components["schemas"]["WebSearchPreviewTool"] | components["schemas"]["ApplyPatchTool"])[]; + tools: (components["schemas"]["FunctionTool"] | components["schemas"]["FileSearchTool"] | components["schemas"]["ComputerTool"] | components["schemas"]["ComputerUsePreviewTool"] | components["schemas"]["WebSearchTool"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellTool"] | components["schemas"]["CustomTool"] | components["schemas"]["NamespaceTool"] | components["schemas"]["ToolSearchTool"] | components["schemas"]["WebSearchPreviewTool"] | components["schemas"]["ApplyPatchTool"])[]; /** * Type * @constant @@ -44085,7 +44470,7 @@ export interface components { /** Status */ status?: ("in_progress" | "completed" | "incomplete") | null; /** Tools */ - tools: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"])[]; + tools: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["ToolMcp"] | components["schemas"]["ToolCodeInterpreter"] | components["schemas"]["ToolProgrammaticToolCalling"] | components["schemas"]["ToolImageGeneration"] | components["schemas"]["ToolLocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["ToolSearchOutputNamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"])[]; /** * Type * @constant @@ -44104,7 +44489,7 @@ export interface components { /** Include */ include?: ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | null; /** Input */ - input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["ItemReference"])[]; + input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_AdditionalTools"] | components["schemas"]["ResponseConfigurationUpdateItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["CompactionTrigger"] | components["schemas"]["ItemReference"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"])[]; /** Instructions */ instructions?: string | null; /** Max Output Tokens */ @@ -44129,7 +44514,7 @@ export interface components { prompt_cache_options?: components["schemas"]["PromptCacheOptions"] | null; /** Prompt Cache Retention */ prompt_cache_retention?: string | null; - reasoning?: components["schemas"]["Reasoning"] | null; + reasoning?: components["schemas"]["openai__types__shared_params__reasoning__Reasoning"] | null; /** Safety Identifier */ safety_identifier?: string | null; /** Service Tier */ @@ -44143,9 +44528,9 @@ export interface components { temperature?: number | null; text?: components["schemas"]["ResponseTextConfigParam"] | null; /** Tool Choice */ - tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; + tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceSpecificProgrammaticToolCallingParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; /** Tools */ - tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; + tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; /** Top Logprobs */ top_logprobs?: number | null; /** Top P */ @@ -44172,6 +44557,23 @@ export interface components { /** Y */ y: number; }; + /** AdditionalTools */ + ResponsesAPIRequestParams_AdditionalTools: { + /** Id */ + id?: string | null; + /** + * Role + * @constant + */ + role: "developer"; + /** Tools */ + tools: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"])[]; + /** + * Type + * @constant + */ + type: "additional_tools"; + }; /** * DoubleClick * @description A double click action. @@ -44194,10 +44596,23 @@ export interface components { * @description An image generation request made by the model. */ ResponsesAPIRequestParams_ImageGenerationCall: { + /** Action */ + action?: ("generate" | "edit" | "auto") | null; + /** Background */ + background?: ("transparent" | "opaque" | "auto") | null; + error?: components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCallError"]; /** Id */ id: string; + /** Output Format */ + output_format?: ("png" | "webp" | "jpeg") | null; + /** Quality */ + quality?: ("low" | "medium" | "high" | "xhigh" | "max" | "auto") | null; /** Result */ result: string | null; + /** Revised Prompt */ + revised_prompt?: string | null; + /** Size */ + size?: string | ("1024x1024" | "1024x1536" | "1536x1024") | null; /** * Status * @enum {string} @@ -44209,6 +44624,21 @@ export interface components { */ type: "image_generation_call"; }; + /** + * ImageGenerationCallError + * @description Details of a moderation failure, when available. + */ + ResponsesAPIRequestParams_ImageGenerationCallError: { + /** Code */ + code: string | null; + /** Message */ + message: string; + moderation_details?: components["schemas"]["ImageGenerationCallErrorModerationDetails"]; + /** Param */ + param: string | null; + /** Type */ + type: string; + }; /** * McpApprovalResponse * @description A response to an MCP approval request. @@ -44277,7 +44707,7 @@ export interface components { /** Object */ object?: string | null; /** Output */ - output: (components["schemas"]["ResponseOutputMessage"] | components["schemas"]["ResponseFileSearchToolCall"] | components["schemas"]["ResponseFunctionToolCall"] | components["schemas"]["ResponseFunctionToolCallOutputItem"] | components["schemas"]["ResponseFunctionWebSearch"] | components["schemas"]["ResponseComputerToolCall"] | components["schemas"]["ResponseComputerToolCallOutputItem"] | components["schemas"]["ResponseReasoningItem"] | components["schemas"]["ResponseToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItem"] | components["schemas"]["ResponseCompactionItem"] | components["schemas"]["ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCall"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ResponseFunctionShellToolCall"] | components["schemas"]["ResponseFunctionShellToolCallOutput"] | components["schemas"]["ResponseApplyPatchToolCall"] | components["schemas"]["ResponseApplyPatchToolCallOutput"] | components["schemas"]["McpCall"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["McpApprovalResponse"] | components["schemas"]["ResponseCustomToolCall"] | components["schemas"]["ResponseCustomToolCallOutputItem"] | { + output: (components["schemas"]["ResponseOutputMessage"] | components["schemas"]["ResponseFileSearchToolCall"] | components["schemas"]["ResponseFunctionToolCall"] | components["schemas"]["ResponseFunctionToolCallOutputItem"] | components["schemas"]["ResponseFunctionWebSearch"] | components["schemas"]["ResponseComputerToolCall"] | components["schemas"]["ResponseComputerToolCallOutputItem"] | components["schemas"]["ResponseReasoningItem"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"] | components["schemas"]["ResponseToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItem"] | components["schemas"]["AdditionalTools"] | components["schemas"]["ResponseCompactionItem"] | components["schemas"]["ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCall"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ResponseFunctionShellToolCall"] | components["schemas"]["ResponseFunctionShellToolCallOutput"] | components["schemas"]["ResponseApplyPatchToolCall"] | components["schemas"]["ResponseApplyPatchToolCallOutput"] | components["schemas"]["McpCall"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["McpApprovalResponse"] | components["schemas"]["ResponseCustomToolCall"] | components["schemas"]["ResponseCustomToolCallOutputItem"] | { [key: string]: unknown; })[] | (components["schemas"]["GenericResponseOutputItem"] | components["schemas"]["OutputCodeInterpreterCall"] | components["schemas"]["OutputFunctionToolCall"] | components["schemas"]["OutputImageGenerationCall"] | components["schemas"]["ResponseFunctionToolCall"] | components["schemas"]["ResponseFunctionWebSearch"] | components["schemas"]["CustomToolCallOutputItem"] | components["schemas"]["OutputToolSearchCall"])[]; /** Parallel Tool Calls */ @@ -44299,9 +44729,9 @@ export interface components { [key: string]: unknown; } | null; /** Tool Choice */ - tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; + tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceSpecificProgrammaticToolCallingParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; /** Tools */ - tools?: (components["schemas"]["FunctionTool"] | components["schemas"]["FileSearchTool"] | components["schemas"]["ComputerTool"] | components["schemas"]["ComputerUsePreviewTool"] | components["schemas"]["WebSearchTool"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellTool"] | components["schemas"]["CustomTool"] | components["schemas"]["NamespaceTool"] | components["schemas"]["ToolSearchTool"] | components["schemas"]["WebSearchPreviewTool"] | components["schemas"]["ApplyPatchTool"])[] | components["schemas"]["ResponseFunctionToolCall"][] | { + tools?: (components["schemas"]["FunctionTool"] | components["schemas"]["FileSearchTool"] | components["schemas"]["ComputerTool"] | components["schemas"]["ComputerUsePreviewTool"] | components["schemas"]["WebSearchTool"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellTool"] | components["schemas"]["CustomTool"] | components["schemas"]["NamespaceTool"] | components["schemas"]["ToolSearchTool"] | components["schemas"]["WebSearchPreviewTool"] | components["schemas"]["ApplyPatchTool"])[] | components["schemas"]["ResponseFunctionToolCall"][] | { [key: string]: unknown; }[] | null; /** Top P */ @@ -45450,6 +45880,8 @@ export interface components { action: components["schemas"]["ShellCallAction"]; /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["ShellCallCallerDirect"] | components["schemas"]["ShellCallCallerProgram"] | null; /** Environment */ environment?: components["schemas"]["LocalEnvironmentParam"] | components["schemas"]["ContainerReferenceParam"] | null; /** Id */ @@ -45474,6 +45906,24 @@ export interface components { /** Timeout Ms */ timeout_ms?: number | null; }; + /** ShellCallCallerDirect */ + ShellCallCallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + }; + /** ShellCallCallerProgram */ + ShellCallCallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + }; /** * ShellCallOutput * @description The streamed output items emitted by a shell tool call. @@ -45481,6 +45931,8 @@ export interface components { ShellCallOutput: { /** Call Id */ call_id: string; + /** Caller */ + caller?: components["schemas"]["ShellCallOutputCallerDirect"] | components["schemas"]["ShellCallOutputCallerProgram"] | null; /** Id */ id?: string | null; /** Max Output Length */ @@ -45495,6 +45947,24 @@ export interface components { */ type: "shell_call_output"; }; + /** ShellCallOutputCallerDirect */ + ShellCallOutputCallerDirect: { + /** + * Type + * @constant + */ + type: "direct"; + }; + /** ShellCallOutputCallerProgram */ + ShellCallOutputCallerProgram: { + /** Caller Id */ + caller_id: string; + /** + * Type + * @constant + */ + type: "program"; + }; /** * ShellToolParam * @description Shell tool for Responses API: run commands in hosted containers or local runtime. @@ -47083,6 +47553,29 @@ export interface components { /** Tier */ tier: number; }; + /** + * Timeout + * @description Timeout configuration. + * + * **Usage**: + * + * Timeout(None) # No timeouts. + * Timeout(5.0) # 5s timeout on all operations. + * Timeout(None, connect=5.0) # 5s timeout on connect, no other timeouts. + * Timeout(5.0, connect=10.0) # 10s timeout on connect. 5s timeout elsewhere. + * Timeout(5.0, pool=None) # No timeout on acquiring connection from pool. + * # 5s timeout elsewhere. + */ + Timeout: { + /** Connect */ + connect: number | null; + /** Pool */ + pool: number | null; + /** Read */ + read: number | null; + /** Write */ + write: number | null; + }; /** * TokenCountDetailsResponse * @description Response structure for token count details with modality breakdown. @@ -47246,10 +47739,20 @@ export interface components { } & { [key: string]: unknown; }; + /** ToolChoiceSpecificProgrammaticToolCallingParam */ + ToolChoiceSpecificProgrammaticToolCallingParam: { + /** + * Type + * @constant + */ + type: "programmatic_tool_calling"; + } & { + [key: string]: unknown; + }; /** * ToolChoiceTypesParam * @description Indicates that the model should use a built-in tool to generate a response. - * [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + * [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). */ ToolChoiceTypesParam: { /** @@ -47260,6 +47763,40 @@ export interface components { } & { [key: string]: unknown; }; + /** + * ToolCodeInterpreter + * @description A tool that runs Python code to help generate a response to a prompt. + */ + ToolCodeInterpreter: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Container */ + container: string | components["schemas"]["ToolCodeInterpreterContainerCodeInterpreterToolAuto"]; + /** + * Type + * @constant + */ + type: "code_interpreter"; + }; + /** + * ToolCodeInterpreterContainerCodeInterpreterToolAuto + * @description Configuration for a code interpreter container. + * + * Optionally specify the IDs of the files to run the code on. + */ + ToolCodeInterpreterContainerCodeInterpreterToolAuto: { + /** File Ids */ + file_ids?: string[]; + /** Memory Limit */ + memory_limit?: ("1g" | "4g" | "16g" | "64g") | null; + /** Network Policy */ + network_policy?: components["schemas"]["ContainerNetworkPolicyDisabledParam"] | components["schemas"]["ContainerNetworkPolicyAllowlistParam"]; + /** + * Type + * @constant + */ + type: "auto"; + }; /** ToolDetailResponse */ ToolDetailResponse: { /** Overrides */ @@ -47277,12 +47814,20 @@ export interface components { }; /** ToolFunction */ ToolFunction: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Async */ + async?: boolean | null; /** Defer Loading */ defer_loading?: boolean | null; /** Description */ description?: string | null; /** Name */ name: string; + /** Output Schema */ + output_schema?: { + [key: string]: unknown; + } | null; /** Parameters */ parameters?: unknown | null; /** Strict */ @@ -47295,6 +47840,66 @@ export interface components { } & { [key: string]: unknown; }; + /** + * ToolImageGeneration + * @description A tool that generates images using the GPT image models. + */ + ToolImageGeneration: { + /** + * Action + * @enum {string} + */ + action?: "generate" | "edit" | "auto"; + /** + * Background + * @enum {string} + */ + background?: "transparent" | "opaque" | "auto"; + /** Input Fidelity */ + input_fidelity?: ("high" | "low") | null; + input_image_mask?: components["schemas"]["ToolImageGenerationInputImageMask"]; + /** Model */ + model?: string | ("gpt-image-1" | "gpt-image-1-mini" | "gpt-image-2" | "gpt-image-2-2026-04-21" | "gpt-image-2.5-sunburst" | "gpt-image-2.5-sunburst-2026-09-08" | "gpt-image-2.5-flare" | "gpt-image-2.5-flare-2026-09-08" | "gpt-image-1.5" | "chatgpt-image-latest"); + /** + * Moderation + * @enum {string} + */ + moderation?: "auto" | "low"; + /** Output Compression */ + output_compression?: number; + /** + * Output Format + * @enum {string} + */ + output_format?: "png" | "webp" | "jpeg"; + /** Partial Images */ + partial_images?: number; + /** + * Quality + * @enum {string} + */ + quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto"; + /** Size */ + size?: string | ("1024x1024" | "1024x1536" | "1536x1024" | "auto"); + /** + * Type + * @constant + */ + type: "image_generation"; + }; + /** + * ToolImageGenerationInputImageMask + * @description Optional mask for inpainting. + * + * Contains `image_url` + * (string, optional) and `file_id` (string, optional). + */ + ToolImageGenerationInputImageMask: { + /** File Id */ + file_id?: string; + /** Image Url */ + image_url?: string; + }; /** ToolListResponse */ ToolListResponse: { /** Tools */ @@ -47302,6 +47907,98 @@ export interface components { /** Total */ total: number; }; + /** + * ToolLocalShell + * @description A tool that allows the model to execute shell commands in a local environment. + */ + ToolLocalShell: { + /** + * Type + * @constant + */ + type: "local_shell"; + }; + /** + * ToolMcp + * @description Give the model access to additional tools via remote Model Context Protocol + * (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + */ + ToolMcp: { + /** Allowed Callers */ + allowed_callers?: ("direct" | "programmatic")[] | null; + /** Allowed Tools */ + allowed_tools?: string[] | components["schemas"]["ToolMcpAllowedToolsMcpToolFilter"] | null; + /** Authorization */ + authorization?: string; + /** + * Connector Id + * @enum {string} + */ + connector_id?: "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint"; + /** Defer Loading */ + defer_loading?: boolean; + /** Headers */ + headers?: { + [key: string]: string; + } | null; + /** Require Approval */ + require_approval?: components["schemas"]["ToolMcpRequireApprovalMcpToolApprovalFilter"] | ("always" | "never") | null; + /** Server Description */ + server_description?: string; + /** Server Label */ + server_label: string; + /** Server Url */ + server_url?: string; + /** Tunnel Id */ + tunnel_id?: string; + /** + * Type + * @constant + */ + type: "mcp"; + }; + /** + * ToolMcpAllowedToolsMcpToolFilter + * @description A filter object to specify which tools are allowed. + */ + ToolMcpAllowedToolsMcpToolFilter: { + /** Read Only */ + read_only?: boolean; + /** Tool Names */ + tool_names?: string[]; + }; + /** + * ToolMcpRequireApprovalMcpToolApprovalFilter + * @description Specify which of the MCP server's tools require approval. + * + * Can be + * `always`, `never`, or a filter object associated with tools + * that require approval. + */ + ToolMcpRequireApprovalMcpToolApprovalFilter: { + always?: components["schemas"]["ToolMcpRequireApprovalMcpToolApprovalFilterAlways"]; + never?: components["schemas"]["ToolMcpRequireApprovalMcpToolApprovalFilterNever"]; + }; + /** + * ToolMcpRequireApprovalMcpToolApprovalFilterAlways + * @description A filter object to specify which tools are allowed. + */ + ToolMcpRequireApprovalMcpToolApprovalFilterAlways: { + /** Read Only */ + read_only?: boolean; + /** Tool Names */ + tool_names?: string[]; + }; + /** + * ToolMcpRequireApprovalMcpToolApprovalFilterNever + * @description A filter object to specify which tools are allowed. + */ + ToolMcpRequireApprovalMcpToolApprovalFilterNever: { + /** Read Only */ + read_only?: boolean; + /** Tool Names */ + tool_names?: string[]; + }; /** * ToolPermissionRule * @description A rule defining permission for a specific tool or tool pattern @@ -47405,6 +48102,14 @@ export interface components { /** Updated */ updated: boolean; }; + /** ToolProgrammaticToolCalling */ + ToolProgrammaticToolCalling: { + /** + * Type + * @constant + */ + type: "programmatic_tool_calling"; + }; /** ToolSearchCall */ ToolSearchCall: { /** Arguments */ @@ -47426,6 +48131,23 @@ export interface components { */ type: "tool_search_call"; }; + /** + * ToolSearchOutputNamespaceToolParam + * @description Groups function/custom tools under a shared namespace. + */ + ToolSearchOutputNamespaceToolParam: { + /** Description */ + description: string; + /** Name */ + name: string; + /** Tools */ + tools: (components["schemas"]["ToolFunction"] | components["schemas"]["CustomToolParam"])[]; + /** + * Type + * @constant + */ + type: "namespace"; + }; /** * ToolSearchTool * @description Hosted or BYOT tool search configuration for deferred tools. @@ -50046,7 +50768,7 @@ export interface components { * WebSearchPreviewTool * @description This tool searches the web for relevant results to use in a response. * - * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + * Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ WebSearchPreviewTool: { /** Search Content Types */ @@ -50066,7 +50788,7 @@ export interface components { * WebSearchPreviewToolParam * @description This tool searches the web for relevant results to use in a response. * - * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + * Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ WebSearchPreviewToolParam: { /** Search Content Types */ @@ -50088,9 +50810,11 @@ export interface components { * @description Search the Internet for sources related to the prompt. * * Learn more about the - * [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + * [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ WebSearchTool: { + /** External Web Access */ + external_web_access?: boolean | null; filters?: components["schemas"]["Filters"] | null; /** Search Context Size */ search_context_size?: ("low" | "medium" | "high") | null; @@ -50108,9 +50832,11 @@ export interface components { * @description Search the Internet for sources related to the prompt. * * Learn more about the - * [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + * [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ WebSearchToolParam: { + /** External Web Access */ + external_web_access?: boolean; filters?: components["schemas"]["Filters"] | null; /** * Search Context Size @@ -50303,7 +51029,7 @@ export interface components { * ComputerToolParam * @description A tool that controls a virtual computer. * - * Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + * Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). */ openai__types__responses__computer_tool_param__ComputerToolParam: { /** @@ -50312,9 +51038,19 @@ export interface components { */ type: "computer"; }; + /** + * Reasoning + * @description Updates to reasoning configuration. Only effort is supported. + */ + openai__types__responses__response_configuration_update_item_param_param__Reasoning: { + /** Effort */ + effort?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null; + }; /** * UserLocation - * @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. */ openai__types__responses__web_search_preview_tool__UserLocation: { /** City */ @@ -50335,7 +51071,9 @@ export interface components { }; /** * UserLocation - * @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. */ openai__types__responses__web_search_preview_tool_param__UserLocation: { /** City */ @@ -50355,6 +51093,10 @@ export interface components { /** * UserLocation * @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. */ openai__types__responses__web_search_tool__UserLocation: { /** City */ @@ -50373,6 +51115,10 @@ export interface components { /** * UserLocation * @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. */ openai__types__responses__web_search_tool_param__UserLocation: { /** City */ @@ -50389,6 +51135,23 @@ export interface components { */ type?: "approximate"; }; + /** + * Reasoning + * @description Configuration options for + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + */ + openai__types__shared_params__reasoning__Reasoning: { + /** Context */ + context?: ("auto" | "current_turn" | "all_turns") | null; + /** Effort */ + effort?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null; + /** Generate Summary */ + generate_summary?: ("auto" | "concise" | "detailed") | null; + /** Mode */ + mode?: string | ("standard" | "pro"); + /** Summary */ + summary?: ("auto" | "concise" | "detailed") | null; + }; /** updateDeployment */ updateDeployment: { /** Blocked */ @@ -50890,7 +51653,7 @@ export interface components { [key: string]: unknown; }[] | null; /** Timeout */ - timeout?: number | string | null; + timeout?: number | string | components["schemas"]["Timeout"] | null; /** Timeout By Service Tier */ timeout_by_service_tier?: { [key: string]: number; @@ -66715,7 +67478,7 @@ export interface operations { /** Include */ include?: ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | null; /** Input */ - input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["ItemReference"])[]; + input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_AdditionalTools"] | components["schemas"]["ResponseConfigurationUpdateItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["CompactionTrigger"] | components["schemas"]["ItemReference"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"])[]; /** Instructions */ instructions?: string | null; /** Max Output Tokens */ @@ -66740,7 +67503,7 @@ export interface operations { prompt_cache_options?: components["schemas"]["PromptCacheOptions"] | null; /** Prompt Cache Retention */ prompt_cache_retention?: string | null; - reasoning?: components["schemas"]["Reasoning"] | null; + reasoning?: components["schemas"]["openai__types__shared_params__reasoning__Reasoning"] | null; /** Safety Identifier */ safety_identifier?: string | null; /** Service Tier */ @@ -66754,9 +67517,9 @@ export interface operations { temperature?: number | null; text?: components["schemas"]["ResponseTextConfigParam"] | null; /** Tool Choice */ - tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; + tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceSpecificProgrammaticToolCallingParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; /** Tools */ - tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; + tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; /** Top Logprobs */ top_logprobs?: number | null; /** Top P */ @@ -70179,7 +70942,7 @@ export interface operations { /** Include */ include?: ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | null; /** Input */ - input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["ItemReference"])[]; + input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_AdditionalTools"] | components["schemas"]["ResponseConfigurationUpdateItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["CompactionTrigger"] | components["schemas"]["ItemReference"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"])[]; /** Instructions */ instructions?: string | null; /** Max Output Tokens */ @@ -70204,7 +70967,7 @@ export interface operations { prompt_cache_options?: components["schemas"]["PromptCacheOptions"] | null; /** Prompt Cache Retention */ prompt_cache_retention?: string | null; - reasoning?: components["schemas"]["Reasoning"] | null; + reasoning?: components["schemas"]["openai__types__shared_params__reasoning__Reasoning"] | null; /** Safety Identifier */ safety_identifier?: string | null; /** Service Tier */ @@ -70218,9 +70981,9 @@ export interface operations { temperature?: number | null; text?: components["schemas"]["ResponseTextConfigParam"] | null; /** Tool Choice */ - tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; + tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceSpecificProgrammaticToolCallingParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; /** Tools */ - tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; + tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; /** Top Logprobs */ top_logprobs?: number | null; /** Top P */ @@ -81010,7 +81773,7 @@ export interface operations { /** Include */ include?: ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | null; /** Input */ - input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["ItemReference"])[]; + input: string | (components["schemas"]["EasyInputMessageParam"] | components["schemas"]["ResponsesAPIRequestParams_Message"] | components["schemas"]["ResponseOutputMessageParam"] | components["schemas"]["ResponseFileSearchToolCallParam"] | components["schemas"]["ResponseComputerToolCallParam"] | components["schemas"]["ComputerCallOutput"] | components["schemas"]["ResponseFunctionWebSearchParam"] | components["schemas"]["ResponseFunctionToolCallParam"] | components["schemas"]["FunctionCallOutput"] | components["schemas"]["ToolSearchCall"] | components["schemas"]["ResponseToolSearchOutputItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_AdditionalTools"] | components["schemas"]["ResponseConfigurationUpdateItemParamParam"] | components["schemas"]["ResponseReasoningItemParam"] | components["schemas"]["ResponseCompactionItemParamParam"] | components["schemas"]["ResponsesAPIRequestParams_ImageGenerationCall"] | components["schemas"]["ResponseCodeInterpreterToolCallParam"] | components["schemas"]["LocalShellCall"] | components["schemas"]["LocalShellCallOutput"] | components["schemas"]["ShellCall"] | components["schemas"]["ShellCallOutput"] | components["schemas"]["ApplyPatchCall"] | components["schemas"]["ApplyPatchCallOutput"] | components["schemas"]["McpListTools"] | components["schemas"]["McpApprovalRequest"] | components["schemas"]["ResponsesAPIRequestParams_McpApprovalResponse"] | components["schemas"]["McpCall"] | components["schemas"]["ResponseCustomToolCallOutputParam"] | components["schemas"]["ResponseCustomToolCallParam"] | components["schemas"]["CompactionTrigger"] | components["schemas"]["ItemReference"] | components["schemas"]["Program"] | components["schemas"]["ProgramOutput"])[]; /** Instructions */ instructions?: string | null; /** Max Output Tokens */ @@ -81035,7 +81798,7 @@ export interface operations { prompt_cache_options?: components["schemas"]["PromptCacheOptions"] | null; /** Prompt Cache Retention */ prompt_cache_retention?: string | null; - reasoning?: components["schemas"]["Reasoning"] | null; + reasoning?: components["schemas"]["openai__types__shared_params__reasoning__Reasoning"] | null; /** Safety Identifier */ safety_identifier?: string | null; /** Service Tier */ @@ -81049,9 +81812,9 @@ export interface operations { temperature?: number | null; text?: components["schemas"]["ResponseTextConfigParam"] | null; /** Tool Choice */ - tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; + tool_choice?: ("none" | "auto" | "required") | components["schemas"]["ToolChoiceAllowedParam"] | components["schemas"]["ToolChoiceTypesParam"] | components["schemas"]["ToolChoiceFunctionParam"] | components["schemas"]["ToolChoiceMcpParam"] | components["schemas"]["ToolChoiceCustomParam"] | components["schemas"]["ToolChoiceSpecificProgrammaticToolCallingParam"] | components["schemas"]["ToolChoiceApplyPatchParam"] | components["schemas"]["ToolChoiceShellParam"] | null; /** Tools */ - tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; + tools?: (components["schemas"]["FunctionToolParam"] | components["schemas"]["FileSearchToolParam"] | components["schemas"]["openai__types__responses__computer_tool_param__ComputerToolParam"] | components["schemas"]["ComputerUsePreviewToolParam"] | components["schemas"]["WebSearchToolParam"] | components["schemas"]["Mcp"] | components["schemas"]["CodeInterpreter"] | components["schemas"]["ProgrammaticToolCalling"] | components["schemas"]["ImageGeneration"] | components["schemas"]["LocalShell"] | components["schemas"]["FunctionShellToolParam"] | components["schemas"]["CustomToolParam"] | components["schemas"]["NamespaceToolParam"] | components["schemas"]["ToolSearchToolParam"] | components["schemas"]["WebSearchPreviewToolParam"] | components["schemas"]["ApplyPatchToolParam"] | components["schemas"]["litellm__types__llms__openai__ComputerToolParam"] | components["schemas"]["ShellToolParam"] | components["schemas"]["OpenAIToolSearchToolParam"])[] | null; /** Top Logprobs */ top_logprobs?: number | null; /** Top P */