{"record":{"id":"d1be60610523637d","repo":"BerriAI/litellm","slug":"no-credentials-found-in-any-source","errorCode":null,"errorMessage":"No credentials found in any source","messagePattern":"No credentials found in any source","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/sap/credentials.py","lineNumber":178,"sourceCode":"\ndef extract_credentials(source: Source) -> dict[str, str]:\n    \"\"\"Extract all credentials from a source.\"\"\"\n    credentials: Final = {}\n    for cv in CREDENTIAL_VALUES:\n        value = source.get(cv)\n        if value is not None:\n            credentials[cv.name] = cv.transform_fn(value) if cv.transform_fn else value\n    return credentials\n\n\ndef resolve_credentials(sources: list[Source]) -> dict[str, str]:\n    \"\"\"Extract credentials from the first source that has any defined.\"\"\"\n    for source in sources:\n        credentials = extract_credentials(source)\n        if credentials:\n            verbose_logger.debug(\"Resolved SAP credentials from source %s\", source.name)\n            return credentials\n    raise ValueError(\"No credentials found in any source\")\n\n\ndef resolve_resource_group(sources: list[Source]) -> str | None:\n    \"\"\"Find resource_group from the first source that defines it.\"\"\"\n    rg_cred: Final = CredentialsValue(\"resource_group\", default=\"default\")\n    for source in sources:\n        value = source.get(rg_cred)\n        if value is not None:\n            verbose_logger.debug(\"Resolved GEN AI Hub resource_group from source %s\", source.name)\n            return value\n    return rg_cred.default\n\n\ndef _parse_service_key_once(\n    service_key: str | dict | None,\n) -> dict[str, Any] | None:\n    \"\"\"\n    Pre-parse service_key if it's a string to avoid repeated JSON parsing.","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/sap/credentials.py#L160-L196","documentation":"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.","triggerScenarios":"Triggered when no SAP AI Core credentials are found in any configured source.","commonSituations":"See trigger scenarios.","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."],"exampleFix":"export AICORE_CLIENT_ID=... AICORE_CLIENT_SECRET=... AICORE_AUTH_URL=... AICORE_BASE_URL=...","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}