mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(anthropic/wif): treat empty identity-source fields as unset
This commit is contained in:
parent
216da96882
commit
2cd0c2ce9f
2 changed files with 2 additions and 2 deletions
|
|
@ -160,7 +160,7 @@ def _resolve_identity_source(
|
|||
legacy_ref: Final = _resolve_assertion_ref(litellm_params)
|
||||
return (legacy_ref, None) if legacy_ref is not None else None
|
||||
params: Final[Mapping[str, object]] = MappingProxyType(
|
||||
{key: value for key, value in (litellm_params or _EMPTY_PARAMS).items() if value is not None}
|
||||
{key: value for key, value in (litellm_params or _EMPTY_PARAMS).items() if value not in (None, "")}
|
||||
)
|
||||
match source_kind:
|
||||
case AnthropicIdentitySourceKind.internal_issuer.value:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ def _claims(config: InternalIssuerSource, issued_at: int) -> Mapping[str, object
|
|||
("exp", issued_at + config.ttl_seconds),
|
||||
("jti", str(uuid.uuid4())),
|
||||
)
|
||||
if value is not None
|
||||
if value not in (None, "")
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue