The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(bedrock): merge main and thread aws_session_tags through the auth struct
mateo-berri2a76f54a5a72
diff --cc litellm/llms/bedrock/base_aws_llm.pyindex 609a6efbe95,385d5898569..dd62cdb424a--- a/litellm/llms/bedrock/base_aws_llm.py+++ b/litellm/llms/bedrock/base_aws_llm.py@@@ -6,7 -6,7 +6,7 @@@ import jsoimport osimport reimport urllib.parse- from collections.abc import Callable, Mapping, MutableMapping-from collections.abc import Callable, Mapping, Sequence++from collections.abc import Callable, Mapping, MutableMapping, Sequencefrom concurrent.futures import ThreadPoolExecutorfrom datetime import datetimefrom functools import partial@@@ -32,7 -33,7 +33,7 @@@ from litellm.constants importfrom litellm.litellm_core_utils.aws_partition import contains_bedrock_arn, get_aws_dns_suffixfrom litellm.litellm_core_utils.dd_tracing import tracerfrom litellm.secret_managers.main import get_secret, get_secret_str- from litellm.types.llms.bedrock import AWS_AUTH_PARAM_KEYS, AwsAuthParams-from litellm.types.llms.bedrock import AwsSessionTag++from litellm.types.llms.bedrock import AWS_AUTH_PARAM_KEYS, AwsAuthParams, AwsSessionTagif TYPE_CHECKING:from botocore.awsrequest import AWSPreparedRequest@@@ -54,15 -55,119 +55,127 @@@ _STS_REGION_FROM_ENDPOINT_PATTERN: FinaSIGV4_COMPUTED_HEADERS: Final = frozenset({"authorization", "x-amz-date", "x-amz-security-token", "date"})+ _AWS_SESSION_TAGS_ADAPTER: Final[TypeAdapter[tuple[AwsSessionTag, ...]]] = TypeAdapter(tuple[AwsSessionTag, ...])+++ def _canonical_aws_session_tags(raw_tags: object) -> tuple[AwsSessionTag, ...] | None:+ if raw_tags is None:+ return None+ try:+ validated: Final = _AWS_SESSION_TAGS_ADAPTER.validate_python(raw_tags)+ except ValidationError as e:+ raise ValueError(+ "Invalid 'aws_session_tags' value. Expected a list of {'Key': <str>, 'Value': <str>} dicts, "+ f"e.g. [{{'Key': 'team', 'Value': 'genai'}}]. Got: {raw_tags!r}"+ ) from e+ return tuple(sorted(validated, key=lambda tag: tag["Key"]))+++ class _AssumeRoleParams(TypedDict):+ RoleArn: ReadOnly[str]+ RoleSessionName: ReadOnly[str]+ ExternalId: ReadOnly[NotRequired[str]]+ Tags: ReadOnly[NotRequired[tuple[AwsSessionTag, ...]]]+++ def _assume_role_params(+ aws_role_name: str,+ aws_session_name: str,+ aws_external_id: str | None,+ aws_session_tags: Sequence[AwsSessionTag] | None,+ ) -> _AssumeRoleParams:+ match (aws_external_id, tuple(aws_session_tags or ())):+ case (None, ()):+ return _AssumeRoleParams(RoleArn=aws_role_name, RoleSessionName=aws_session_name)+ case (None, tags):+ return _AssumeRoleParams(RoleArn=aws_role_name, RoleSessionName=aws_session_name, Tags=tags)+ case (external_id, ()):+ return _AssumeRoleParams(RoleArn=aws_role_name, RoleSessionName=aws_session_name, ExternalId=external_id)+ case (external_id, tags):+ return _AssumeRoleParams(+ RoleArn=aws_role_name, RoleSessionName=aws_session_name, ExternalId=external_id, Tags=tags+ )+++ _SecureTransportBool = TypedDict("_SecureTransportBool", {"aws:SecureTransport": ReadOnly[Literal["true"]]})+++ class _SecureTransportCondition(TypedDict):+ Bool: ReadOnly[_SecureTransportBool]+++ class _SessionPolicyStatement(TypedDict):+ Sid: ReadOnly[str]+ Effect: ReadOnly[Literal["Allow"]]+ Action: ReadOnly[tuple[str, ...]]+ Resource: ReadOnly[Literal["*"]]+ Condition: ReadOnly[_SecureTransportCondition]+++ class WebIdentitySessionPolicy(TypedDict):+ Version: ReadOnly[Literal["2012-10-17"]]+ Statement: ReadOnly[tuple[_SessionPolicyStatement, ...]]+++ _WEB_IDENTITY_SESSION_POLICY_ACTIONS: Final[Mapping[str, tuple[str, ...]]] = MappingProxyType(+ {+ "BedrockLiteLLM": (+ "bedrock:InvokeModel",+ "bedrock:InvokeModelWithResponseStream",+ "bedrock:CountTokens",+ "bedrock:Rerank",+ "bedrock:Retrieve",+ "bedrock:ListKnowledgeBases",+ "bedrock:InvokeAgent",+ "bedrock:ApplyGuardrail",+ "bedrock:GetGuardrail",+ "bedrock:ListGuardrails",+ ),+ "BedrockAgentCoreLiteLLM": (+ "bedrock-agentcore:InvokeAgentRuntime",+ "bedrock-agentcore:InvokeAgentRuntimeForUser",+ "bedrock-agentcore:InvokeGateway",+ ),+ "ClaudePlatformLiteLLM": (+ "aws-external-anthropic:CreateInference",+ "aws-external-anthropic:CreateBatchInference",+ "aws-external-anthropic:CancelBatchInference",+ "aws-external-anthropic:DeleteBatchInference",+ "aws-external-anthropic:CountTokens",+ "aws-external-anthropic:Get*",+ "aws-external-anthropic:List*",+ ),+ "BedrockMantleLiteLLM": ("bedrock-mantle:CreateInference",),+ }+ )++ _SECURE_TRANSPORT_ONLY: Final = _SecureTransportCondition(Bool=_SecureTransportBool({"aws:SecureTransport": "true"}))+++ def build_web_identity_session_policy() -> WebIdentitySessionPolicy:+ return WebIdentitySessionPolicy(+ Version="2012-10-17",+ Statement=tuple(+ _SessionPolicyStatement(+ Sid=sid,+ Effect="Allow",+ Action=actions,+ Resource="*",+ Condition=_SECURE_TRANSPORT_ONLY,+ )+ for sid, actions in _WEB_IDENTITY_SESSION_POLICY_ACTIONS.items()+ ),+ )++def pop_aws_auth_params(+ optional_params: MutableMapping[str, object], # mutable-ok: pops the aws_* keys out of the caller's mapping+) -> AwsAuthParams:+ return AwsAuthParams.model_validate(+ MappingProxyType({key: optional_params.pop(key, None) for key in AWS_AUTH_PARAM_KEYS})+ )++class BedrockRequestTarget(BaseModel):aws_region_name: straws_bedrock_runtime_endpoint: str | None@@@ -389,20 -501,6 +509,21 @@@ class BaseAWSLLM(SignsRequestsWithAWS)else:return self._get_or_set_cached_credentials(args, self._auth_with_env_vars)+ def resolve_credentials(self, auth_params: AwsAuthParams, aws_region_name: str | None) -> Credentials:+ return self.get_credentials(+ aws_access_key_id=auth_params.aws_access_key_id,+ aws_secret_access_key=auth_params.aws_secret_access_key,+ aws_session_token=auth_params.aws_session_token,+ aws_region_name=aws_region_name,+ aws_session_name=auth_params.aws_session_name,+ aws_profile_name=auth_params.aws_profile_name,+ aws_role_name=auth_params.aws_role_name,+ aws_web_identity_token=auth_params.aws_web_identity_token,+ aws_sts_endpoint=auth_params.aws_sts_endpoint,+ aws_external_id=auth_params.aws_external_id,++ aws_session_tags=_canonical_aws_session_tags(auth_params.aws_session_tags),+ )+def _get_aws_region_from_model_arn(self, model: str | None) -> str | None:try:# First check if the string contains the expected prefixdiff --cc litellm/llms/bedrock/batches/handler.pyindex fe8575d323e,b408d2f620c..6239973eb7c--- a/litellm/llms/bedrock/batches/handler.py+++ b/litellm/llms/bedrock/batches/handler.py@@@ -6,7 -6,7 +6,7 @@@ from openai.types.batch import BatchReqfrom openai.types.batch import Metadata as OpenAIBatchMetadatafrom litellm.litellm_core_utils.aws_partition import get_aws_dns_suffix- from litellm.types.llms.bedrock import AwsAuthParams-from litellm.types.llms.bedrock import AwsSessionTag++from litellm.types.llms.bedrock import AwsAuthParams, AwsSessionTagfrom litellm.types.utils import LiteLLMBatchif TYPE_CHECKING:@@@ -139,8 -141,8 +140,9 @@@ class BedrockBatchesHandleraws_web_identity_token=aws_web_identity_token,aws_sts_endpoint=aws_sts_endpoint,aws_external_id=aws_external_id,+ aws_session_tags=aws_session_tags,)+ creds: Final = BedrockBatchesConfig().resolve_credentials(auth_params, region)client: Final = boto3.client("bedrock",diff --cc litellm/llms/bedrock/realtime/handler.pyindex 43f34da9d21,fe3822629a7..d17590bdaaa--- a/litellm/llms/bedrock/realtime/handler.py+++ b/litellm/llms/bedrock/realtime/handler.py@@@ -111,6 -257,6 +258,7 @@@ class BedrockRealtime(BaseAWSLLM)aws_sts_endpoint: str | None = None,aws_bedrock_runtime_endpoint: str | None = None,aws_external_id: str | None = None,++ aws_session_tags: object = None,**kwargs: object,):"""@@@ -160,9 -309,8 +309,10 @@@aws_web_identity_token=aws_web_identity_token,aws_sts_endpoint=aws_sts_endpoint,aws_external_id=aws_external_id,++ aws_session_tags=aws_session_tags,)- if credentials is None:+ credentials: Final = await run_aws_signing(self.resolve_credentials, auth_params, aws_region_name)+ if credentials is None: # pyright: ignore[reportUnnecessaryComparison] # boto3.Session() env fallback yields Noneraise BedrockError(status_code=401,message=(diff --cc litellm/proxy/_lazy_openapi_snapshot.jsonindex 4d5cdcc8003,b244678e201..fa046ef0a72--- a/litellm/proxy/_lazy_openapi_snapshot.json+++ b/litellm/proxy/_lazy_openapi_snapshot.json@@@ -15761,48 -15999,5462 +15999,5462 @@@"description": "Validation Error"}},- "summary": "Langfuse Proxy Route",- "tags": [- "langfuse_passthrough"- ]- },- "put": {- "description": "Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/langfuse)",- "operationId": "langfuse_proxy_route_langfuse__endpoint__put",- "parameters": [+ "summary": "Langfuse Proxy Route",+ "tags": [+ "langfuse_passthrough"+ ]+ },+ "put": {+ "description": "Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/langfuse)",+ "operationId": "langfuse_proxy_route_langfuse__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Langfuse Proxy Route",+ "tags": [+ "langfuse_passthrough"+ ]+ }+ }+ }+ },+ "llm_passthrough": {+ "components": {+ "schemas": {+ "Body_image_edit_api_openai_deployments__model__images_edits_post": {+ "properties": {+ "image": {+ "anyOf": [+ {+ "items": {+ "contentMediaType": "application/octet-stream",+ "type": "string"+ },+ "type": "array"+ },+ {+ "type": "null"+ }+ ],+ "title": "Image"+ },+ "image[]": {+ "anyOf": [+ {+ "items": {+ "contentMediaType": "application/octet-stream",+ "type": "string"+ },+ "type": "array"+ },+ {+ "type": "null"+ }+ ],+ "title": "Image[]"+ },+ "mask": {+ "anyOf": [+ {+ "items": {+ "contentMediaType": "application/octet-stream",+ "type": "string"+ },+ "type": "array"+ },+ {+ "type": "null"+ }+ ],+ "title": "Mask"+ },+ "mask[]": {+ "anyOf": [+ {+ "items": {+ "contentMediaType": "application/octet-stream",+ "type": "string"+ },+ "type": "array"+ },+ {+ "type": "null"+ }+ ],+ "title": "Mask[]"+ }+ },+ "title": "Body_image_edit_api_openai_deployments__model__images_edits_post",+ "type": "object"+ },+ "ErrorResponse": {+ "properties": {+ "detail": {+ "additionalProperties": true,+ "example": {+ "error": {+ "code": "error_code",+ "message": "Error message",+ "param": "error_param",+ "type": "error_type"+ }+ },+ "title": "Detail",+ "type": "object"+ }+ },+ "required": [+ "detail"+ ],+ "title": "ErrorResponse",+ "type": "object"+ },+ "HTTPValidationError": {+ "properties": {+ "detail": {+ "items": {+ "$ref": "#/components/schemas/ValidationError"+ },+ "title": "Detail",+ "type": "array"+ }+ },+ "title": "HTTPValidationError",+ "type": "object"+ },+ "RealtimeClientSecretResponse": {+ "description": "Response from POST /v1/realtime/client_secrets.\n\nBoth the top-level `value` and `session.client_secret.value`\nwill contain the encrypted token instead of the raw ephemeral key.\nThe `session` field is kept as a raw dict so unknown fields pass through.",+ "properties": {+ "expires_at": {+ "anyOf": [+ {+ "type": "integer"+ },+ {+ "type": "null"+ }+ ],+ "title": "Expires At"+ },+ "session": {+ "anyOf": [+ {+ "additionalProperties": true,+ "type": "object"+ },+ {+ "type": "null"+ }+ ],+ "title": "Session"+ },+ "value": {+ "title": "Value",+ "type": "string"+ }+ },+ "required": [+ "value"+ ],+ "title": "RealtimeClientSecretResponse",+ "type": "object"+ },+ "RealtimeTranscriptionSessionResponse": {+ "additionalProperties": true,+ "description": "Response from POST /v1/realtime/transcription_sessions.\n\n`client_secret.value` contains the encrypted token instead of the raw\nephemeral key. Unknown fields pass through unchanged.",+ "properties": {+ "client_secret": {+ "anyOf": [+ {+ "additionalProperties": true,+ "type": "object"+ },+ {+ "type": "null"+ }+ ],+ "title": "Client Secret"+ }+ },+ "title": "RealtimeTranscriptionSessionResponse",+ "type": "object"+ },+ "ValidationError": {+ "properties": {+ "ctx": {+ "title": "Context",+ "type": "object"+ },+ "input": {+ "title": "Input"+ },+ "loc": {+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "integer"+ }+ ]+ },+ "title": "Location",+ "type": "array"+ },+ "msg": {+ "title": "Message",+ "type": "string"+ },+ "type": {+ "title": "Error Type",+ "type": "string"+ }+ },+ "required": [+ "loc",+ "msg",+ "type"+ ],+ "title": "ValidationError",+ "type": "object"+ }+ }+ },+ "paths": {+ "/anthropic/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)",+ "operationId": "anthropic_proxy_route_anthropic__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Anthropic Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)",+ "operationId": "anthropic_proxy_route_anthropic__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Anthropic Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)",+ "operationId": "anthropic_proxy_route_anthropic__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Anthropic Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)",+ "operationId": "anthropic_proxy_route_anthropic__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Anthropic Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)",+ "operationId": "anthropic_proxy_route_anthropic__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Anthropic Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/assemblyai/{endpoint}": {+ "delete": {+ "operationId": "assemblyai_proxy_route_assemblyai__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "operationId": "assemblyai_proxy_route_assemblyai__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "operationId": "assemblyai_proxy_route_assemblyai__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "operationId": "assemblyai_proxy_route_assemblyai__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "operationId": "assemblyai_proxy_route_assemblyai__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/azure/{endpoint}": {+ "delete": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/azure_ai/{endpoint}": {+ "delete": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure_ai__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure_ai__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure_ai__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure_ai__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Call any azure endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/azure/{endpoint:path}`\n\nChecks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.",+ "operationId": "azure_proxy_route_azure_ai__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Azure Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/bedrock/{endpoint}": {+ "delete": {+ "description": "This is the v1 passthrough for Bedrock.\nV2 is handled by the `/bedrock/v2` endpoint.\n[Docs](https://docs.litellm.ai/docs/pass_through/bedrock)",+ "operationId": "bedrock_proxy_route_bedrock__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Bedrock Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "This is the v1 passthrough for Bedrock.\nV2 is handled by the `/bedrock/v2` endpoint.\n[Docs](https://docs.litellm.ai/docs/pass_through/bedrock)",+ "operationId": "bedrock_proxy_route_bedrock__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Bedrock Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "This is the v1 passthrough for Bedrock.\nV2 is handled by the `/bedrock/v2` endpoint.\n[Docs](https://docs.litellm.ai/docs/pass_through/bedrock)",+ "operationId": "bedrock_proxy_route_bedrock__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Bedrock Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "This is the v1 passthrough for Bedrock.\nV2 is handled by the `/bedrock/v2` endpoint.\n[Docs](https://docs.litellm.ai/docs/pass_through/bedrock)",+ "operationId": "bedrock_proxy_route_bedrock__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Bedrock Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "This is the v1 passthrough for Bedrock.\nV2 is handled by the `/bedrock/v2` endpoint.\n[Docs](https://docs.litellm.ai/docs/pass_through/bedrock)",+ "operationId": "bedrock_proxy_route_bedrock__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Bedrock Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/cohere/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/cohere)",+ "operationId": "cohere_proxy_route_cohere__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cohere Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/cohere)",+ "operationId": "cohere_proxy_route_cohere__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cohere Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/cohere)",+ "operationId": "cohere_proxy_route_cohere__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cohere Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/cohere)",+ "operationId": "cohere_proxy_route_cohere__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cohere Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/cohere)",+ "operationId": "cohere_proxy_route_cohere__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cohere Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/comprehendmedical": {+ "post": {+ "description": "AWS-SDK-shaped pass-through for Amazon Comprehend Medical: point the SDK's\n`endpoint_url` at `/comprehendmedical` and the operation is read from the\n`X-Amz-Target` header, per the AWS JSON 1.1 protocol.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/comprehend_medical)",+ "operationId": "comprehend_medical_sdk_proxy_route_comprehendmedical_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Comprehend Medical Sdk Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/comprehendmedical/{operation}": {+ "post": {+ "description": "Pass-through for Amazon Comprehend Medical, e.g. `POST /comprehendmedical/DetectEntitiesV2`.\n\nThe request body is forwarded as-is to the AWS JSON 1.1 API and signed with SigV4\nusing the proxy's AWS credentials.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/comprehend_medical)",+ "operationId": "comprehend_medical_proxy_route_comprehendmedical__operation__post",+ "parameters": [+ {+ "in": "path",+ "name": "operation",+ "required": true,+ "schema": {+ "title": "Operation",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Comprehend Medical Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/cursor/chat/completions": {+ "post": {+ "description": "Cursor BYOK endpoint. Accepts both request shapes Cursor sends to its OpenAI-compatible\nbase URL and always answers in chat completions format.\n\nCursor agent mode sends Responses API format bodies (`input`, flat tool defs, `reasoning`,\ncustom tools) to the chat/completions path while expecting chat completions responses;\nthose are routed through the Responses API pipeline and converted back. Genuine chat\ncompletions bodies (`messages` present) are routed through the standard chat completions\npipeline, after normalizing each level of the `tools` array and `tool_choice` to the chat\ncompletions shapes OpenAI requires. Cursor mixes Responses API shapes into chat bodies\nper level, independently: a flat tool def (`{\"type\": \"custom\", \"name\": \"ApplyPatch\", ...}`)\ngets nested under `custom`, and a flat grammar format\n(`{\"type\": \"grammar\", \"definition\", \"syntax\"}`) gets wrapped as\n`{\"type\": \"grammar\", \"grammar\": {...}}` wherever it appears, including inside tool defs\nCursor already sent pre-nested.\n\n```bash\ncurl -X POST http://localhost:4000/cursor/chat/completions -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\nResponds back in chat completions format.\n```",+ "operationId": "cursor_chat_completions_cursor_chat_completions_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Chat Completions",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/cursor/models": {+ "get": {+ "description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler.",+ "operationId": "cursor_model_list_cursor_models_get",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Model List",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/cursor/v1/models": {+ "get": {+ "description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler.",+ "operationId": "cursor_model_list_cursor_v1_models_get",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Model List",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/cursor/{endpoint}": {+ "delete": {+ "description": "Pass-through endpoint for the Cursor Cloud Agents API.\n\nSupports all Cursor Cloud Agents endpoints:\n- GET /v0/agents \u2014 List agents\n- POST /v0/agents \u2014 Launch an agent\n- GET /v0/agents/{id} \u2014 Agent status\n- GET /v0/agents/{id}/conversation \u2014 Agent conversation\n- POST /v0/agents/{id}/followup \u2014 Add follow-up\n- POST /v0/agents/{id}/stop \u2014 Stop an agent\n- DELETE /v0/agents/{id} \u2014 Delete an agent\n- GET /v0/me \u2014 API key info\n- GET /v0/models \u2014 List models\n- GET /v0/repositories \u2014 List GitHub repositories\n\nUses Basic Authentication (base64-encoded `API_KEY:`).\n\nCredential lookup order:\n1. passthrough_endpoint_router (config.yaml deployments with use_in_pass_through)\n2. litellm.credential_list (credentials added via UI)\n3. CURSOR_API_KEY environment variable",+ "operationId": "cursor_proxy_route_cursor__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Pass-through endpoint for the Cursor Cloud Agents API.\n\nSupports all Cursor Cloud Agents endpoints:\n- GET /v0/agents \u2014 List agents\n- POST /v0/agents \u2014 Launch an agent\n- GET /v0/agents/{id} \u2014 Agent status\n- GET /v0/agents/{id}/conversation \u2014 Agent conversation\n- POST /v0/agents/{id}/followup \u2014 Add follow-up\n- POST /v0/agents/{id}/stop \u2014 Stop an agent\n- DELETE /v0/agents/{id} \u2014 Delete an agent\n- GET /v0/me \u2014 API key info\n- GET /v0/models \u2014 List models\n- GET /v0/repositories \u2014 List GitHub repositories\n\nUses Basic Authentication (base64-encoded `API_KEY:`).\n\nCredential lookup order:\n1. passthrough_endpoint_router (config.yaml deployments with use_in_pass_through)\n2. litellm.credential_list (credentials added via UI)\n3. CURSOR_API_KEY environment variable",+ "operationId": "cursor_proxy_route_cursor__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Pass-through endpoint for the Cursor Cloud Agents API.\n\nSupports all Cursor Cloud Agents endpoints:\n- GET /v0/agents \u2014 List agents\n- POST /v0/agents \u2014 Launch an agent\n- GET /v0/agents/{id} \u2014 Agent status\n- GET /v0/agents/{id}/conversation \u2014 Agent conversation\n- POST /v0/agents/{id}/followup \u2014 Add follow-up\n- POST /v0/agents/{id}/stop \u2014 Stop an agent\n- DELETE /v0/agents/{id} \u2014 Delete an agent\n- GET /v0/me \u2014 API key info\n- GET /v0/models \u2014 List models\n- GET /v0/repositories \u2014 List GitHub repositories\n\nUses Basic Authentication (base64-encoded `API_KEY:`).\n\nCredential lookup order:\n1. passthrough_endpoint_router (config.yaml deployments with use_in_pass_through)\n2. litellm.credential_list (credentials added via UI)\n3. CURSOR_API_KEY environment variable",+ "operationId": "cursor_proxy_route_cursor__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Pass-through endpoint for the Cursor Cloud Agents API.\n\nSupports all Cursor Cloud Agents endpoints:\n- GET /v0/agents \u2014 List agents\n- POST /v0/agents \u2014 Launch an agent\n- GET /v0/agents/{id} \u2014 Agent status\n- GET /v0/agents/{id}/conversation \u2014 Agent conversation\n- POST /v0/agents/{id}/followup \u2014 Add follow-up\n- POST /v0/agents/{id}/stop \u2014 Stop an agent\n- DELETE /v0/agents/{id} \u2014 Delete an agent\n- GET /v0/me \u2014 API key info\n- GET /v0/models \u2014 List models\n- GET /v0/repositories \u2014 List GitHub repositories\n\nUses Basic Authentication (base64-encoded `API_KEY:`).\n\nCredential lookup order:\n1. passthrough_endpoint_router (config.yaml deployments with use_in_pass_through)\n2. litellm.credential_list (credentials added via UI)\n3. CURSOR_API_KEY environment variable",+ "operationId": "cursor_proxy_route_cursor__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Pass-through endpoint for the Cursor Cloud Agents API.\n\nSupports all Cursor Cloud Agents endpoints:\n- GET /v0/agents \u2014 List agents\n- POST /v0/agents \u2014 Launch an agent\n- GET /v0/agents/{id} \u2014 Agent status\n- GET /v0/agents/{id}/conversation \u2014 Agent conversation\n- POST /v0/agents/{id}/followup \u2014 Add follow-up\n- POST /v0/agents/{id}/stop \u2014 Stop an agent\n- DELETE /v0/agents/{id} \u2014 Delete an agent\n- GET /v0/me \u2014 API key info\n- GET /v0/models \u2014 List models\n- GET /v0/repositories \u2014 List GitHub repositories\n\nUses Basic Authentication (base64-encoded `API_KEY:`).\n\nCredential lookup order:\n1. passthrough_endpoint_router (config.yaml deployments with use_in_pass_through)\n2. litellm.credential_list (credentials added via UI)\n3. CURSOR_API_KEY environment variable",+ "operationId": "cursor_proxy_route_cursor__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cursor Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/eu.assemblyai/{endpoint}": {+ "delete": {+ "operationId": "assemblyai_proxy_route_eu_assemblyai__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "operationId": "assemblyai_proxy_route_eu_assemblyai__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "operationId": "assemblyai_proxy_route_eu_assemblyai__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "operationId": "assemblyai_proxy_route_eu_assemblyai__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "operationId": "assemblyai_proxy_route_eu_assemblyai__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Assemblyai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/gemini/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)",+ "operationId": "gemini_proxy_route_gemini__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Gemini Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)",+ "operationId": "gemini_proxy_route_gemini__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Gemini Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)",+ "operationId": "gemini_proxy_route_gemini__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Gemini Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)",+ "operationId": "gemini_proxy_route_gemini__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Gemini Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)",+ "operationId": "gemini_proxy_route_gemini__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Gemini Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/gigachat/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/gigachat)",+ "operationId": "gigachat_proxy_route_gigachat__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Gigachat Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/gigachat)",+ "operationId": "gigachat_proxy_route_gigachat__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Gigachat Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/gigachat)",+ "operationId": "gigachat_proxy_route_gigachat__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Gigachat Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/gigachat)",+ "operationId": "gigachat_proxy_route_gigachat__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Gigachat Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/gigachat)",+ "operationId": "gigachat_proxy_route_gigachat__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Gigachat Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/milvus/{endpoint}": {+ "delete": {+ "description": "Enable using Milvus `/vectors` endpoint as a pass-through endpoint.",+ "operationId": "milvus_proxy_route_milvus__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Milvus Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Enable using Milvus `/vectors` endpoint as a pass-through endpoint.",+ "operationId": "milvus_proxy_route_milvus__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Milvus Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Enable using Milvus `/vectors` endpoint as a pass-through endpoint.",+ "operationId": "milvus_proxy_route_milvus__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Milvus Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Enable using Milvus `/vectors` endpoint as a pass-through endpoint.",+ "operationId": "milvus_proxy_route_milvus__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Milvus Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Enable using Milvus `/vectors` endpoint as a pass-through endpoint.",+ "operationId": "milvus_proxy_route_milvus__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Milvus Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/mistral/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/mistral)",+ "operationId": "mistral_proxy_route_mistral__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Mistral Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/mistral)",+ "operationId": "mistral_proxy_route_mistral__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Mistral Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/mistral)",+ "operationId": "mistral_proxy_route_mistral__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Mistral Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/mistral)",+ "operationId": "mistral_proxy_route_mistral__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Mistral Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/mistral)",+ "operationId": "mistral_proxy_route_mistral__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Mistral Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/nvidia_nim/{endpoint}": {+ "delete": {+ "description": "Relay a native NVIDIA NIM request through a LiteLLM model group.\n\n`{PROXY_BASE_URL}/nvidia_nim/{model_group}/v1/infer` forwards the body unchanged to the deployment's\n`api_base`, so object detection and OCR NIMs whose payload carries no `model` field still go through\nvirtual key auth, model access checks, and spend logging.",+ "operationId": "nvidia_nim_proxy_route_nvidia_nim__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Nvidia Nim Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Relay a native NVIDIA NIM request through a LiteLLM model group.\n\n`{PROXY_BASE_URL}/nvidia_nim/{model_group}/v1/infer` forwards the body unchanged to the deployment's\n`api_base`, so object detection and OCR NIMs whose payload carries no `model` field still go through\nvirtual key auth, model access checks, and spend logging.",+ "operationId": "nvidia_nim_proxy_route_nvidia_nim__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Nvidia Nim Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Relay a native NVIDIA NIM request through a LiteLLM model group.\n\n`{PROXY_BASE_URL}/nvidia_nim/{model_group}/v1/infer` forwards the body unchanged to the deployment's\n`api_base`, so object detection and OCR NIMs whose payload carries no `model` field still go through\nvirtual key auth, model access checks, and spend logging.",+ "operationId": "nvidia_nim_proxy_route_nvidia_nim__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Nvidia Nim Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Relay a native NVIDIA NIM request through a LiteLLM model group.\n\n`{PROXY_BASE_URL}/nvidia_nim/{model_group}/v1/infer` forwards the body unchanged to the deployment's\n`api_base`, so object detection and OCR NIMs whose payload carries no `model` field still go through\nvirtual key auth, model access checks, and spend logging.",+ "operationId": "nvidia_nim_proxy_route_nvidia_nim__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Nvidia Nim Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Relay a native NVIDIA NIM request through a LiteLLM model group.\n\n`{PROXY_BASE_URL}/nvidia_nim/{model_group}/v1/infer` forwards the body unchanged to the deployment's\n`api_base`, so object detection and OCR NIMs whose payload carries no `model` field still go through\nvirtual key auth, model access checks, and spend logging.",+ "operationId": "nvidia_nim_proxy_route_nvidia_nim__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Nvidia Nim Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/deployments/{model}/chat/completions": {+ "post": {+ "description": "Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`\n\n```bash\ncurl -X POST http://localhost:4000/v1/chat/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n}'\n```",+ "operationId": "chat_completion_openai_deployments__model__chat_completions_post",+ "parameters": [+ {+ "in": "path",+ "name": "model",+ "required": true,+ "schema": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Model"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful response"+ },+ "400": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "ContentPolicyViolationError"+ },+ "401": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "AuthenticationError"+ },+ "403": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "PermissionDeniedError"+ },+ "404": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "NotFoundError"+ },+ "408": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "Timeout"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "UnprocessableEntityError"+ },+ "429": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },- "description": "\n Unified rate-limit error.\n\n Every rate-limit condition surfaced by litellm \u2014 whether it originated from\n an upstream LLM provider, a vendor batch endpoint, or one of litellm's own\n proxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\n max-iterations, etc.) \u2014 is raised as an instance of this class.\n\n The :attr:`category` attribute lets callers distinguish the source. See\n :class:`RateLimitErrorCategory` for the available values.\n "++ "description": "\nUnified rate-limit error.\n\nEvery rate-limit condition surfaced by litellm \u2014 whether it originated from\nan upstream LLM provider, a vendor batch endpoint, or one of litellm's own\nproxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\nmax-iterations, etc.) \u2014 is raised as an instance of this class.\n\nThe :attr:`category` attribute lets callers distinguish the source. See\n:class:`RateLimitErrorCategory` for the available values.\n"+ },+ "500": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "JSONSchemaValidationError"+ },+ "503": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ },+ "description": "APIConnectionError"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Chat Completion",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/deployments/{model}/completions": {+ "post": {+ "description": "Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`\n\n```bash\ncurl -X POST http://localhost:4000/v1/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"gpt-3.5-turbo-instruct\",\n \"prompt\": \"Once upon a time\",\n \"max_tokens\": 50,\n \"temperature\": 0.7\n}'\n```",+ "operationId": "completion_openai_deployments__model__completions_post",+ "parameters": [+ {+ "in": "path",+ "name": "model",+ "required": true,+ "schema": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Model"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Completion",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/deployments/{model}/embeddings": {+ "post": {+ "description": "Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`\n\n```bash\ncurl -X POST http://localhost:4000/v1/embeddings \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"text-embedding-ada-002\",\n \"input\": \"The quick brown fox jumps over the lazy dog\"\n}'\n```",+ "operationId": "embeddings_openai_deployments__model__embeddings_post",+ "parameters": [+ {+ "in": "path",+ "name": "model",+ "required": true,+ "schema": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Model"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Embeddings",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/deployments/{model}/images/edits": {+ "post": {+ "description": "Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create\n\n```bash\ncurl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST \"http://localhost:4000/v1/images/edits\" -H \"Authorization: Bearer sk-1234\" -F \"model=gpt-image-1\" -F \"image[][email protected]\" -F 'prompt=Create a studio ghibli image of this'\n```",+ "operationId": "image_edit_api_openai_deployments__model__images_edits_post",+ "parameters": [+ {+ "in": "path",+ "name": "model",+ "required": true,+ "schema": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Model"+ }+ }+ ],+ "requestBody": {+ "content": {+ "multipart/form-data": {+ "schema": {+ "$ref": "#/components/schemas/Body_image_edit_api_openai_deployments__model__images_edits_post"+ }+ }+ }+ },+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Image Edit Api",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/deployments/{model}/images/generations": {+ "post": {+ "operationId": "image_generation_openai_deployments__model__images_generations_post",+ "parameters": [+ {+ "in": "path",+ "name": "model",+ "required": true,+ "schema": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Model"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Image Generation",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/realtime/calls": {+ "post": {+ "operationId": "proxy_realtime_calls_openai_v1_realtime_calls_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "summary": "Proxy Realtime Calls",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/realtime/client_secrets": {+ "post": {+ "operationId": "create_realtime_client_secret_openai_v1_realtime_client_secrets_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/RealtimeClientSecretResponse"+ }+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Create Realtime Client Secret",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/realtime/transcription_sessions": {+ "post": {+ "description": "Create an ephemeral Realtime transcription session\n(POST /v1/realtime/transcription_sessions) for the WebRTC/WebSocket flow.\n\nMirrors the client_secrets route but targets the transcription_sessions\nendpoint and encrypts the ephemeral key returned under `client_secret.value`.",+ "operationId": "create_realtime_transcription_session_openai_v1_realtime_transcription_sessions_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/RealtimeTranscriptionSessionResponse"+ }+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Create Realtime Transcription Session",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses": {+ "post": {+ "description": "Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses\n\nSupports background mode with polling_via_cache for partial response retrieval.\nWhen background=true and polling_via_cache is enabled, returns a polling_id immediately\nand streams the response in the background, updating Redis cache.\n\n```bash\n# Normal request\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\"\n}'\n\n# Background request with polling\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\",\n \"background\": true\n}'\n```",+ "operationId": "responses_api_openai_v1_responses_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Responses Api",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses/compact": {+ "post": {+ "description": "Compact a response by running a compaction pass over a conversation.\n\nReturns encrypted, opaque items that can be used to reduce context size.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/compact -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\n```",+ "operationId": "compact_response_openai_v1_responses_compact_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Compact Response",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses/input_tokens": {+ "post": {+ "description": "Count the input tokens of a Responses API request without calling the model.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/input_tokens -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Hello, how are you?\"\n}'\n```\n\nReturns: `{\"object\": \"response.input_tokens\", \"input_tokens\": <count>}`",+ "operationId": "responses_input_tokens_openai_v1_responses_input_tokens_post",+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Responses Input Tokens",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses/{response_id}": {+ "delete": {+ "description": "Delete a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Deletes from Redis cache\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete\n\n```bash\ncurl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```",+ "operationId": "delete_response_openai_v1_responses__response_id__delete",+ "parameters": [+ {+ "in": "path",+ "name": "response_id",+ "required": true,+ "schema": {+ "title": "Response Id",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Delete Response",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Get a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Returns cumulative cached content from background responses\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get\n\n```bash\n# Get polling response\ncurl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H \"Authorization: Bearer sk-1234\"\n\n# Get provider response\ncurl -X GET http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```",+ "operationId": "get_response_openai_v1_responses__response_id__get",+ "parameters": [+ {+ "in": "path",+ "name": "response_id",+ "required": true,+ "schema": {+ "title": "Response Id",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Get Response",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses/{response_id}/cancel": {+ "post": {+ "description": "Cancel a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Cancels background response and updates status in Redis\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/cancel\n\n```bash\n# Cancel polling response\ncurl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n\n# Cancel provider response\ncurl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n```",+ "operationId": "cancel_response_openai_v1_responses__response_id__cancel_post",+ "parameters": [+ {+ "in": "path",+ "name": "response_id",+ "required": true,+ "schema": {+ "title": "Response Id",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Cancel Response",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/v1/responses/{response_id}/input_items": {+ "get": {+ "description": "List input items for a response.",+ "operationId": "get_response_input_items_openai_v1_responses__response_id__input_items_get",+ "parameters": [+ {+ "in": "path",+ "name": "response_id",+ "required": true,+ "schema": {+ "title": "Response Id",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Get Response Input Items",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai/{endpoint}": {+ "delete": {+ "description": "Pass-through endpoint for OpenAI API calls.\n\nAvailable on both routes:\n- /openai/{endpoint:path} - Standard OpenAI passthrough route\n- /openai_passthrough/{endpoint:path} - Dedicated passthrough route (recommended for Responses API)\n\nUse /openai_passthrough/* when you need guaranteed passthrough to OpenAI without conflicts\nwith LiteLLM's native implementations (e.g., for the Responses API at /v1/responses).\n\nExamples:\n Standard route:\n - /openai/v1/chat/completions\n - /openai/v1/assistants\n - /openai/v1/threads\n\n Dedicated passthrough (for Responses API):\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_proxy_route_openai__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Pass-through endpoint for OpenAI API calls.\n\nAvailable on both routes:\n- /openai/{endpoint:path} - Standard OpenAI passthrough route\n- /openai_passthrough/{endpoint:path} - Dedicated passthrough route (recommended for Responses API)\n\nUse /openai_passthrough/* when you need guaranteed passthrough to OpenAI without conflicts\nwith LiteLLM's native implementations (e.g., for the Responses API at /v1/responses).\n\nExamples:\n Standard route:\n - /openai/v1/chat/completions\n - /openai/v1/assistants\n - /openai/v1/threads\n\n Dedicated passthrough (for Responses API):\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_proxy_route_openai__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Pass-through endpoint for OpenAI API calls.\n\nAvailable on both routes:\n- /openai/{endpoint:path} - Standard OpenAI passthrough route\n- /openai_passthrough/{endpoint:path} - Dedicated passthrough route (recommended for Responses API)\n\nUse /openai_passthrough/* when you need guaranteed passthrough to OpenAI without conflicts\nwith LiteLLM's native implementations (e.g., for the Responses API at /v1/responses).\n\nExamples:\n Standard route:\n - /openai/v1/chat/completions\n - /openai/v1/assistants\n - /openai/v1/threads\n\n Dedicated passthrough (for Responses API):\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_proxy_route_openai__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Pass-through endpoint for OpenAI API calls.\n\nAvailable on both routes:\n- /openai/{endpoint:path} - Standard OpenAI passthrough route\n- /openai_passthrough/{endpoint:path} - Dedicated passthrough route (recommended for Responses API)\n\nUse /openai_passthrough/* when you need guaranteed passthrough to OpenAI without conflicts\nwith LiteLLM's native implementations (e.g., for the Responses API at /v1/responses).\n\nExamples:\n Standard route:\n - /openai/v1/chat/completions\n - /openai/v1/assistants\n - /openai/v1/threads\n\n Dedicated passthrough (for Responses API):\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_proxy_route_openai__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Pass-through endpoint for OpenAI API calls.\n\nAvailable on both routes:\n- /openai/{endpoint:path} - Standard OpenAI passthrough route\n- /openai_passthrough/{endpoint:path} - Dedicated passthrough route (recommended for Responses API)\n\nUse /openai_passthrough/* when you need guaranteed passthrough to OpenAI without conflicts\nwith LiteLLM's native implementations (e.g., for the Responses API at /v1/responses).\n\nExamples:\n Standard route:\n - /openai/v1/chat/completions\n - /openai/v1/assistants\n - /openai/v1/threads\n\n Dedicated passthrough (for Responses API):\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_proxy_route_openai__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/openai_passthrough/{endpoint}": {+ "delete": {+ "description": "Dedicated pass-through to the OpenAI API with no overlap with LiteLLM's native\nimplementations (e.g. the Responses API at /v1/responses).\n\nExamples:\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_passthrough_route_openai_passthrough__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Passthrough Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Dedicated pass-through to the OpenAI API with no overlap with LiteLLM's native\nimplementations (e.g. the Responses API at /v1/responses).\n\nExamples:\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_passthrough_route_openai_passthrough__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Passthrough Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Dedicated pass-through to the OpenAI API with no overlap with LiteLLM's native\nimplementations (e.g. the Responses API at /v1/responses).\n\nExamples:\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_passthrough_route_openai_passthrough__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Passthrough Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Dedicated pass-through to the OpenAI API with no overlap with LiteLLM's native\nimplementations (e.g. the Responses API at /v1/responses).\n\nExamples:\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_passthrough_route_openai_passthrough__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Passthrough Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Dedicated pass-through to the OpenAI API with no overlap with LiteLLM's native\nimplementations (e.g. the Responses API at /v1/responses).\n\nExamples:\n - /openai_passthrough/v1/responses\n - /openai_passthrough/v1/responses/{response_id}\n - /openai_passthrough/v1/responses/{response_id}/input_items\n\n[Docs](https://docs.litellm.ai/docs/pass_through/openai_passthrough)",+ "operationId": "openai_passthrough_route_openai_passthrough__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Openai Passthrough Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/typesafe/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/typesafe)",+ "operationId": "typesafe_proxy_route_typesafe__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Typesafe Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/typesafe)",+ "operationId": "typesafe_proxy_route_typesafe__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Typesafe Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/typesafe)",+ "operationId": "typesafe_proxy_route_typesafe__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Typesafe Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/typesafe)",+ "operationId": "typesafe_proxy_route_typesafe__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Typesafe Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/typesafe)",+ "operationId": "typesafe_proxy_route_typesafe__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Typesafe Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/vertex_ai/discovery/{endpoint}": {+ "delete": {+ "description": "Call any vertex discovery endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/vertex_ai/discovery/{endpoint:path}`\n\nTarget url: `https://discoveryengine.googleapis.com`",+ "operationId": "vertex_discovery_proxy_route_vertex_ai_discovery__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Vertex Discovery Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Call any vertex discovery endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/vertex_ai/discovery/{endpoint:path}`\n\nTarget url: `https://discoveryengine.googleapis.com`",+ "operationId": "vertex_discovery_proxy_route_vertex_ai_discovery__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Vertex Discovery Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Call any vertex discovery endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/vertex_ai/discovery/{endpoint:path}`\n\nTarget url: `https://discoveryengine.googleapis.com`",+ "operationId": "vertex_discovery_proxy_route_vertex_ai_discovery__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Vertex Discovery Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Call any vertex discovery endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/vertex_ai/discovery/{endpoint:path}`\n\nTarget url: `https://discoveryengine.googleapis.com`",+ "operationId": "vertex_discovery_proxy_route_vertex_ai_discovery__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Vertex Discovery Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Call any vertex discovery endpoint using the proxy.\n\nJust use `{PROXY_BASE_URL}/vertex_ai/discovery/{endpoint:path}`\n\nTarget url: `https://discoveryengine.googleapis.com`",+ "operationId": "vertex_discovery_proxy_route_vertex_ai_discovery__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "summary": "Vertex Discovery Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/vertex_ai/{endpoint}": {+ "delete": {+ "description": "Call LiteLLM proxy via Vertex AI SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai)",+ "operationId": "vertex_proxy_route_vertex_ai__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vertex Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Call LiteLLM proxy via Vertex AI SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai)",+ "operationId": "vertex_proxy_route_vertex_ai__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vertex Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Call LiteLLM proxy via Vertex AI SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai)",+ "operationId": "vertex_proxy_route_vertex_ai__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vertex Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Call LiteLLM proxy via Vertex AI SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai)",+ "operationId": "vertex_proxy_route_vertex_ai__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vertex Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Call LiteLLM proxy via Vertex AI SDK.\n\n[Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai)",+ "operationId": "vertex_proxy_route_vertex_ai__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vertex Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/vllm/{endpoint}": {+ "delete": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/vllm)",+ "operationId": "vllm_proxy_route_vllm__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vllm Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/vllm)",+ "operationId": "vllm_proxy_route_vllm__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vllm Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/vllm)",+ "operationId": "vllm_proxy_route_vllm__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vllm Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/vllm)",+ "operationId": "vllm_proxy_route_vllm__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vllm Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "[Docs](https://docs.litellm.ai/docs/pass_through/vllm)",+ "operationId": "vllm_proxy_route_vllm__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Vllm Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ }+ },+ "/watsonx/{endpoint}": {+ "delete": {+ "description": "Watsonx pass-through endpoint.\nAllows using Watsonx APIs with automatic IAM token management and version parameter injection.\n\nExample:\n POST /watsonx/ml/v1/text/tokenization\n POST /watsonx/ml/v1/text/generation",+ "operationId": "watsonx_proxy_route_watsonx__endpoint__delete",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Watsonx Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "get": {+ "description": "Watsonx pass-through endpoint.\nAllows using Watsonx APIs with automatic IAM token management and version parameter injection.\n\nExample:\n POST /watsonx/ml/v1/text/tokenization\n POST /watsonx/ml/v1/text/generation",+ "operationId": "watsonx_proxy_route_watsonx__endpoint__get",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Watsonx Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "patch": {+ "description": "Watsonx pass-through endpoint.\nAllows using Watsonx APIs with automatic IAM token management and version parameter injection.\n\nExample:\n POST /watsonx/ml/v1/text/tokenization\n POST /watsonx/ml/v1/text/generation",+ "operationId": "watsonx_proxy_route_watsonx__endpoint__patch",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Watsonx Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "post": {+ "description": "Watsonx pass-through endpoint.\nAllows using Watsonx APIs with automatic IAM token management and version parameter injection.\n\nExample:\n POST /watsonx/ml/v1/text/tokenization\n POST /watsonx/ml/v1/text/generation",+ "operationId": "watsonx_proxy_route_watsonx__endpoint__post",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [+ {+ "APIKeyHeader": []+ }+ ],+ "summary": "Watsonx Proxy Route",+ "tags": [+ "llm_passthrough"+ ]+ },+ "put": {+ "description": "Watsonx pass-through endpoint.\nAllows using Watsonx APIs with automatic IAM token management and version parameter injection.\n\nExample:\n POST /watsonx/ml/v1/text/tokenization\n POST /watsonx/ml/v1/text/generation",+ "operationId": "watsonx_proxy_route_watsonx__endpoint__put",+ "parameters": [+ {+ "in": "path",+ "name": "endpoint",+ "required": true,+ "schema": {+ "title": "Endpoint",+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {}+ }+ },+ "description": "Successful Response"+ },+ "422": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/HTTPValidationError"+ }+ }+ },+ "description": "Validation Error"+ }+ },+ "security": [{- "in": "path",- "name": "endpoint",- "required": true,- "schema": {- "title": "Endpoint",- "type": "string"- }+ "APIKeyHeader": []}],- "responses": {- "200": {- "content": {- "application/json": {- "schema": {}- }- },- "description": "Successful Response"- },- "422": {- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/HTTPValidationError"- }- }- },- "description": "Validation Error"- }- },- "summary": "Langfuse Proxy Route",+ "summary": "Watsonx Proxy Route","tags": [- "langfuse_passthrough"+ "llm_passthrough"]}}diff --cc litellm/realtime_api/main.pyindex b824a5928c6,d67e4555a29..d70295e9a2a--- a/litellm/realtime_api/main.py+++ b/litellm/realtime_api/main.py@@@ -469,6 -481,6 +481,7 @@@ async def _arealtimeaws_sts_endpoint: Final = kwargs.get("aws_sts_endpoint")aws_bedrock_runtime_endpoint: Final = kwargs.get("aws_bedrock_runtime_endpoint")aws_external_id: Final = kwargs.get("aws_external_id")++ aws_session_tags: Final = kwargs.get("aws_session_tags")await bedrock_realtime.async_realtime(model=model,@@@ -488,6 -500,6 +501,7 @@@aws_sts_endpoint=aws_sts_endpoint,aws_bedrock_runtime_endpoint=aws_bedrock_runtime_endpoint,aws_external_id=aws_external_id,++ aws_session_tags=aws_session_tags,)elif _custom_llm_provider == "xai":api_base = (diff --cc litellm/types/llms/bedrock.pyindex 9a655a01c74,b0edf6c86b0..10082cf2373--- a/litellm/types/llms/bedrock.py+++ b/litellm/types/llms/bedrock.py@@@ -1108,25 -1107,11 +1108,31 @@@ class BedrockTag(TypedDict)value: str+ class AwsSessionTag(TypedDict):+ Key: str # writable-ok: boto3's STS stubs type assume_role Tags as writable TagTypeDef, which rejects ReadOnly+ Value: str # writable-ok: boto3's STS stubs type assume_role Tags as writable TagTypeDef, which rejects ReadOnly+++class AwsAuthParams(BaseModel):+ """Every credential-shaped aws_* param BaseAWSLLM.get_credentials accepts; region is resolved separately."""++ model_config = ConfigDict(frozen=True, extra="ignore")++ aws_access_key_id: str | None = None+ aws_secret_access_key: str | None = None+ aws_session_token: str | None = None+ aws_session_name: str | None = None+ aws_profile_name: str | None = None+ aws_role_name: str | None = None+ aws_web_identity_token: str | None = None+ aws_sts_endpoint: str | None = None+ aws_external_id: str | None = None++ aws_session_tags: object = None+++AWS_AUTH_PARAM_KEYS: Final[tuple[str, ...]] = tuple(AwsAuthParams.model_fields)++class BedrockCreateBatchRequest(TypedDict, total=False):"""Request structure for creating a Bedrock batch inference job.diff --cc tests/test_litellm/llms/bedrock/files/test_bedrock_files_transformation.pyindex 3b01a4f2054,c609455f3d8..95cb0b6f1a1--- a/tests/test_litellm/llms/bedrock/files/test_bedrock_files_transformation.py+++ b/tests/test_litellm/llms/bedrock/files/test_bedrock_files_transformation.py@@@ -2612,3 -2627,1058 +2627,1152 @@@ def test_sign_s3_request_without_body_aauthorization = {key.lower(): value for key, value in signed_headers.items()}["authorization"]assert "ASIAFILESGETROLE" in authorization++++class _SessionTagGatedSTSClient:++ """Mimics a trust policy with an aws:RequestTag condition: assume_role only succeeds with the expected tags."""++++ def __init__(self, expected_tags, access_key_id):++ self.expected_tags = expected_tags++ self.access_key_id = access_key_id++++ def get_caller_identity(self):++ return {"Arn": "arn:aws:iam::111111111111:user/litellm-proxy-pod"}++++ def assume_role(self, **params):++ import datetime++++ from botocore.exceptions import ClientError++++ if list(params.get("Tags") or ()) != self.expected_tags:++ raise ClientError(++ {"Error": {"Code": "AccessDenied", "Message": "is not authorized to perform: sts:TagSession"}},++ "AssumeRole",++ )++ return {++ "Credentials": {++ "AccessKeyId": self.access_key_id,++ "SecretAccessKey": "assumed-secret",++ "SessionToken": "assumed-session-token",++ "Expiration": datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(minutes=30),++ }++ }++++++def test_sign_s3_request_assumes_role_with_session_tags():++ """The deployment's aws_session_tags must reach STS when signing the S3 upload, not only on chat calls."""++ from unittest.mock import patch++++ import boto3++++ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++++ expected_tags = [{"Key": "team", "Value": "genai"}]++ optional_params = {++ "aws_region_name": "us-east-1",++ "aws_access_key_id": "AKIAFILESPUTCALLER",++ "aws_secret_access_key": "pod-caller-secret",++ "aws_role_name": "arn:aws:iam::999999999999:role/litellm-files-put-role",++ "aws_session_name": "litellm-files-put-session",++ "aws_session_tags": [{"Key": "team", "Value": "genai"}],++ }++++ with patch.object(boto3, "client", return_value=_SessionTagGatedSTSClient(expected_tags, "ASIAFILESPUTTAGGED")):++ signed_headers, _signed_body = BedrockFilesConfig()._sign_s3_request(++ content='{"custom_id": "req-1"}',++ api_base="https://s3.us-east-1.amazonaws.com/safe-bucket/litellm-bedrock-files-model-id-abc.jsonl",++ optional_params=optional_params,++ )++++ authorization = {key.lower(): value for key, value in signed_headers.items()}["authorization"]++ assert "ASIAFILESPUTTAGGED" in authorization++++++def test_sign_s3_request_without_body_assumes_role_with_session_tags():++ """The deployment's aws_session_tags must reach STS when signing the S3 download too."""++ from unittest.mock import patch++++ import boto3++++ from litellm.llms.bedrock.files.transformation import (++ BedrockFilesConfig,++ _BedrockS3RequestParams,++ )++++ expected_tags = [{"Key": "team", "Value": "genai"}]++ request_params = _BedrockS3RequestParams.model_validate(++ {++ "aws_region_name": "us-east-1",++ "aws_access_key_id": "AKIAFILESGETCALLER",++ "aws_secret_access_key": "pod-caller-secret",++ "aws_role_name": "arn:aws:iam::999999999999:role/litellm-files-get-role",++ "aws_session_name": "litellm-files-get-session",++ "aws_session_tags": [{"Key": "team", "Value": "genai"}],++ }++ )++++ with patch.object(boto3, "client", return_value=_SessionTagGatedSTSClient(expected_tags, "ASIAFILESGETTAGGED")):++ signed_headers = BedrockFilesConfig()._sign_s3_request_without_body(++ method="GET",++ api_base="https://s3.us-east-1.amazonaws.com/safe-bucket/litellm-bedrock-files-model-id-abc.jsonl",++ aws_region_name="us-east-1",++ request_params=request_params,++ )++++ authorization = {key.lower(): value for key, value in signed_headers.items()}["authorization"]++ assert "ASIAFILESGETTAGGED" in authorization+++++ def _s3_signature_for(method: str, url: str, headers: Mapping[str, str]) -> str:+ sent = {name.lower(): value for name, value in headers.items()}+ signed_names = sent["authorization"].split("SignedHeaders=")[1].split(",")[0].split(";")+ request = AWSRequest(+ method=method,+ url=url,+ headers={name: sent[name] for name in signed_names if name in sent},+ )+ request.context["timestamp"] = sent["x-amz-date"]+ signer = S3SigV4Auth(Credentials("AKIAEXAMPLE", "secret"), "s3", "us-west-2")+ return signer.signature(signer.string_to_sign(request, signer.canonical_request(request)), request)+++ def _sent_signature(headers: Mapping[str, str]) -> str:+ authorization = {name.lower(): value for name, value in headers.items()}["authorization"]+ return authorization.split("Signature=")[1].strip()+++ def _bedrock_s3_params() -> dict:+ return {+ "aws_access_key_id": "AKIAEXAMPLE",+ "aws_secret_access_key": "secret",+ "aws_region_name": "us-west-2",+ }+++ def _trusted_bucket_snapshot(**deployment_litellm_params) -> dict:+ from types import MappingProxyType++ from litellm.types.router import CredentialLiteLLMParams++ snapshot = CredentialLiteLLMParams(**deployment_litellm_params).model_dump(exclude_none=True)+ return {**_bedrock_s3_params(), "_litellm_internal_model_credentials": MappingProxyType(snapshot)}+++ class TestBedrockFileDeletionTransformation:+ """SigV4-signed S3 DeleteObject for LiteLLM-managed Bedrock batch files."""++ S3_URI = "s3://my-bucket/litellm-bedrock-files/job-123/input.jsonl"+ EXPECTED_URL = "https://s3.us-west-2.amazonaws.com/my-bucket/litellm-bedrock-files/job-123/input.jsonl"++ def test_transform_delete_file_request_signs_s3_delete(self, monkeypatch):+ import hashlib++ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ litellm_params = _bedrock_s3_params()++ url, params = BedrockFilesConfig().transform_delete_file_request(+ file_id=self.S3_URI,+ optional_params={},+ litellm_params=litellm_params,+ )++ assert url == self.EXPECTED_URL+ assert params == {}+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ lowered = {name.lower(): value for name, value in signed_headers.items()}+ assert lowered["x-amz-content-sha256"] == hashlib.sha256(b"").hexdigest()+ assert "/us-west-2/s3/aws4_request" in lowered["authorization"]+ assert _sent_signature(signed_headers) == _s3_signature_for("DELETE", url, signed_headers)++ def test_transform_delete_file_request_decodes_unified_file_id(self, monkeypatch):+ import base64++ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig+ from litellm.types.utils import SpecialEnums++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ unified_file_id = SpecialEnums.LITELLM_MANAGED_FILE_COMPLETE_STR.value.format(+ "application/json", "unified-id", "", self.S3_URI, "model-id"+ )+ encoded_file_id = base64.urlsafe_b64encode(unified_file_id.encode()).decode().rstrip("=")+ litellm_params = _bedrock_s3_params()++ url, _ = BedrockFilesConfig().transform_delete_file_request(+ file_id=encoded_file_id,+ optional_params={},+ litellm_params=litellm_params,+ )++ assert url == self.EXPECTED_URL++ def test_transform_delete_file_request_uses_trusted_snapshot_bucket(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)++ url, _ = BedrockFilesConfig().transform_delete_file_request(+ file_id=self.S3_URI,+ optional_params={},+ litellm_params=_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ assert url == self.EXPECTED_URL++ def test_transform_delete_file_request_rejects_foreign_bucket(self, monkeypatch):+ from litellm.llms.bedrock.common_utils import BedrockError+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with pytest.raises(BedrockError, match="configured storage bucket") as rejection:+ BedrockFilesConfig().transform_delete_file_request(+ file_id="s3://other-bucket/litellm-bedrock-files/job-123/input.jsonl",+ optional_params={},+ litellm_params=_bedrock_s3_params(),+ )++ assert rejection.value.status_code == 400+++ def test_transform_delete_file_request_rejects_unmanaged_key(self, monkeypatch):+ from litellm.llms.bedrock.common_utils import BedrockError+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with pytest.raises(BedrockError, match="LiteLLM-managed") as rejection:+ BedrockFilesConfig().transform_delete_file_request(+ file_id="s3://my-bucket/private/x.jsonl",+ optional_params={},+ litellm_params=_bedrock_s3_params(),+ )++ assert rejection.value.status_code == 400+++ def test_transform_delete_file_response_echoes_the_deleted_id(self):+ import httpx++ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ deleted = BedrockFilesConfig().transform_delete_file_response(+ raw_response=httpx.Response(204),+ logging_obj=MagicMock(model_call_details={"additional_args": {"file_id": self.S3_URI}}),+ litellm_params={},+ )++ assert deleted.id == self.S3_URI+ assert deleted.deleted is True+ assert deleted.object == "file"++ def test_transform_delete_file_response_raises_on_s3_error(self):+ import httpx++ from litellm.llms.bedrock.common_utils import BedrockError+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ with pytest.raises(BedrockError) as excinfo:+ BedrockFilesConfig().transform_delete_file_response(+ raw_response=httpx.Response(403, text="<Error><Code>AccessDenied</Code></Error>"),+ logging_obj=MagicMock(),+ litellm_params={},+ )++ assert excinfo.value.status_code == 403++ def test_file_delete_end_to_end_sends_signed_delete(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock:+ route = respx.delete(self.EXPECTED_URL).mock(return_value=httpx.Response(204))++ response = litellm.file_delete(+ file_id=self.S3_URI,+ custom_llm_provider="bedrock",+ **_bedrock_s3_params(),+ )++ assert route.called+ request = route.calls[0].request+ assert request.headers["Authorization"].startswith("AWS4-HMAC-SHA256")+ assert _sent_signature(request.headers) == _s3_signature_for("DELETE", str(request.url), request.headers)+ assert response.id == self.S3_URI+ assert response.deleted is True++ @pytest.mark.asyncio+ async def test_afile_delete_end_to_end_sends_signed_delete(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ litellm.in_memory_llm_clients_cache.flush_cache()++ with respx.mock:+ route = respx.delete(self.EXPECTED_URL).mock(return_value=httpx.Response(204))++ response = await litellm.afile_delete(+ file_id=self.S3_URI,+ custom_llm_provider="bedrock",+ **_bedrock_s3_params(),+ )++ assert route.called+ request = route.calls[0].request+ assert _sent_signature(request.headers) == _s3_signature_for("DELETE", str(request.url), request.headers)+ assert response.id == self.S3_URI+ assert response.deleted is True++ def test_file_delete_end_to_end_answers_400_for_a_foreign_bucket(self, monkeypatch):+ import respx++ import litellm+ from litellm.llms.bedrock.common_utils import BedrockError++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock, pytest.raises(BedrockError) as rejection:+ litellm.file_delete(+ file_id="s3://other-bucket/litellm-bedrock-files/job-123/input.jsonl",+ custom_llm_provider="bedrock",+ **_bedrock_s3_params(),+ )++ assert rejection.value.status_code == 400+ assert "configured storage bucket" in rejection.value.message++ def test_file_delete_end_to_end_answers_400_for_a_non_managed_id(self, monkeypatch):+ import respx++ import litellm+ from litellm.llms.bedrock.common_utils import BedrockError++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock, pytest.raises(BedrockError) as rejection:+ litellm.file_delete(file_id="file-1234567890", custom_llm_provider="bedrock", **_bedrock_s3_params())++ assert rejection.value.status_code == 400+ assert "managed LiteLLM S3 file id" in rejection.value.message++ def test_file_delete_end_to_end_surfaces_the_s3_error_body(self, monkeypatch):+ import httpx+ import respx++ import litellm+ from litellm.llms.bedrock.common_utils import BedrockError++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock:+ respx.delete(self.EXPECTED_URL).mock(+ return_value=httpx.Response(403, text="<Error><Code>AccessDenied</Code></Error>")+ )+ with pytest.raises(BedrockError) as denied:+ litellm.file_delete(file_id=self.S3_URI, custom_llm_provider="bedrock", **_bedrock_s3_params())++ assert denied.value.status_code == 403+ assert "AccessDenied" in denied.value.message+++ class TestBedrockFileListTransformation:+ """SigV4-signed S3 ListObjectsV2 over the LiteLLM-managed key prefixes."""++ BUCKET_URL = "https://s3.us-west-2.amazonaws.com/my-bucket/"+ MANAGED_QUERY = {"list-type": "2", "prefix": "litellm-b"}+ BATCH_QUERY = {"list-type": "2", "prefix": "litellm-bedrock-files"}+ OUTPUT_QUERY = {"list-type": "2", "prefix": "litellm-batch-outputs/"}+ OUTPUT_BUCKET_URL = "https://s3.us-west-2.amazonaws.com/my-output-bucket/"+ OUTPUT_BUCKET_LISTING = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-output-bucket</Name>+ <Prefix>litellm-batch-outputs/</Prefix>+ <Contents>+ <Key>litellm-batch-outputs/job-9/input.jsonl.out</Key>+ <LastModified>2026-09-04T08:00:00.000Z</LastModified>+ <Size>70</Size>+ </Contents>+ </ListBucketResult>"""+ OUTPUT_BUCKET_ID = "s3://my-output-bucket/litellm-batch-outputs/job-9/input.jsonl.out"+ LISTING = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-bucket</Name>+ <Prefix>litellm-b</Prefix>+ <KeyCount>4</KeyCount>+ <IsTruncated>false</IsTruncated>+ <Contents>+ <Key>litellm-bedrock-files-model-abc.jsonl</Key>+ <LastModified>2026-09-01T10:00:00.000Z</LastModified>+ <Size>120</Size>+ </Contents>+ <Contents>+ <Key>litellm-bedrock-files/job-123/input.jsonl</Key>+ <LastModified>2026-09-02T11:30:00.000Z</LastModified>+ <Size>340</Size>+ </Contents>+ <Contents>+ <Key>litellm-batch-outputs/job-123/input.jsonl.out</Key>+ <LastModified>2026-09-03T12:45:00.000Z</LastModified>+ <Size>560</Size>+ </Contents>+ <Contents>+ <Key>litellm-bogus/other.jsonl</Key>+ <LastModified>2026-09-03T12:45:00.000Z</LastModified>+ <Size>1</Size>+ </Contents>+ </ListBucketResult>"""+ BATCH_IDS = (+ "s3://my-bucket/litellm-bedrock-files-model-abc.jsonl",+ "s3://my-bucket/litellm-bedrock-files/job-123/input.jsonl",+ )+ OUTPUT_ID = "s3://my-bucket/litellm-batch-outputs/job-123/input.jsonl.out"+ CONTINUATION_TOKEN = "1ueGcxLPRx1Tr/XYExHnhbYLgveDs2J/wm36Hy4vbOwM="+ FIRST_PAGE = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-bucket</Name>+ <Prefix>litellm-bedrock-files</Prefix>+ <KeyCount>1</KeyCount>+ <MaxKeys>1</MaxKeys>+ <IsTruncated>true</IsTruncated>+ <NextContinuationToken>1ueGcxLPRx1Tr/XYExHnhbYLgveDs2J/wm36Hy4vbOwM=</NextContinuationToken>+ <Contents>+ <Key>litellm-bedrock-files/job-1/input.jsonl</Key>+ <LastModified>2026-09-01T10:00:00.000Z</LastModified>+ <Size>10</Size>+ </Contents>+ </ListBucketResult>"""+ LAST_PAGE = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-bucket</Name>+ <Prefix>litellm-bedrock-files</Prefix>+ <KeyCount>1</KeyCount>+ <MaxKeys>1</MaxKeys>+ <IsTruncated>false</IsTruncated>+ <ContinuationToken>1ueGcxLPRx1Tr/XYExHnhbYLgveDs2J/wm36Hy4vbOwM=</ContinuationToken>+ <Contents>+ <Key>litellm-bedrock-files/job-2/input.jsonl</Key>+ <LastModified>2026-09-02T10:00:00.000Z</LastModified>+ <Size>20</Size>+ </Contents>+ </ListBucketResult>"""+ PAGED_IDS = (+ "s3://my-bucket/litellm-bedrock-files/job-1/input.jsonl",+ "s3://my-bucket/litellm-bedrock-files/job-2/input.jsonl",+ )++ def test_transform_list_files_request_signs_managed_prefix_listing(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import (+ LIST_FILES_PURPOSE_PARAM,+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ litellm_params = _bedrock_s3_params()++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch",+ optional_params={},+ litellm_params=litellm_params,+ )++ assert url == self.BUCKET_URL+ assert params == self.BATCH_QUERY+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ assert _sent_signature(signed_headers) == _s3_signature_for(+ "GET", f"{url}?list-type=2&prefix=litellm-bedrock-files", signed_headers+ )+ assert litellm_params[LIST_FILES_PURPOSE_PARAM] == "batch"++ def test_transform_list_files_request_scopes_to_configured_prefix(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket/LLM AI Projects")+ litellm_params = _bedrock_s3_params()++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose=None,+ optional_params={},+ litellm_params=litellm_params,+ )++ assert url == self.BUCKET_URL+ assert params == {"list-type": "2", "prefix": "LLM AI Projects/litellm-b"}+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ assert _sent_signature(signed_headers) == _s3_signature_for(+ "GET", f"{url}?list-type=2&prefix=LLM%20AI%20Projects%2Flitellm-b", signed_headers+ )++ def test_transform_list_files_request_uses_trusted_snapshot_bucket(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose=None,+ optional_params={},+ litellm_params=_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ assert url == self.BUCKET_URL+ assert params == self.MANAGED_QUERY++ def _list_response(self, purpose: str | None, listing: bytes | None = None, status_code: int = 200):+ import httpx++ from litellm.llms.bedrock.files.transformation import (+ LIST_FILES_PURPOSE_PARAM,+ BedrockFilesConfig,+ )++ return BedrockFilesConfig().transform_list_files_response(+ raw_response=httpx.Response(status_code, content=listing if listing is not None else self.LISTING),+ logging_obj=MagicMock(),+ litellm_params={**_bedrock_s3_params(), LIST_FILES_PURPOSE_PARAM: purpose},+ )++ def test_transform_list_files_response_maps_managed_objects(self, monkeypatch):+ from datetime import datetime, timezone++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ files = self._list_response(purpose=None)++ assert [file.id for file in files] == [*self.BATCH_IDS, self.OUTPUT_ID]+ assert [file.purpose for file in files] == ["batch", "batch", "batch_output"]+ assert [file.bytes for file in files] == [120, 340, 560]+ assert [file.filename for file in files] == [+ "litellm-bedrock-files-model-abc.jsonl",+ "input.jsonl",+ "input.jsonl.out",+ ]+ assert files[1].created_at == int(datetime(2026, 9, 2, 11, 30, tzinfo=timezone.utc).timestamp())+ assert {file.object for file in files} == {"file"}+ assert {file.status for file in files} == {"uploaded"}++ def test_transform_list_files_response_filters_by_purpose(self, monkeypatch):+ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ assert [file.id for file in self._list_response(purpose="batch")] == list(self.BATCH_IDS)+ assert [file.id for file in self._list_response(purpose="batch_output")] == [self.OUTPUT_ID]++ def test_transform_list_files_response_scopes_to_configured_prefix(self, monkeypatch):+ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket/team-a")+ listing = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-bucket</Name>+ <Contents><Key>team-a/litellm-bedrock-files/job-1/input.jsonl</Key><Size>10</Size></Contents>+ <Contents><Key>team-a/litellm-batch-outputs/job-1/input.jsonl.out</Key><Size>20</Size></Contents>+ <Contents><Key>litellm-bedrock-files/job-2/input.jsonl</Key><Size>30</Size></Contents>+ </ListBucketResult>"""++ files = self._list_response(purpose=None, listing=listing)++ assert [(file.id, file.purpose) for file in files] == [+ ("s3://my-bucket/team-a/litellm-bedrock-files/job-1/input.jsonl", "batch"),+ ("s3://my-bucket/team-a/litellm-batch-outputs/job-1/input.jsonl.out", "batch_output"),+ ]++ def test_transform_list_files_response_raises_on_s3_error(self, monkeypatch):+ from litellm.llms.bedrock.common_utils import BedrockError++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with pytest.raises(BedrockError) as excinfo:+ self._list_response(purpose=None, listing=b"<Error><Code>AccessDenied</Code></Error>", status_code=403)++ assert excinfo.value.status_code == 403++ def test_file_list_end_to_end_sends_signed_listing(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock:+ route = respx.get(self.BUCKET_URL, params__contains=self.BATCH_QUERY).mock(+ return_value=httpx.Response(200, content=self.LISTING)+ )++ files = litellm.file_list(custom_llm_provider="bedrock", purpose="batch", **_bedrock_s3_params())++ assert route.called+ request = route.calls[0].request+ assert request.headers["Authorization"].startswith("AWS4-HMAC-SHA256")+ assert _sent_signature(request.headers) == _s3_signature_for("GET", str(request.url), request.headers)+ assert [file.id for file in files] == list(self.BATCH_IDS)++ def test_file_list_uses_trusted_snapshot_bucket_without_env(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)++ with respx.mock:+ route = respx.get(self.BUCKET_URL, params__contains=self.MANAGED_QUERY).mock(+ return_value=httpx.Response(200, content=self.LISTING)+ )++ files = litellm.file_list(+ custom_llm_provider="bedrock",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ assert route.called+ assert [file.id for file in files] == [*self.BATCH_IDS, self.OUTPUT_ID]++ @pytest.mark.asyncio+ async def test_afile_list_end_to_end_sends_signed_listing(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ litellm.in_memory_llm_clients_cache.flush_cache()++ with respx.mock:+ route = respx.get(self.BUCKET_URL, params__contains=self.OUTPUT_QUERY).mock(+ return_value=httpx.Response(200, content=self.LISTING)+ )++ files = await litellm.afile_list(+ custom_llm_provider="bedrock", purpose="batch_output", **_bedrock_s3_params()+ )++ assert route.called+ request = route.calls[0].request+ assert _sent_signature(request.headers) == _s3_signature_for("GET", str(request.url), request.headers)+ assert [file.id for file in files] == [self.OUTPUT_ID]++ def test_transform_list_files_request_narrows_prefix_to_requested_purpose(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ batch_url, batch_params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch", optional_params={}, litellm_params=_bedrock_s3_params()+ )+ output_url, output_params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch_output", optional_params={}, litellm_params=_bedrock_s3_params()+ )++ assert (batch_url, batch_params) == (self.BUCKET_URL, self.BATCH_QUERY)+ assert (output_url, output_params) == (self.BUCKET_URL, self.OUTPUT_QUERY)++ def test_transform_list_files_request_lists_configured_output_bucket_for_batch_output(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)+ litellm_params = _trusted_bucket_snapshot(+ s3_bucket_name="my-bucket", s3_output_bucket_name="my-output-bucket/team-a"+ )++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch_output", optional_params={}, litellm_params=litellm_params+ )+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ input_url, input_params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch", optional_params={}, litellm_params=dict(litellm_params)+ )++ assert url == self.OUTPUT_BUCKET_URL+ assert params == {"list-type": "2", "prefix": "team-a/litellm-batch-outputs/"}+ assert _sent_signature(signed_headers) == _s3_signature_for(+ "GET", f"{url}?list-type=2&prefix=team-a%2Flitellm-batch-outputs%2F", signed_headers+ )+ assert (input_url, input_params) == (self.BUCKET_URL, self.BATCH_QUERY)++ def test_transform_list_files_request_reads_output_bucket_from_env(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ monkeypatch.setenv("AWS_S3_OUTPUT_BUCKET_NAME", "my-output-bucket")++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch_output", optional_params={}, litellm_params=_bedrock_s3_params()+ )++ assert (url, params) == (self.OUTPUT_BUCKET_URL, self.OUTPUT_QUERY)++ EMPTY_LISTING = b"""<?xml version="1.0" encoding="UTF-8"?>+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">+ <Name>my-bucket</Name>+ <Prefix></Prefix>+ <KeyCount>0</KeyCount>+ <MaxKeys>0</MaxKeys>+ <IsTruncated>false</IsTruncated>+ </ListBucketResult>"""+ NO_KEYS_QUERY = {"list-type": "2", "max-keys": "0"}++ def test_transform_list_files_request_asks_for_no_keys_when_bedrock_never_stores_the_purpose(self, monkeypatch):+ import httpx++ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ litellm_params = _bedrock_s3_params()+ config = BedrockFilesConfig()++ url, params = config.transform_list_files_request(+ purpose="user_data", optional_params={}, litellm_params=litellm_params+ )+ next_request = config.transform_list_files_next_request(+ raw_response=httpx.Response(200, content=self.EMPTY_LISTING),+ optional_params={},+ litellm_params=litellm_params,+ )++ assert (url, params) == (self.BUCKET_URL, self.NO_KEYS_QUERY)+ assert next_request is None++ def test_file_list_never_walks_the_bucket_for_a_purpose_bedrock_never_stores(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock:+ route = respx.get(self.BUCKET_URL, params__contains=self.NO_KEYS_QUERY).mock(+ return_value=httpx.Response(200, content=self.EMPTY_LISTING)+ )++ files = litellm.file_list(custom_llm_provider="bedrock", purpose="user_data", **_bedrock_s3_params())++ assert route.call_count == 1+ assert "prefix" not in route.calls[0].request.url.params+ assert files == []++ def test_transform_list_files_request_lists_the_output_bucket_without_an_input_bucket(self, monkeypatch):+ from litellm.llms.bedrock.files.transformation import BedrockFilesConfig++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)+ litellm_params = _trusted_bucket_snapshot(s3_output_bucket_name="my-output-bucket")++ url, params = BedrockFilesConfig().transform_list_files_request(+ purpose="batch_output", optional_params={}, litellm_params=litellm_params+ )++ assert (url, params) == (self.OUTPUT_BUCKET_URL, self.OUTPUT_QUERY)+ with pytest.raises(ValueError, match="s3_bucket_name"):+ BedrockFilesConfig().transform_list_files_request(+ purpose="batch", optional_params={}, litellm_params=dict(litellm_params)+ )++ def test_transform_list_files_response_accepts_output_bucket_objects(self, monkeypatch):+ import httpx++ from litellm.llms.bedrock.files.transformation import (+ LIST_FILES_PURPOSE_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ files = BedrockFilesConfig().transform_list_files_response(+ raw_response=httpx.Response(200, content=self.OUTPUT_BUCKET_LISTING),+ logging_obj=MagicMock(),+ litellm_params={+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket", s3_output_bucket_name="my-output-bucket"),+ LIST_FILES_PURPOSE_PARAM: "batch_output",+ },+ )++ assert [(file.id, file.purpose, file.bytes) for file in files] == [(self.OUTPUT_BUCKET_ID, "batch_output", 70)]++ def test_file_list_batch_output_end_to_end_lists_output_bucket(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ route = respx.get(self.OUTPUT_BUCKET_URL, params__contains=self.OUTPUT_QUERY).mock(+ return_value=httpx.Response(200, content=self.OUTPUT_BUCKET_LISTING)+ )++ files = litellm.file_list(+ custom_llm_provider="bedrock",+ purpose="batch_output",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket", s3_output_bucket_name="my-output-bucket"),+ )++ assert route.called+ request = route.calls[0].request+ assert _sent_signature(request.headers) == _s3_signature_for("GET", str(request.url), request.headers)+ assert [file.id for file in files] == [self.OUTPUT_BUCKET_ID]++ def test_file_list_without_purpose_also_walks_a_separate_output_bucket(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ input_route = respx.get(self.BUCKET_URL, params__contains=self.MANAGED_QUERY).mock(+ return_value=httpx.Response(200, content=self.LISTING)+ )+ output_route = respx.get(self.OUTPUT_BUCKET_URL, params__contains=self.OUTPUT_QUERY).mock(+ return_value=httpx.Response(200, content=self.OUTPUT_BUCKET_LISTING)+ )++ files = litellm.file_list(+ custom_llm_provider="bedrock",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket", s3_output_bucket_name="my-output-bucket"),+ )++ assert (input_route.call_count, output_route.call_count) == (1, 1)+ output_request = output_route.calls[0].request+ assert _sent_signature(output_request.headers) == _s3_signature_for(+ "GET", str(output_request.url), output_request.headers+ )+ assert [file.id for file in files] == [*self.BATCH_IDS, self.OUTPUT_ID, self.OUTPUT_BUCKET_ID]++ def test_file_list_without_purpose_walks_the_output_bucket_after_the_last_input_page(self, monkeypatch):+ import httpx+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ respx.get(self.BUCKET_URL, params__contains={"continuation-token": self.CONTINUATION_TOKEN}).mock(+ return_value=httpx.Response(200, content=self.LAST_PAGE)+ )+ respx.get(self.BUCKET_URL, params__contains=self.MANAGED_QUERY).mock(+ return_value=httpx.Response(200, content=self.FIRST_PAGE)+ )+ respx.get(self.OUTPUT_BUCKET_URL, params__contains=self.OUTPUT_QUERY).mock(+ return_value=httpx.Response(200, content=self.OUTPUT_BUCKET_LISTING)+ )++ files = litellm.file_list(+ custom_llm_provider="bedrock",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket", s3_output_bucket_name="my-output-bucket"),+ )+ requested_urls = [str(call.request.url) for call in respx.calls]++ assert requested_urls == [+ f"{self.BUCKET_URL}?list-type=2&prefix=litellm-b",+ f"{self.BUCKET_URL}?list-type=2&prefix=litellm-b"+ "&continuation-token=1ueGcxLPRx1Tr%2FXYExHnhbYLgveDs2J%2Fwm36Hy4vbOwM%3D",+ f"{self.OUTPUT_BUCKET_URL}?list-type=2&prefix=litellm-batch-outputs%2F",+ ]+ assert [file.id for file in files] == [*self.PAGED_IDS, self.OUTPUT_BUCKET_ID]++ @pytest.mark.parametrize(+ ("purpose", "bucket_snapshot"),+ [+ pytest.param(None, {"s3_bucket_name": "my-bucket"}, id="outputs-share-the-input-bucket"),+ pytest.param(+ "batch",+ {"s3_bucket_name": "my-bucket", "s3_output_bucket_name": "my-output-bucket"},+ id="input-purpose-requested",+ ),+ ],+ )+ def test_file_list_leaves_the_output_bucket_alone_unless_an_unfiltered_list_needs_it(+ self, monkeypatch, purpose, bucket_snapshot+ ):+ import httpx+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ input_route = respx.get(self.BUCKET_URL).mock(return_value=httpx.Response(200, content=self.LISTING))+ output_route = respx.get(self.OUTPUT_BUCKET_URL).mock(+ return_value=httpx.Response(200, content=self.OUTPUT_BUCKET_LISTING)+ )++ files = litellm.file_list(+ custom_llm_provider="bedrock", purpose=purpose, **_trusted_bucket_snapshot(**bucket_snapshot)+ )++ assert (input_route.call_count, output_route.call_count) == (1, 0)+ assert [file.id for file in files] == [*self.BATCH_IDS, *(() if purpose else (self.OUTPUT_ID,))]++ def test_transform_list_files_next_request_walks_an_output_prefix_inside_the_input_bucket(self, monkeypatch):+ import httpx++ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)+ litellm_params = _trusted_bucket_snapshot(s3_bucket_name="my-bucket", s3_output_bucket_name="my-bucket/out")+ config = BedrockFilesConfig()+ config.transform_list_files_request(purpose=None, optional_params={}, litellm_params=litellm_params)+ litellm_params.pop(S3_SIGNED_REQUEST_HEADERS_PARAM)++ output_request = config.transform_list_files_next_request(+ raw_response=httpx.Response(200, content=self.LISTING), optional_params={}, litellm_params=litellm_params+ )+ after_output_request = config.transform_list_files_next_request(+ raw_response=httpx.Response(200, content=self.LISTING), optional_params={}, litellm_params=litellm_params+ )++ assert output_request == (self.BUCKET_URL, {"list-type": "2", "prefix": "out/litellm-batch-outputs/"})+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ assert _sent_signature(signed_headers) == _s3_signature_for(+ "GET", f"{self.BUCKET_URL}?list-type=2&prefix=out%2Flitellm-batch-outputs%2F", signed_headers+ )+ assert after_output_request is None++ def test_transform_list_files_next_request_signs_the_continuation_page(self, monkeypatch):+ import httpx++ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ litellm_params = _bedrock_s3_params()+ config = BedrockFilesConfig()+ config.transform_list_files_request(purpose="batch", optional_params={}, litellm_params=litellm_params)+ first_signature = _sent_signature(litellm_params.pop(S3_SIGNED_REQUEST_HEADERS_PARAM))++ next_request = config.transform_list_files_next_request(+ raw_response=httpx.Response(200, content=self.FIRST_PAGE),+ optional_params={},+ litellm_params=litellm_params,+ )++ assert next_request == (self.BUCKET_URL, {**self.BATCH_QUERY, "continuation-token": self.CONTINUATION_TOKEN})+ signed_headers = litellm_params[S3_SIGNED_REQUEST_HEADERS_PARAM]+ signed_url = (+ f"{self.BUCKET_URL}?list-type=2&prefix=litellm-bedrock-files"+ "&continuation-token=1ueGcxLPRx1Tr%2FXYExHnhbYLgveDs2J%2Fwm36Hy4vbOwM%3D"+ )+ assert _sent_signature(signed_headers) == _s3_signature_for("GET", signed_url, signed_headers)+ assert _sent_signature(signed_headers) != first_signature++ @pytest.mark.parametrize(+ ("status_code", "content"),+ [+ pytest.param(200, LAST_PAGE, id="last-page"),+ pytest.param(403, b"<Error><Code>AccessDenied</Code></Error>", id="error-page"),+ ],+ )+ def test_transform_list_files_next_request_stops_after_the_last_page(self, monkeypatch, status_code, content):+ import httpx++ from litellm.llms.bedrock.files.transformation import (+ S3_SIGNED_REQUEST_HEADERS_PARAM,+ BedrockFilesConfig,+ )++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")+ litellm_params = _bedrock_s3_params()++ next_request = BedrockFilesConfig().transform_list_files_next_request(+ raw_response=httpx.Response(status_code, content=content),+ optional_params={},+ litellm_params=litellm_params,+ )++ assert next_request is None+ assert S3_SIGNED_REQUEST_HEADERS_PARAM not in litellm_params++ def _mock_paged_listing(self, respx_module):+ import httpx++ last_page = respx_module.get(+ self.BUCKET_URL, params__contains={"continuation-token": self.CONTINUATION_TOKEN}+ ).mock(return_value=httpx.Response(200, content=self.LAST_PAGE))+ first_page = respx_module.get(self.BUCKET_URL, params__contains=self.BATCH_QUERY).mock(+ return_value=httpx.Response(200, content=self.FIRST_PAGE)+ )+ return first_page, last_page++ def _assert_paged_listing(self, first_page, last_page, files):+ assert (first_page.call_count, last_page.call_count) == (1, 1)+ read_timeouts = [call.request.extensions["timeout"]["read"] for call in (*first_page.calls, *last_page.calls)]+ assert read_timeouts == [12.0, 12.0]+ assert "continuation-token" not in str(first_page.calls[0].request.url)+ last_request = last_page.calls[0].request+ assert _sent_signature(last_request.headers) == _s3_signature_for(+ "GET", str(last_request.url), last_request.headers+ )+ assert [file.id for file in files] == list(self.PAGED_IDS)++ def test_file_list_follows_continuation_tokens_across_pages(self, monkeypatch):+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ first_page, last_page = self._mock_paged_listing(respx)+ files = litellm.file_list(+ custom_llm_provider="bedrock",+ purpose="batch",+ timeout=12,+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ self._assert_paged_listing(first_page, last_page, files)++ @pytest.mark.asyncio+ async def test_afile_list_follows_continuation_tokens_across_pages(self, monkeypatch):+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ litellm.in_memory_llm_clients_cache.flush_cache()++ with respx.mock:+ first_page, last_page = self._mock_paged_listing(respx)+ files = await litellm.afile_list(+ custom_llm_provider="bedrock",+ purpose="batch",+ timeout=12,+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ self._assert_paged_listing(first_page, last_page, files)++ OVERSIZED_PAGE_SIZE = 3000+ OVERSIZED_PAGE_COUNT = 6++ def _oversized_listing_page(self, page_index: int) -> bytes:+ contents = "".join(+ f"<Contents><Key>litellm-bedrock-files/page-{page_index}/obj-{index}.jsonl</Key>"+ "<LastModified>2026-09-01T10:00:00.000Z</LastModified><Size>1</Size></Contents>"+ for index in range(self.OVERSIZED_PAGE_SIZE)+ )+ continuation = (+ f"<IsTruncated>true</IsTruncated><NextContinuationToken>page-{page_index + 1}</NextContinuationToken>"+ if page_index < self.OVERSIZED_PAGE_COUNT - 1+ else "<IsTruncated>false</IsTruncated>"+ )+ return (+ '<?xml version="1.0" encoding="UTF-8"?>'+ '<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">'+ f"{continuation}{contents}</ListBucketResult>"+ ).encode()++ def _mock_oversized_listing(self, respx_module):+ import httpx++ def page_for(request):+ token = request.url.params.get("continuation-token", "page-0")+ return httpx.Response(200, content=self._oversized_listing_page(int(token.removeprefix("page-"))))++ return respx_module.get(self.BUCKET_URL, params__contains=self.BATCH_QUERY).mock(side_effect=page_for)++ def _assert_capped_listing(self, route, files):+ from litellm.constants import MAX_FILE_LIST_LIMIT++ pages_needed = -(-MAX_FILE_LIST_LIMIT // self.OVERSIZED_PAGE_SIZE)+ last_index = MAX_FILE_LIST_LIMIT - (pages_needed - 1) * self.OVERSIZED_PAGE_SIZE - 1+ assert pages_needed < self.OVERSIZED_PAGE_COUNT+ assert route.call_count == pages_needed+ assert len(files) == MAX_FILE_LIST_LIMIT+ assert files[-1].id == f"s3://my-bucket/litellm-bedrock-files/page-{pages_needed - 1}/obj-{last_index}.jsonl"++ def test_file_list_stops_at_the_openai_listing_ceiling(self, monkeypatch):+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)++ with respx.mock:+ route = self._mock_oversized_listing(respx)+ files = litellm.file_list(+ custom_llm_provider="bedrock",+ purpose="batch",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ self._assert_capped_listing(route, files)++ @pytest.mark.asyncio+ async def test_afile_list_stops_at_the_openai_listing_ceiling(self, monkeypatch):+ import respx++ import litellm++ monkeypatch.delenv("AWS_S3_BUCKET_NAME", raising=False)+ monkeypatch.delenv("AWS_S3_OUTPUT_BUCKET_NAME", raising=False)+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ litellm.in_memory_llm_clients_cache.flush_cache()++ with respx.mock:+ route = self._mock_oversized_listing(respx)+ files = await litellm.afile_list(+ custom_llm_provider="bedrock",+ purpose="batch",+ **_trusted_bucket_snapshot(s3_bucket_name="my-bucket"),+ )++ self._assert_capped_listing(route, files)++ def test_file_list_end_to_end_surfaces_the_s3_error_body(self, monkeypatch):+ import httpx+ import respx++ import litellm+ from litellm.llms.bedrock.common_utils import BedrockError++ monkeypatch.setenv("AWS_S3_BUCKET_NAME", "my-bucket")++ with respx.mock:+ respx.get(self.BUCKET_URL, params__contains=self.BATCH_QUERY).mock(+ return_value=httpx.Response(403, text="<Error><Code>AccessDenied</Code></Error>")+ )+ with pytest.raises(BedrockError) as denied:+ litellm.file_list(custom_llm_provider="bedrock", purpose="batch", **_bedrock_s3_params())++ assert denied.value.status_code == 403+ assert "AccessDenied" in denied.value.messagediff --cc tests/test_litellm/llms/bedrock/realtime/test_bedrock_realtime_handler.pyindex 0ea5b7ad4a1,21838759acd..a7f0f64ef68--- a/tests/test_litellm/llms/bedrock/realtime/test_bedrock_realtime_handler.py+++ b/tests/test_litellm/llms/bedrock/realtime/test_bedrock_realtime_handler.py@@@ -510,6 -855,6 +855,7 @@@ class TestBedrockRealtimeAwsAuthaws_role_name="arn:aws:iam::123456789012:role/nova-sonic",aws_session_name="realtime-session",aws_external_id="realtime-external-id",++ aws_session_tags=[{"Key": "team", "Value": "realtime"}],)assert handler.get_credentials_kwargs == {@@@ -523,12 -868,12 +869,13 @@@"aws_web_identity_token": None,"aws_sts_endpoint": None,"aws_external_id": "realtime-external-id",++ "aws_session_tags": ({"Key": "team", "Value": "realtime"},),}- config_kwargs = stub_aws_sdk_client["config_kwargs"]- assert config_kwargs["aws_access_key_id"] == "assumed-access-key"- assert config_kwargs["aws_secret_access_key"] == "assumed-secret-key"- assert config_kwargs["aws_session_token"] == "assumed-session-token"- assert isinstance(config_kwargs["aws_credentials_identity_resolver"], FakeStaticCredentialsResolver)+ resolver = stub_aws_sdk_client["config_kwargs"]["aws_credentials_identity_resolver"]+ assert isinstance(resolver, FakeStaticCredentialsResolver)+ assert resolver.identity.access_key_id == "assumed-access-key"+ assert resolver.identity.secret_access_key == "assumed-secret-key"+ assert resolver.identity.session_token == "assumed-session-token"@pytest.mark.asyncioasync def test_unresolvable_credentials_raise_clear_auth_error(self, stub_aws_sdk_client):diff --cc tests/test_litellm/llms/bedrock/test_base_aws_llm.pyindex a08165e855b,c5b8e7ecc9d..c91bc604b06--- a/tests/test_litellm/llms/bedrock/test_base_aws_llm.py+++ b/tests/test_litellm/llms/bedrock/test_base_aws_llm.py@@@ -3278,113 -3555,3 +3555,148 @@@ def test_run_aws_signing_leaves_the_defother_provider, signing_thread = asyncio.run(scenario())assert other_provider != signing_threadassert signing_thread.startswith("aws-signing")+++def _recording_boto3_client(recorded: Dict[str, Any]):+ """boto3.client replacement that records the STS client kwargs and the assume-role params."""++ def _client(service_name, **client_kwargs):+ recorded["client_kwargs"] = client_kwargs+ sts = MagicMock()++ def _assume(**params):+ recorded["assume_role"] = params+ return {+ "Credentials": {+ "AccessKeyId": "ASIAASSUMED",+ "SecretAccessKey": "assumed-secret",+ "SessionToken": "assumed-token",+ "Expiration": datetime.now(timezone.utc) + timedelta(minutes=30),+ }+ }++ def _assume_web_identity(**params):+ recorded["assume_role_with_web_identity"] = params+ return {+ "Credentials": {+ "AccessKeyId": "ASIAWEBIDENTITY",+ "SecretAccessKey": "assumed-secret",+ "SessionToken": "assumed-token",+ "Expiration": datetime.now(timezone.utc) + timedelta(minutes=30),+ },+ "PackedPolicySize": 10,+ }++ sts.assume_role.side_effect = _assume+ sts.assume_role_with_web_identity.side_effect = _assume_web_identity+ return sts++ return _client+++def test_resolve_credentials_forwards_static_keys_role_session_and_external_id():+ """Every field the role-assumption route reads must reach STS, so a dropped struct field fails here."""+ from litellm.types.llms.bedrock import AwsAuthParams++ auth_params = AwsAuthParams(+ aws_access_key_id="AKIACALLER",+ aws_secret_access_key="caller-secret",+ aws_session_token="caller-token",+ aws_role_name="arn:aws:iam::123456789012:role/litellm-target",+ aws_session_name="litellm-session",+ aws_external_id="litellm-external-id",+ aws_sts_endpoint="https://custom-sts.example",++ aws_session_tags=[{"Key": "team", "Value": "genai"}, {"Key": "cost-center", "Value": "42"}],+ )+ recorded: Dict[str, Any] = {}++ with (+ patch.dict(os.environ, _os_environ_without_aws_keys(), clear=True),+ patch("boto3.client", side_effect=_recording_boto3_client(recorded)),+ ):+ credentials = BaseAWSLLM().resolve_credentials(auth_params, "us-east-1")++ assert recorded["client_kwargs"]["aws_access_key_id"] == "AKIACALLER"+ assert recorded["client_kwargs"]["aws_secret_access_key"] == "caller-secret"+ assert recorded["client_kwargs"]["aws_session_token"] == "caller-token"+ assert recorded["client_kwargs"]["endpoint_url"] == "https://custom-sts.example"+ assert recorded["assume_role"]["RoleArn"] == "arn:aws:iam::123456789012:role/litellm-target"+ assert recorded["assume_role"]["RoleSessionName"] == "litellm-session"+ assert recorded["assume_role"]["ExternalId"] == "litellm-external-id"++ assert recorded["assume_role"]["Tags"] == (++ {"Key": "cost-center", "Value": "42"},++ {"Key": "team", "Value": "genai"},++ )+ assert credentials.access_key == "ASIAASSUMED"++++ "malformed_tags",++ [++ "team=genai",++ {"team": "genai"},++ [{"key": "team", "value": "genai"}],++ [{"Key": "team"}],++ ],++)++def test_resolve_credentials_rejects_malformed_session_tags(malformed_tags):++ """A struct built from raw config must surface the friendly session-tag error before STS is called."""++ from litellm.types.llms.bedrock import AwsAuthParams++++ auth_params = AwsAuthParams(++ aws_role_name="arn:aws:iam::123456789012:role/litellm-target",++ aws_session_name="litellm-session",++ aws_session_tags=malformed_tags,++ )++ recorded: Dict[str, Any] = {}++++ with (++ patch.dict(os.environ, _os_environ_without_aws_keys(), clear=True),++ patch("boto3.client", side_effect=_recording_boto3_client(recorded)),++ ):++ with pytest.raises(ValueError, match="Invalid 'aws_session_tags' value"):++ BaseAWSLLM().resolve_credentials(auth_params, "us-east-1")++++ assert "assume_role" not in recorded+++++def test_resolve_credentials_forwards_web_identity_token():+ """A struct carrying a web-identity token must take the web-identity route, not plain role assumption."""+ from litellm.types.llms.bedrock import AwsAuthParams++ auth_params = AwsAuthParams(+ aws_web_identity_token="unresolvable-oidc-token",+ aws_role_name="arn:aws:iam::123456789012:role/litellm-wif",+ aws_session_name="litellm-wif-session",+ )+ recorded: Dict[str, Any] = {}++ with (+ patch.dict(os.environ, _os_environ_without_aws_keys(), clear=True),+ patch("boto3.client", side_effect=_recording_boto3_client(recorded)),+ ):+ with pytest.raises(AwsAuthError) as exc:+ BaseAWSLLM().resolve_credentials(auth_params, "us-east-1")++ assert exc.value.status_code == 401+ assert "assume_role" not in recorded+++def test_resolve_credentials_forwards_profile_name():+ """The profile route must receive the struct's profile name rather than the ambient session."""+ from litellm.types.llms.bedrock import AwsAuthParams++ auth_params = AwsAuthParams(aws_profile_name="litellm-qa-profile")+ session_instance = MagicMock()+ session_instance.get_credentials.return_value = Credentials(+ access_key="AKIAPROFILE", secret_key="profile-secret", token=None+ )++ with (+ patch.dict(os.environ, _os_environ_without_aws_keys(), clear=True),+ patch("boto3.Session", return_value=session_instance) as mock_session_cls,+ ):+ credentials = BaseAWSLLM().resolve_credentials(auth_params, "us-east-1")++ assert mock_session_cls.call_args.kwargs["profile_name"] == "litellm-qa-profile"+ assert credentials.access_key == "AKIAPROFILE"