BerriAI/litellm · error · ValueError
No credentials found in any source
Error message
No credentials found in any source
What it means
resolve_credentials iterated every credential Source (file config, env vars, etc.) and none contained any of the known AICORE_* credential keys, so there is nothing to authenticate the SAP AI Core client with.
Source
Thrown at litellm/llms/sap/credentials.py:178
def extract_credentials(source: Source) -> dict[str, str]:
"""Extract all credentials from a source."""
credentials: Final = {}
for cv in CREDENTIAL_VALUES:
value = source.get(cv)
if value is not None:
credentials[cv.name] = cv.transform_fn(value) if cv.transform_fn else value
return credentials
def resolve_credentials(sources: list[Source]) -> dict[str, str]:
"""Extract credentials from the first source that has any defined."""
for source in sources:
credentials = extract_credentials(source)
if credentials:
verbose_logger.debug("Resolved SAP credentials from source %s", source.name)
return credentials
raise ValueError("No credentials found in any source")
def resolve_resource_group(sources: list[Source]) -> str | None:
"""Find resource_group from the first source that defines it."""
rg_cred: Final = CredentialsValue("resource_group", default="default")
for source in sources:
value = source.get(rg_cred)
if value is not None:
verbose_logger.debug("Resolved GEN AI Hub resource_group from source %s", source.name)
return value
return rg_cred.default
def _parse_service_key_once(
service_key: str | dict | None,
) -> dict[str, Any] | None:
"""
Pre-parse service_key if it's a string to avoid repeated JSON parsing.View on GitHub (pinned to 77b7c6c40c)
Solutions
- Provide SAP AI Core credentials via environment variables or a config file.
- Set AICORE_CLIENT_ID, AICORE_CLIENT_SECRET, AICORE_AUTH_URL, AICORE_BASE_URL.
Example fix
export AICORE_CLIENT_ID=... AICORE_CLIENT_SECRET=... AICORE_AUTH_URL=... AICORE_BASE_URL=...
Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered when no SAP AI Core credentials are found in any configured source.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/d1be60610523637d.
Report an issue: GitHub.