Releases: SAP/cloud-sdk-python
Release list
v0.33.2 - July 09, 2026
Improvements
Internal cross-module SDK calls are now correctly attributed in usage metrics. When one module calls another under the hood (e.g. Agent Gateway resolving destinations, or Extensibility/Audit Log/Data Anonymization reading destination config), the emitted sap.cloud_sdk.source attribute is now set to the calling module instead of user-facing — so internal usage is no longer double-counted as direct customer activity.
Contributors
- Application Foundation Toolkit Libraries Team
v0.33.1 - July 07, 2026
Bug Fixes
Replaced opentelemetry-processor-baggage with built-in BaggageSpanProcessor that snapshots baggage override keys at on_start and re-applies them at on_end, after framework callbacks have run. opentelemetry-processor-baggage has been removed as a dependency. As a result, Traceloop no longer overrides keys such as gen_ai.conversation.id.
Contributors
v0.33.0 - July 06, 2026
What's New
DestinationClient.get_service_instance_id(): new method that reads the destination service instance ID from mounted secrets (/etc/secrets/appfnd/destination/default/instanceid) with env var fallback (CLOUD_SDK_CFG_DESTINATION_DEFAULT_INSTANCEID). Instrumented withOperation.DESTINATION_GET_SERVICE_INSTANCE_IDtelemetry.AgentGatewayClient.get_ias_client_id(): new method that returns the IAS client ID. Auto-detects agent type — Customer agents readclient_idfrom the mounted credentials file; LoB agents fetch thesap-managed-runtime-ias-{landscape}destination and return theclientIdproperty. Instrumented withOperation.AGENTGATEWAY_GET_IAS_CLIENT_IDtelemetry.ConsumptionOptions.skip_token_retrieval: new boolean field (defaultFalse). WhenTrue, passes$skipTokenRetrieval=trueto the Destination Service v2 API, skipping the OAuth2 token exchange and returning only destination configuration properties.
Contributors
v0.32.1 - July 06, 2026
Bug Fixes
-
mcp_tool_to_langchaintype coercion (agentgateway/converters.py): The Pydantic
args schema generated for LangChain tools now uses the correct Python type for each
field instead of hard-codingstrfor everything.Previously, every property in
input_schemawas mapped tostr(orstr | None),
regardless of its declared JSON Schema"type". This caused Pydantic to silently coerce
non-string LLM arguments — e.g.limit=10→"10",active=True→"True"—
before forwarding them tocall_tool. MCP servers expecting native JSON types then
rejected the call.The mapping is now:
JSON Schema type Python type "string"str"integer"int"number"float"boolean"bool"array"list"object"dictmissing / other AnyOptional fields (absent from
"required") are typed asT | Nonewith aNone
default, as before.
Contributors
v0.32.0 - June 30, 2026
What's New
-
Content filtering and Prompt Shield module (
sap_cloud_sdk.aicore.filtering): New subpackage that applies SAP AI Core Orchestration v2 content filtering to everysap/*LiteLLM model call. Filtering is enabled by default whenset_aicore_config()is called.New public types:
Severity— Azure Content Safety threshold enum (STRICT=0,LOW=2,MEDIUM=4,OFF=6).AzureContentFilter— configures per-category thresholds (hate,violence,sexual,self_harm) plus optionalprompt_shield(jailbreak + indirect-injection detection).LlamaGuard38bFilter— opt-in Llama Guard 3 8B filter with per-category boolean toggles.ContentFilter— abstract base for custom provider implementations.InputFiltering/OutputFiltering— direction-specific filter stacks.ContentFiltering— top-level configuration container passed toset_filtering().
New exception types:
ContentFilteredError— raised when a filter blocks input or output; exposesdirection("input"or"output"),details(severity scores), andrequest_id.OrchestrationError— base class for all orchestration-module errors.
-
set_filtering(config?)anddisable_filtering()(sap_cloud_sdk.aicore): New public functions to install or remove aContentFilteringconfiguration at runtime.set_filtering()with no argument re-applies env-var-driven defaults. -
completion()andacompletion()(sap_cloud_sdk.aicore): Thin sync/async wrappers aroundlitellm.completion/litellm.acompletionthat normalise input-filter rejections (HTTP 400) and output-filter rejections (finish_reason="content_filter") into a singleContentFilteredErrortype, so callers need only oneexceptclause. -
set_aicore_config()now auto-activates filtering: After loading credentials,set_aicore_config()automatically callsset_filtering()to install filtering atSeverity.MEDIUMon all categories with Prompt Shield enabled. SetAICORE_FILTER_ENABLED=falsebefore callingset_aicore_config()to opt out.
Contributors
v0.31.0 - June 29, 2026
What's New
-
ExtensibilityClient.call_hook_agw()(extensibility/client.py): New async method
that invokes extensibility hooks via the Agent Gateway MCP tool interface instead of
direct HTTP. Auth and endpoint resolution are handled internally — no manual URL or token
configuration is required.result = await client.call_hook_agw( hook=hook, user_token="my-user-token", message=my_message, tenant_subdomain="my-tenant", )
The method discovers the n8n
execute_workflowandget_executionMCP tools via AGW,
triggers the workflow, then polls every 500 ms until completion or timeout.
Improvements
-
Error hierarchy clarification (
extensibility/client.py):TransportErroris now
raised strictly for network-level failures (HTTP errors, response decode errors). All
workflow-level failures — terminal execution status, timeout, n8n JSON-RPC errors,
isErrorresults, and no-content responses — now consistently raiseExtensibilityError. -
extensibilityuser-guide (extensibility/user-guide.md): Updated with
call_hook_agw()reference, AGW usage example, and the updated exception hierarchy.
Contributors
v0.30.0 - June 29, 2026
What's New
-
A2A agent card discovery (
agentgatewaymodule): newAgentGatewayClient.list_agent_cards()method discovers A2A agents registered via BTP Destination Service fragments (labelagw.a2a.server) and fetches each agent's card from{fragment_url}/.well-known/agent-card.json. -
AgentCarddataclass: holds the full parsed JSON payload returned by the agent card endpoint (raw: dict). -
Agentdataclass: represents a discovered A2A agent withord_id: str(from the fragment'sordIdproperty) andagent_card: AgentCard. -
AgentCardFilterdataclass: optional filter forlist_agent_cards. Acceptsagent_names(matched against thenamefield in the fetched agent card JSON, applied post-fetch) andord_ids(extracted from the fragment URL, applied pre-fetch) — both default to empty lists (no filter). Filters are applied with AND semantics.
Improvements
_fragments.py(new internal module): centralises all BTP Destination Service fragment operations previously spread across_lob.py. Exportslist_mcp_fragments,list_a2a_fragments,get_ias_fragment_name,get_ias_user_fragment_name, and label constants (LABEL_KEY,MCP_LABEL_VALUE,IAS_LABEL_VALUE,IAS_USER_LABEL_VALUE,A2A_LABEL_VALUE).
Contributors
v0.29.1 - June 25, 2026
Bug Fixes
- Pass
tenantduring destination-based resolution — Fixed a bug where thetenantparameter was not requested and therefore not propagated toget_destination(), causing destination lookups to resolve against the wrong subaccount in multi-tenant setups. This affectsauditlog_ng.create_client()when using destination based resolution.
Contributors
v0.29.0 - June 24, 2026
What's New
omit_noneparameter onmcp_tool_to_langchain(sap_cloud_sdk.agentgateway.converters): New keyword-only boolean parameter (defaultTrue) that controls whether optional MCP tool parameters with aNonevalue are stripped before being forwarded tocall_tool. Setomit_none=Falseto forwardNonevalues explicitly to the MCP server.
Bug Fixes
mcp_tool_to_langchainoptional parameter leak (sap_cloud_sdk.agentgateway.converters): LangChain was forwardingNonefor every optional MCP tool parameter not supplied by the LLM. Optional fields in the generated Pydanticargs_schemaare now typed asstr | NonewithField(default=None), and therunclosure stripsNonevalues before callingcall_tool(whenomit_none=True).