diff --git a/basedpyright-code-budget.json b/basedpyright-code-budget.json index 1af0148e452..a00b628863b 100644 --- a/basedpyright-code-budget.json +++ b/basedpyright-code-budget.json @@ -132,7 +132,7 @@ "slack": 3 }, "reportUnknownArgumentType": { - "baseline": 30603, + "baseline": 34619, "slack": 3000 }, "reportUnknownLambdaType": { diff --git a/litellm/router_utils/clientside_credential_handler.py b/litellm/router_utils/clientside_credential_handler.py index 45ade81b2dd..53c3af9f0fe 100644 --- a/litellm/router_utils/clientside_credential_handler.py +++ b/litellm/router_utils/clientside_credential_handler.py @@ -42,10 +42,6 @@ def _admin_config_fields_to_clear_on_base_override() -> List[str]: "api_type", "azure_ad_token", "azure_ad_token_provider", - "aws_session_token", - "aws_sts_endpoint", - "aws_web_identity_token", - "aws_role_name", # OCI provider — consumed by litellm/llms/oci/* via optional_params # and not declared on CredentialLiteLLMParams. Without these here, # an admin's OCI signing key / tenancy / fingerprint would flow diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.py index 15c2610b57e..d6026ecc3ae 100644 --- a/tests/test_litellm/test_router.py +++ b/tests/test_litellm/test_router.py @@ -5148,6 +5148,54 @@ def test_is_deployment_blocked_static_helper_reflects_blocked_flag(): ) +def test_resolve_unblocked_deployment_resolves_alias_id_and_wildcard(): + """ + _resolve_unblocked_deployment underpins both the credential resolver and the + batch-create alias swap, so it must resolve a deployment by model-group + alias, by deployment id, and by wildcard pattern, returning a Deployment + whose litellm_params carry the real provider model. + """ + router = litellm.Router( + model_list=[ + { + "model_name": "bedrock-batch-haiku", + "litellm_params": { + "model": "bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0" + }, + "model_info": {"id": "bedrock-batch-dep-0"}, + }, + { + "model_name": "openai/*", + "litellm_params": {"model": "openai/*"}, + }, + ] + ) + + by_alias = router._resolve_unblocked_deployment(model_id="bedrock-batch-haiku") + assert by_alias is not None + assert ( + by_alias.litellm_params.model + == "bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0" + ) + + by_id = router._resolve_unblocked_deployment(model_id="bedrock-batch-dep-0") + assert by_id is not None + assert by_id.model_info.id == "bedrock-batch-dep-0" + + by_wildcard = router._resolve_unblocked_deployment(model_id="openai/gpt-4o") + assert by_wildcard is not None + assert by_wildcard.litellm_params.model == "openai/gpt-4o" + + +def test_resolve_unblocked_deployment_returns_none_for_unknown_and_blocked(): + router = _router_with_two_deployments([True, False]) + assert router._resolve_unblocked_deployment(model_id="missing") is None + assert router._resolve_unblocked_deployment(model_id="dep-0") is None + unblocked = router._resolve_unblocked_deployment(model_id="dep-1") + assert unblocked is not None + assert unblocked.model_info.id == "dep-1" + + class TestRouterRequestTimeoutPropagation: """litellm_settings.request_timeout must act as an independent per-attempt timeout. diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index b53acf930f2..55ab27beb2f 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -25205,14 +25205,30 @@ export interface components { auto_router_embedding_model?: string | null; /** Aws Access Key Id */ aws_access_key_id?: string | null; + /** Aws Batch Role Arn */ + aws_batch_role_arn?: string | null; /** Aws Bedrock Project Id */ aws_bedrock_project_id?: string | null; /** Aws Bedrock Runtime Endpoint */ aws_bedrock_runtime_endpoint?: string | null; + /** Aws External Id */ + aws_external_id?: string | null; + /** Aws Profile Name */ + aws_profile_name?: string | null; /** Aws Region Name */ aws_region_name?: string | null; + /** Aws Role Name */ + aws_role_name?: string | null; /** Aws Secret Access Key */ aws_secret_access_key?: string | null; + /** Aws Session Name */ + aws_session_name?: string | null; + /** Aws Session Token */ + aws_session_token?: string | null; + /** Aws Sts Endpoint */ + aws_sts_endpoint?: string | null; + /** Aws Web Identity Token */ + aws_web_identity_token?: string | null; /** Azure Ad Token */ azure_ad_token?: string | null; /** Budget Duration */ @@ -25410,6 +25426,10 @@ export interface components { s3_bucket_name?: string | null; /** S3 Encryption Key Id */ s3_encryption_key_id?: string | null; + /** S3 Output Bucket Name */ + s3_output_bucket_name?: string | null; + /** S3 Region Name */ + s3_region_name?: string | null; /** Search Context Cost Per Query */ search_context_cost_per_query?: { [key: string]: unknown; @@ -32913,14 +32933,30 @@ export interface components { auto_router_embedding_model?: string | null; /** Aws Access Key Id */ aws_access_key_id?: string | null; + /** Aws Batch Role Arn */ + aws_batch_role_arn?: string | null; /** Aws Bedrock Project Id */ aws_bedrock_project_id?: string | null; /** Aws Bedrock Runtime Endpoint */ aws_bedrock_runtime_endpoint?: string | null; + /** Aws External Id */ + aws_external_id?: string | null; + /** Aws Profile Name */ + aws_profile_name?: string | null; /** Aws Region Name */ aws_region_name?: string | null; + /** Aws Role Name */ + aws_role_name?: string | null; /** Aws Secret Access Key */ aws_secret_access_key?: string | null; + /** Aws Session Name */ + aws_session_name?: string | null; + /** Aws Session Token */ + aws_session_token?: string | null; + /** Aws Sts Endpoint */ + aws_sts_endpoint?: string | null; + /** Aws Web Identity Token */ + aws_web_identity_token?: string | null; /** Azure Ad Token */ azure_ad_token?: string | null; /** Budget Duration */ @@ -33118,6 +33154,10 @@ export interface components { s3_bucket_name?: string | null; /** S3 Encryption Key Id */ s3_encryption_key_id?: string | null; + /** S3 Output Bucket Name */ + s3_output_bucket_name?: string | null; + /** S3 Region Name */ + s3_region_name?: string | null; /** Search Context Cost Per Query */ search_context_cost_per_query?: { [key: string]: unknown;