Skip to content

Releases: SAP/cloud-sdk-python

v0.43.2 - August 12, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 13 Aug 00:31
fd22fec

What's changed

  • sap.cld.subaccount_id renamed to sap.cloud.provider.subaccount_id: The OTel resource attribute key emitted by the SDK has been updated to follow the canonical SAP cloud attribute naming convention.

Contributors

v0.43.1 - August 12, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 13 Aug 00:29
fd22fec

Bug Fixes

  • AuthToken now surfaces Destination Service error messages: When the Destination Service returns an auth token with a non-empty error field (e.g. "No consumed apis matching provided resource parameter found."), AuthToken.from_dict now raises DestinationOperationError with the exact service-provided message. Previously, such tokens caused a generic "Empty auth header" error in the Agent Gateway LoB flow with no indication of the root cause.
  • AuthToken.from_dict validates error-carrying tokens correctly: Tokens containing an error field alongside empty type/value/http_header are now parsed and fail with a descriptive message (auth token retrieval failed: <error>) instead of the generic missing-fields error.

Contributors

v0.43.0 - August 10, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 10 Aug 18:01
5057100

Breaking Changes

⚠️ Important: This section is critical for users upgrading from previous versions

  • [Breaking Change] APPFND_UMS_DESTINATION_NAME removed: The environment variable APPFND_UMS_DESTINATION_NAME is no longer supported. To override the destination name, use ExtensibilityConfig(destination_name="..."). For automatic resolution, set both APPFND_CONHOS_LANDSCAPE and APPFND_CONHOS_UMS_URL.
  • [Breaking Change] Destination prefix renamed: The auto-constructed UMS destination name changed from sap-managed-runtime-ums-{APPFND_CONHOS_LANDSCAPE} to sap-managed-runtime-ias-{APPFND_CONHOS_LANDSCAPE}. Deployments must have the IAS-prefixed destination available in the Destination Service.
  • [Breaking Change] APPFND_CONHOS_UMS_URL is now required: The UMS base URL is no longer read from the destination's url field. Set APPFND_CONHOS_UMS_URL to the UMS endpoint URL; a TransportError is raised if it is absent.

Improvements

  • UmsTransport.get_extension_capability_implementation now calls get_destination with ConsumptionOptions(skip_token_retrieval=True), avoiding unnecessary token retrieval since only the mTLS certificate is needed from the destination.
  • Destination-name resolution failure is now deferred to fetch time (get_extension_capability_implementation) rather than raised at UmsTransport construction, allowing the object to be created before environment variables are fully configured.
  • Clearer error messages guide users to set both APPFND_CONHOS_LANDSCAPE and APPFND_CONHOS_UMS_URL when automatic destination resolution fails.

Contributors

v0.42.0 - August 07, 2026

Choose a tag to compare

@LucasAlvesSoares LucasAlvesSoares released this 07 Aug 23:28
4976cc6

What's New

  • bootstrap now includes telemetry automatically: calling bootstrap(app) is all you need.

    from sap_cloud_sdk import bootstrap, TelemetryConfig
    
    bootstrap(app)
    bootstrap(app, telemetry=TelemetryConfig(disable_batch=True))

Contributors

v0.41.0 - August 07, 2026

Choose a tag to compare

@jplbrun jplbrun released this 07 Aug 16:27
5fc7b9f

What's New

  • MCP tool filtering on list_mcp_tools: the Agent Gateway client now accepts an optional MCPToolFilter to narrow discovered MCP tools by tool name and/or ORD ID:

    ord_ids is applied before fetching — non-matching MCP servers are skipped without a network round-trip — while names is applied after fetching, since tool names are only known once each server has been queried. Both fields are optional and combined with AND semantics; an empty or omitted filter returns all tools. Supported for both LoB and customer agent flows.

Improvements

  • Consistent filter handling across Agent Gateway discovery: the internal list_agent_cards / AgentCardFilter flow was aligned with the new pattern so both public discovery methods accept a filter object directly. No change to the public list_agent_cards API.

Contributors

  • Application Foundation Toolkit Libraries Team

v0.40.1 - August 07, 2026

Choose a tag to compare

@ArthurTonial ArthurTonial released this 07 Aug 16:06
eb55c6e

Dependency Updates

  • Upgraded OpenTelemetry core (opentelemetry-api, opentelemetry-sdk, exporters) from 1.42.1 to 1.43.0.
  • Upgraded all OpenTelemetry instrumentation packages from 0.63b1 to 0.64b0 (httpx, requests, grpc, logging, starlette, fastapi, aiohttp-client, sqlalchemy, django, flask).
  • Upgraded setuptools constraint from ~=80.9.0 to >=83.0, resolving to 83.0.0.
  • Upgraded protobuf minimum from >=4.25.0 to >=7.0.0.
  • Upgraded pyasn1 (transitive, via uv.lock).

v0.40.0 - August 04, 2026

Choose a tag to compare

@betinacosta betinacosta released this 04 Aug 16:52
47bc4e3

