Coverage for .venv/lib/python3.13/site-packages/litellm/proxy/_experimental/mcp_server/outbound_credentials/__init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 12:01 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 12:01 +0000
1"""Typed upstream-credential resolution for MCP servers.
3This subpackage houses the typed credential vocabulary and the ``resolve_credentials``
4dispatch. A server declares one per-mode config from the ``AuthConfig`` discriminated union;
5``UpstreamCredentialProvider.resolve_credentials`` selects one arm and returns an ``httpx.Auth``
6or a typed ``CredError``. Failures are modeled as values via :mod:`.result` (``Result[T,
7CredError]``) rather than raised, so every seam is total. Nothing here is wired onto a live
8request path yet.
9"""
11from litellm.proxy._experimental.mcp_server.outbound_credentials.httpx_auth import (
12 NoOpAuth,
13 StaticHeaderAuth,
14)
15from litellm.proxy._experimental.mcp_server.outbound_credentials.resolver import (
16 UpstreamCredentialProvider,
17)
18from litellm.proxy._experimental.mcp_server.outbound_credentials.result import (
19 Error,
20 Ok,
21 Result,
22)
23from litellm.proxy._experimental.mcp_server.outbound_credentials.types import (
24 DEFAULT_CREDENTIAL_HEADER,
25 Ambient,
26 ApiKeyConfig,
27 ApiKeySource,
28 AssumeRole,
29 AuthConfig,
30 AuthorizationCodeConfig,
31 AuthSpecKind,
32 AwsCredentialSource,
33 AwsSigV4Config,
34 Byok,
35 ClientAuth,
36 ClientCredentialsConfig,
37 ClientSecretAuth,
38 CredError,
39 HeaderCarrier,
40 IdJagConfig,
41 NoneConfig,
42 PassthroughConfig,
43 PrivateKeyJwtAuth,
44 ServerSpec,
45 SharedKey,
46 StaticKeys,
47 Subject,
48 TokenExchangeConfig,
49 parse_auth_spec_kind,
50 validate_header_name,
51)
53__all__ = [
54 "DEFAULT_CREDENTIAL_HEADER",
55 "Ambient",
56 "ApiKeyConfig",
57 "ApiKeySource",
58 "AssumeRole",
59 "AuthConfig",
60 "AuthSpecKind",
61 "AuthorizationCodeConfig",
62 "AwsCredentialSource",
63 "AwsSigV4Config",
64 "Byok",
65 "ClientAuth",
66 "ClientCredentialsConfig",
67 "ClientSecretAuth",
68 "CredError",
69 "Error",
70 "HeaderCarrier",
71 "IdJagConfig",
72 "NoOpAuth",
73 "NoneConfig",
74 "Ok",
75 "PassthroughConfig",
76 "PrivateKeyJwtAuth",
77 "Result",
78 "ServerSpec",
79 "SharedKey",
80 "StaticHeaderAuth",
81 "StaticKeys",
82 "Subject",
83 "TokenExchangeConfig",
84 "UpstreamCredentialProvider",
85 "parse_auth_spec_kind",
86 "validate_header_name",
87]