Skip to content

Releases: SAP/cloud-sdk-python

v0.33.2 - July 09, 2026

Choose a tag to compare

@jplbrun jplbrun released this 09 Jul 14:41
05be4e4

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

Choose a tag to compare

@LucasAlvesSoares LucasAlvesSoares released this 07 Jul 20:59
c232dc0

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

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 06 Jul 16:07
d19427f

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 with Operation.DESTINATION_GET_SERVICE_INSTANCE_ID telemetry.
  • AgentGatewayClient.get_ias_client_id(): new method that returns the IAS client ID. Auto-detects agent type — Customer agents read client_id from the mounted credentials file; LoB agents fetch the sap-managed-runtime-ias-{landscape} destination and return the clientId property. Instrumented with Operation.AGENTGATEWAY_GET_IAS_CLIENT_ID telemetry.
  • ConsumptionOptions.skip_token_retrieval: new boolean field (default False). When True, passes $skipTokenRetrieval=true to the Destination Service v2 API, skipping the OAuth2 token exchange and returning only destination configuration properties.

Contributors

@NicoleMGomes

v0.32.1 - July 06, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 06 Jul 12:10
2b64465

Bug Fixes

  • mcp_tool_to_langchain type coercion (agentgateway/converters.py): The Pydantic
    args schema generated for LangChain tools now uses the correct Python type for each
    field instead of hard-coding str for everything.

    Previously, every property in input_schema was mapped to str (or str | 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 to call_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" dict
    missing / other Any

    Optional fields (absent from "required") are typed as T | None with a None
    default, as before.

Contributors

v0.32.0 - June 30, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 30 Jun 17:52
6c042e1

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 every sap/* LiteLLM model call. Filtering is enabled by default when set_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 optional prompt_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 to set_filtering().

    New exception types:

    • ContentFilteredError — raised when a filter blocks input or output; exposes direction ("input" or "output"), details (severity scores), and request_id.
    • OrchestrationError — base class for all orchestration-module errors.
  • set_filtering(config?) and disable_filtering() (sap_cloud_sdk.aicore): New public functions to install or remove a ContentFiltering configuration at runtime. set_filtering() with no argument re-applies env-var-driven defaults.

  • completion() and acompletion() (sap_cloud_sdk.aicore): Thin sync/async wrappers around litellm.completion / litellm.acompletion that normalise input-filter rejections (HTTP 400) and output-filter rejections (finish_reason="content_filter") into a single ContentFilteredError type, so callers need only one except clause.

  • set_aicore_config() now auto-activates filtering: After loading credentials, set_aicore_config() automatically calls set_filtering() to install filtering at Severity.MEDIUM on all categories with Prompt Shield enabled. Set AICORE_FILTER_ENABLED=false before calling set_aicore_config() to opt out.

Contributors

v0.31.0 - June 29, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 29 Jun 13:52
2a20efb

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_workflow and get_execution MCP tools via AGW,
    triggers the workflow, then polls every 500 ms until completion or timeout.

Improvements

  • Error hierarchy clarification (extensibility/client.py): TransportError is now
    raised strictly for network-level failures (HTTP errors, response decode errors). All
    workflow-level failures — terminal execution status, timeout, n8n JSON-RPC errors,
    isError results, and no-content responses — now consistently raise ExtensibilityError.

  • extensibility user-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

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 29 Jun 12:53
2c8f6ae

What's New

  • A2A agent card discovery (agentgateway module): new AgentGatewayClient.list_agent_cards() method discovers A2A agents registered via BTP Destination Service fragments (label agw.a2a.server) and fetches each agent's card from {fragment_url}/.well-known/agent-card.json.

  • AgentCard dataclass: holds the full parsed JSON payload returned by the agent card endpoint (raw: dict).

  • Agent dataclass: represents a discovered A2A agent with ord_id: str (from the fragment's ordId property) and agent_card: AgentCard.

  • AgentCardFilter dataclass: optional filter for list_agent_cards. Accepts agent_names (matched against the name field in the fetched agent card JSON, applied post-fetch) and ord_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. Exports list_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

Choose a tag to compare

@betinacosta betinacosta released this 25 Jun 19:47
5249611

Bug Fixes

  • Pass tenant during destination-based resolution — Fixed a bug where the tenant parameter was not requested and therefore not propagated to get_destination(), causing destination lookups to resolve against the wrong subaccount in multi-tenant setups. This affects auditlog_ng.create_client() when using destination based resolution.

Contributors

@betinacosta

v0.29.0 - June 24, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 24 Jun 11:41
101492b

What's New

  • omit_none parameter on mcp_tool_to_langchain (sap_cloud_sdk.agentgateway.converters): New keyword-only boolean parameter (default True) that controls whether optional MCP tool parameters with a None value are stripped before being forwarded to call_tool. Set omit_none=False to forward None values explicitly to the MCP server.

Bug Fixes

  • mcp_tool_to_langchain optional parameter leak (sap_cloud_sdk.agentgateway.converters): LangChain was forwarding None for every optional MCP tool parameter not supplied by the LLM. Optional fields in the generated Pydantic args_schema are now typed as str | None with Field(default=None), and the run closure strips None values before calling call_tool (when omit_none=True).

Contributors

@NicoleMGomes

v0.28.1 - June 23, 2026

Choose a tag to compare

@NicoleMGomes NicoleMGomes released this 24 Jun 11:23
1c3d4be

Improvements

  • Dependency updates since v0.28.0:
    • Bump pydantic-settings from 2.14.1 to 2.14.2 (#176)
    • Bump cryptography from 46.0.7 to 48.0.1 (#166)
    • Bump langsmith from 0.8.3 to 0.8.18 (#175)

Contributors

  • Application Foundation Toolkit Libraries Team