mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
CredentialStore.get, TokenStore.get, and TokenStore.put returned bare values (T | None / None), so a store/DB outage could only surface as a raised exception across the seam, and a read could not distinguish 'not found' from 'backend down'. Change them to return Result[..., CredError]: Ok(None) is a genuine miss (-> 401/412 to start the dance), while Error(upstream_unavailable) is a store/DB outage (-> 503), per the plan's fail-closed-loud invariant. The resolver's api_key and authorization_code arms unwrap with isinstance and propagate the store error; a put failure on the refresh path also surfaces 503. Adds tests for the per-user and authorization_code store-error paths (31 tests, gates green). |
||
|---|---|---|
| .. | ||
| gateway | ||
| test_configs | ||
| conftest.py | ||
| mcp_server.py | ||
| test_aresponses_api_with_mcp.py | ||
| test_mcp_auth_header_extraction.py | ||
| test_mcp_auth_priority.py | ||
| test_mcp_chat_completions.py | ||
| test_mcp_client_unit.py | ||
| test_mcp_guardrails.py | ||
| test_mcp_hooks.py | ||
| test_mcp_litellm_client.py | ||
| test_mcp_logging.py | ||
| test_mcp_server.py | ||
| test_oauth2_mcp_config.yaml | ||
| test_openapi_spec_path_url.py | ||
| test_per_user_oauth_cache.py | ||
| test_proxy_mcp_e2e.py | ||
| test_semantic_tool_filter_e2e.py | ||