{"record":{"id":"396f3c9e2392a18b","repo":"BerriAI/litellm","slug":"unable-to-locate-profile-config-file-at-cfg-path","errorCode":null,"errorMessage":"Unable to locate profile config file at '{cfg_path}' in AICORE_HOME '{home}'","messagePattern":"Unable to locate profile config file at '(.+?)' in AICORE_HOME '(.+?)'","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"litellm/llms/sap/credentials.py","lineNumber":152,"sourceCode":"    home: Final = Path(_get_home())\n    profile = profile or os.environ.get(PROFILE_ENV_VAR)\n    cfg_env: Final = os.getenv(CONFIG_FILE_ENV_VAR)\n    cfg_path: Final = (\n        Path(cfg_env)\n        if cfg_env\n        else (home / (\"config.json\" if profile in (None, \"\", \"default\") else f\"config_{profile}.json\"))\n    )\n\n    if cfg_path and cfg_path.exists():\n        try:\n            with cfg_path.open(encoding=\"utf-8\") as f:\n                return json.load(f)\n        except json.JSONDecodeError:\n            raise KeyError(f\"{cfg_path} is not valid JSON. Please fix or remove it!\")\n\n    # If an explicit non-default profile was requested but not found, raise.\n    if cfg_env or (profile not in (None, \"\", \"default\")):\n        raise FileNotFoundError(f\"Unable to locate profile config file at '{cfg_path}' in AICORE_HOME '{home}'\")\n\n    return {}\n\n\ndef _env_name(name: str) -> str:\n    return f\"AICORE_{name.upper()}\"\n\n\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","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/sap/credentials.py#L134-L170","documentation":"SAP AI Core config resolution failed: neither the file at the derived cfg_path (from AICORE_CONFIG_FILE env or AICORE_HOME plus profile-specific name) nor any other source yielded a config, so the loader cannot proceed and reports the missing profile path.","triggerScenarios":"Triggered when the SAP profile config file is not found at cfg_path under AICORE_HOME.","commonSituations":"See trigger scenarios.","solutions":["Place the profile config file at the expected path or fix AICORE_HOME.","Set AICORE_HOME to the directory containing the config file."],"exampleFix":"export AICORE_HOME=/path/to/dir  # containing the profile config JSON","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-14T00:17:10.932Z"}