Release Date: 2026-05-03
Type: Patch - Bug Fixes
Summary
Fix streaming tool call ID mismatch on Gemini-on-Vertex where tool-input-start was emitted with a placeholder ID before the real ID arrived, violating the Vercel AI SDK v3 stream contract.
Quality: 1128/1128 tests passing | All quality gates passed
Installation:
- V3:
npm install @jerome-benoit/sap-ai-provider@4.6.9 - V2:
npm install @jerome-benoit/sap-ai-provider-v2@4.6.9
Bug Fixes
Streaming
- fix(streaming): Defer
tool-input-startuntil real tool call ID is available (#103)- When Gemini-on-Vertex splits
function.nameandidacross separate chunks,tool-input-startwas emitted with placeholdertool_0causing ID mismatch with subsequenttool-input-deltaevents ToolCallInProgress.idis nowstring | undefined— no placeholder IDstool-input-startgates on bothtoolNameANDidbeing non-empty strings- ID is immutable once set (first real value wins)
- Buffered arguments replayed as
tool-input-deltaafter deferred start emission - Fallback UUID generated in flush/finishReason paths when API never provides an ID
- Extracted
emitToolInputStarthelper to prevent drift between 3 emission sites
- When Gemini-on-Vertex splits
Refactoring
Code Organization
- refactor(tests): Use function overloads for
getLastEmbedCallForApi
Internal
- fix(lint): Suppress false-positive
jsdoc/require-jsdocon function overload implementation - fix(lint): Resolve all ESLint
no-unnecessary-type-assertionerrors - chore: Update openspec skills and add package-lock.json to
.opencode/.gitignore - chore: Replace agent instruction indirections with symlinks to canonical source
- chore: Update package-lock.json (uuid 11.1.0 → 11.1.1)
- chore(docs): Remove stale DEBUG env var reference and update openspec source structure
- docs: Harmonize agent instructions with actual project state
- docs: Remove redundant SAP SDKs line in openspec config
Dependency Updates
- fix(deps): Update dependency zod to ^4.4.2 (#102)
- fix(deps): Update all non-major dependencies (#101)
- fix(deps): Update all non-major dependencies (#100)
- fix(deps): Update all non-major dependencies (#95)
- chore(deps): Update all non-major dependencies (#98)
- chore(deps): Update dependency typescript-eslint to ^8.59.0 (#97)
- chore(deps): Lock file maintenance (#99)
- chore(deps): Lock file maintenance (#96)
- chore(deps): Update all non-major dependencies (#94)
- chore(deps): Update dependency typescript-eslint to ^8.58.2 (#92)
- chore(deps): Lock file maintenance (#91)
- chore(deps): Update all non-major dependencies (#90)
- chore(deps): Update all non-major dependencies (#89)
- chore(deps): Update all non-major dependencies (#88)
Quality Assurance
- ✅ TypeScript strict mode: 0 errors
- ✅ ESLint: 0 errors, 0 warnings
- ✅ Tests: 1128/1128 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.6.9 ai
# V2 Package (LanguageModelV2/EmbeddingModelV2)
npm install @jerome-benoit/sap-ai-provider-v2@^4.6.9 aiCompatibility: Node.js 20+, AI SDK 5.0+ / 6.0+
Full Changelog: v4.6.8...v4.6.9