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
fallbackModuleConfigsas ordered fallbackOrchestrationModuleConfigentries for locally built orchestration configurations- The provider sends the primary prompt module configuration first, followed by fallback entries in user-provided order
fallbackModuleConfigsare treated as Orchestration-only settings and are rejected when Foundation Models API is selected- When
orchestrationConfigRefis set,fallbackModuleConfigsare 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.inputandproviderOptions['sap-ai'].placeholderValuesnow use bare names such asgroundingRequest - SAP template syntax such as
{{?groundingRequest}}and{{?groundingOutput}}is kept only in prompt text
- Grounding
- fix(examples): Harden SAP API error parsing in content filtering and document grounding examples
- Malformed or non-JSON
APICallError.responseBodyno longer throws a secondary error from the example catch handler
- Malformed or non-JSON
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
fallbackModuleConfigsin settings, API-specific options, andorchestrationConfigRefignored-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
fallbackModuleConfigsas an Orchestration-only option - Added API-switching coverage for
fallbackModuleConfigsconflicts when switching from Orchestration to Foundation Models - Added runtime warning coverage for
fallbackModuleConfigsignored byorchestrationConfigRef
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/sandcastleto ^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 aiCompatibility: Node.js 20+, AI SDK 5.0+ / 6.0+
Full Changelog: v4.7.0...v4.7.1