fix(ci): green the batch-create credential PR (schema, coverage, type budget)

Declaring the full AWS/S3 set on CredentialLiteLLMParams tripped three
non-source checks that the create-path fixes themselves did not cover.

Regenerate ui/litellm-dashboard/src/lib/http/schema.d.ts so the dashboard
types carry the ten new fields the proxy OpenAPI spec now exposes.

Add direct Router._resolve_unblocked_deployment tests so router_code_coverage.py
(an AST call-graph check that does not follow indirect calls) sees the helper
exercised by a router-named test.

Raise the reportUnknownArgumentType basedpyright baseline to 34619. The new
fields are synthesized as constructor kwargs on every GenericLiteLLMParams
subclass, so each of the ~114 `(**kwargs)` call sites across the SDK gains one
"argument type is unknown" per field; the increase is a mechanical cascade off
the pre-existing untyped-kwargs debt, not new untyped code. Slack is unchanged.

Drop the four AWS fields from clientside_credential_handler's kwargs_only_fields
list now that they are declared on CredentialLiteLLMParams; they stay covered
through the model_fields-derived typed_fields, so base-override stripping is
unchanged.
This commit is contained in:
Kent 2026-06-26 19:09:55 +08:00
parent 5a2b7ead30
commit 2dde300416
4 changed files with 89 additions and 5 deletions

View file

@ -132,7 +132,7 @@
"slack": 3
},
"reportUnknownArgumentType": {
"baseline": 30603,
"baseline": 34619,
"slack": 3000
},
"reportUnknownLambdaType": {

View file

@ -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

View file

@ -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.

View file

@ -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;