Skip to content

v4.7.1 - Bug Fixes & Improvements

Latest

Choose a tag to compare

@jerome-benoit jerome-benoit released this 05 Jun 16:23
· 14 commits to main since this release
3cbdbbd

Release Date: 2026-06-05
Type: Patch - Bug Fixes & Improvements


Summary

Adds orchestration fallback module configuration support, aligns document grounding and content filtering examples with the SAP AI SDK 2.11 surface, corrects SAP SDK authentication architecture documentation, and includes dependency maintenance updates since v4.7.0.

Quality: 1285/1285 tests passing | All quality gates passed

Installation:

  • V3: npm install @jerome-benoit/sap-ai-provider@4.7.1
  • V2: npm install @jerome-benoit/sap-ai-provider-v2@4.7.1

Improvements

Orchestration Configuration

  • feat(orchestration): Support fallbackModuleConfigs as ordered fallback OrchestrationModuleConfig entries for locally built orchestration configurations
    • The provider sends the primary prompt module configuration first, followed by fallback entries in user-provided order
    • fallbackModuleConfigs are treated as Orchestration-only settings and are rejected when Foundation Models API is selected
    • When orchestrationConfigRef is set, fallbackModuleConfigs are ignored with the same warning flow as other local module settings because the stored configuration owns the module list

Bug Fixes

Examples

  • fix(examples): Align document grounding placeholders with SAP AI SDK semantics
    • Grounding placeholders.input and providerOptions['sap-ai'].placeholderValues now use bare names such as groundingRequest
    • SAP template syntax such as {{?groundingRequest}} and {{?groundingOutput}} is kept only in prompt text
  • fix(examples): Harden SAP API error parsing in content filtering and document grounding examples
    • Malformed or non-JSON APICallError.responseBody no longer throws a secondary error from the example catch handler

Documentation

  • fix(docs): Correct architecture documentation to reflect SAP AI SDK / SAP Cloud SDK credential discovery, token acquisition, token caching, and token refresh responsibilities
  • fix(docs): Replace unsafe empty-catch error parsing snippet with guarded SAP response-body parsing in the API reference

Documentation

  • Documented fallbackModuleConfigs in settings, API-specific options, and orchestrationConfigRef ignored-module behavior
  • Added a content filtering example entry and linked it from README / API reference
  • Documented Orchestration API file-part conversion behavior and Anthropic prompt-cache usage caveats
  • Refreshed document grounding snippets to use SAP AI SDK 2.11 placeholder naming consistently

Testing

  • Added validation coverage for fallbackModuleConfigs as an Orchestration-only option
  • Added API-switching coverage for fallbackModuleConfigs conflicts when switching from Orchestration to Foundation Models
  • Added runtime warning coverage for fallbackModuleConfigs ignored by orchestrationConfigRef

Dependency Updates

  • chore(deps): Update all non-major dependencies (#136, #137, #138)
  • chore(deps): Lock file maintenance (#139)
  • chore(sandcastle): Install Codex CLI in the sandcastle Docker image
  • chore(deps): Update @ai-hero/sandcastle to ^0.6.6 and drop patch-package

Quality Assurance

  • ✅ TypeScript strict mode: 0 errors
  • ✅ ESLint: 0 errors / 0 warnings
  • ✅ Tests: 1285/1285 passing (100%)
  • ✅ Build V3: ESM + CJS + DTS verified
  • ✅ Build V2: ESM + CJS + DTS verified
  • ✅ Node.js + Edge runtime tests passing

Installation

# V3 Package (LanguageModelV3/EmbeddingModelV3)
npm install @jerome-benoit/sap-ai-provider@^4.7.1 ai

# V2 Package (LanguageModelV2/EmbeddingModelV2)
npm install @jerome-benoit/sap-ai-provider-v2@^4.7.1 ai

Compatibility: Node.js 20+, AI SDK 5.0+ / 6.0+


Full Changelog: v4.7.0...v4.7.1