{"id":22333,"library":"sap-ai-sdk-core","title":"SAP AI SDK Core","description":"Core library for the SAP Cloud SDK for AI (Python), providing client and base classes for interacting with SAP AI Core services. Current version: 3.3.0, requires Python >=3.9. Released approximately quarterly.","status":"active","version":"3.3.0","language":"python","source_language":"en","source_url":"https://github.com/SAP/ai-sdk-python","tags":["sap","ai","core","cloud-sdk","ai-core"],"install":[{"cmd":"pip install sap-ai-sdk-core","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"Correct module path uses underscores: sap_ai_sdk_core","wrong":"from sap.ai.sdk.core import AICoreClient","symbol":"AICoreClient","correct":"from sap_ai_sdk_core import AICoreClient"},{"note":"","wrong":"","symbol":"AIAPIVersion","correct":"from sap_ai_sdk_core import AIAPIVersion"}],"quickstart":{"code":"import os\nfrom sap_ai_sdk_core import AICoreClient, AIAPIVersion\n\nclient = AICoreClient(\n    base_url=os.environ.get(\"AI_CORE_BASE_URL\", \"\"),\n    auth_url=os.environ.get(\"AI_CORE_AUTH_URL\", \"\"),\n    client_id=os.environ.get(\"AI_CORE_CLIENT_ID\", \"\"),\n    client_secret=os.environ.get(\"AI_CORE_CLIENT_SECRET\", \"\"),\n    resource_group=os.environ.get(\"AI_CORE_RESOURCE_GROUP\", \"default\"),\n    api_version=AIAPIVersion.V4\n)\nprint(\"Client created\")","lang":"python","description":"Initializes the AICoreClient using environment variables for authentication and default API version V4."},"warnings":[{"fix":"Update instantiation: pass `base_url` (required) and remove old `ai_core_url`.","message":"In version 2.x, the client was instantiated directly with credentials. In 3.x, the constructor parameters changed: `base_url` is now required instead of `ai_core_url`.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use `AIAPIVersion.V4` as the default API version.","message":"The `AICoreClient` constructor parameter `api_version` with `AIAPIVersion.V3` is deprecated and will be removed in a future release.","severity":"deprecated","affected_versions":"<4.0.0"},{"fix":"Always set `resource_group` to an existing resource group from your AI Core instance (e.g., `os.environ.get(\"AICORE_RESOURCE_GROUP\", \"default\")`).","message":"The `resource_group` parameter defaults to `\"default\"` which may not be valid for all SAP AI Core instances. Not providing a valid resource group leads to 403 errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install: pip install sap-ai-sdk-core; then import: from sap_ai_sdk_core import AICoreClient","cause":"Using wrong import path (e.g., 'sap.ai.sdk.core') or not having the package installed.","error":"ModuleNotFoundError: No module named 'sap_ai_sdk_core'"},{"fix":"Add base_url parameter: AICoreClient(base_url='https://...', auth_url=..., ...)","cause":"Using old initialization pattern from version 2.x without providing required `base_url`.","error":"TypeError: __init__() missing 1 required positional argument: 'base_url'"},{"fix":"Set the resource_group parameter to an existing resource group (e.g., from environment variable AICORE_RESOURCE_GROUP).","cause":"Missing or invalid resource group; the default 'default' may not exist.","error":"sap_ai_sdk_core.exceptions.AIClientError: (403) Forbidden"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}