What's New

  • sap_cloud_sdk.outputmanagement module — New service integration for the SAP Output Management Service (OMS). Import via from sap_cloud_sdk.outputmanagement import create_client.
  • create_client() factory function — Builds an OutputManagementClient from environment variables (CLOUD_SDK_OMS_DESTINATION_NAME, CLOUD_SDK_OMS_ACCESS_STRATEGY, CLOUD_SDK_OMS_INSTANCE) or explicit parameters.
  • OutputManagementClient — Unified client with four operations:
    • send_email(notification_template_key, to, business_document, ...) — send an email via OMS
    • send_email_with_mcp(tool_name, ..., mcp_tool) — async send via MCP tool integration with distributed traceparent header
    • create_output_request(...) — build an OutputRequest object (CloudEvents structure) without sending
    • send_output_request(output_request) — submit a pre-built OutputRequest
  • DestinationCredentialConfig — Pydantic model for BTP Destination-based access, supporting PROVIDER_ONLY and SUBSCRIBER_ONLY access strategies.
  • Data models: OutputRequest, OutputRequestBuilder, OutputResponse, EmailConfiguration, AttachmentConfig, OutputManagementInfo, OutputRequestData, DirectShareConfiguration, FormConfiguration, PreGeneratedAttachment.
  • Enums: FileFormat, Channel (e.g. Channel.INTERNAL_EMAIL).
  • Exception hierarchy: OutputManagementException, AuthenticationException, ValidationException, NetworkException, DestinationNotFoundException, DestinationAccessException.
  • Full OpenTelemetry telemetry wired for all four client operations.
  • User guide at src/sap_cloud_sdk/outputmanagement/user-guide.md.

Contributors

@Venkatakrishnan774

v0.39.1 - August 03, 2026

Choose a tag to compare

@cassiofariasmachado cassiofariasmachado released this 03 Aug 13:22
a558a8e

Bug Fixes

  • Agent Gateway: get_mcp_tools_customer now returns an empty list instead of raising AgentGatewaySDKError when integrationDependencies is empty in CustomerCredentials, consistent with the LOB path.
  • Agent Gateway: MCP server errors are now logged with richer detail — HTTP errors include the status code and response body (up to 500 chars), and ExceptionGroup instances from anyio are unwrapped so each inner exception is logged individually. Applies to both _customer.py and _lob.py.
  • Agent Gateway: call_mcp_tool_customer and call_mcp_tool_lob now log an error when a tool invocation returns isError=True.
  • Agent Gateway: Fixed streamable_http_client unpacking to use *_ instead of _, resolving a compatibility issue with newer MCP SDK versions that return more than three values.

Contributors

v0.39.0 - Jul 24, 2026

Choose a tag to compare

@LucasAlvesSoares LucasAlvesSoares released this 24 Jul 11:36
49611c7

What's New

  • bootstrap(app) — new SDK entry point: call once at app startup to wire the SDK runtime context into your framework. Automatically detects Starlette/FastAPI and registers context middleware.
  • sap_cloud_sdk.core.runtime_context — new module: provider-agnostic runtime context system. Any SDK module calls get_context() to read caller-identity information without coupling to a specific auth provider or framework.
  • IASContextProvider: extracts TENANT_ID (app_tid), GLOBAL_TENANT_ID (sap_gtid), and USER_ID (user_uuid) from the IAS JWT Authorization header.
  • SAPTriggerContextProvider: extracts TRIGGER_TYPE from the x-sap-origin header.
  • DWCContextProvider: extracts DWC_SUBDOMAIN and DWC_TENANT from dwc-subdomain / dwc-tenant headers.
  • AuditClient.send() auto back-fill updated: now reads from the new RuntimeContext first, falling back to the legacy IAS auth context for apps not yet using bootstrap().
  • Library instrumentation: auto_instrument() now automatically instruments any supported HTTP client, web framework, or data library already installed in the service — no extra configuration needed. Supported libraries: httpx, requests, grpcio, starlette, fastapi, aiohttp, django, flask, sqlalchemy, redis, and stdlib logging (for log-trace correlation). Pass app=app from a lifespan handler for already-constructed Starlette/FastAPI apps.

Contributors

v0.38.0 - Jul 22, 2026

Choose a tag to compare

@tiagoek tiagoek released this 22 Jul 15:05
f30b648

What's New

  • Auto-inject tenant and user into audit log events: `AuditClient.send()` now reads the IAS claims from the current async context (set by `StarletteIASTelemetryMiddleware`) and automatically back-fills `common.tenant_id` (from `app_tid`), `common.user_initiator_id` (from `user_uuid`), and `common.timestamp` (to UTC now if not set) — callers no longer need to set these fields manually when using the middleware.
  • `ias/_context.py` — new module with a `ContextVar`-backed `set_auth_context` / `get_auth_context` API to store and retrieve IAS claims for the current request lifecycle. Exported from `sap_cloud_sdk.ias`.
  • `StarletteIASTelemetryMiddleware` refactored: unified `_parse_request()` helper eliminates the double token-parse and ensures the `x-sap-origin` header is always captured regardless of whether IAS claims parsing succeeds.

Contributors