Skip to content

v4.6.9 - Bug Fixes

Latest

Choose a tag to compare

@jerome-benoit jerome-benoit released this 03 May 16:31
· 68 commits to main since this release
a39faeb

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-start until real tool call ID is available (#103)
    • When Gemini-on-Vertex splits function.name and id across separate chunks, tool-input-start was emitted with placeholder tool_0 causing ID mismatch with subsequent tool-input-delta events
    • ToolCallInProgress.id is now string | undefined — no placeholder IDs
    • tool-input-start gates on both toolName AND id being non-empty strings
    • ID is immutable once set (first real value wins)
    • Buffered arguments replayed as tool-input-delta after deferred start emission
    • Fallback UUID generated in flush/finishReason paths when API never provides an ID
    • Extracted emitToolInputStart helper to prevent drift between 3 emission sites

Refactoring

Code Organization

  • refactor(tests): Use function overloads for getLastEmbedCallForApi

Internal

  • fix(lint): Suppress false-positive jsdoc/require-jsdoc on function overload implementation
  • fix(lint): Resolve all ESLint no-unnecessary-type-assertion errors
  • 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 ai

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


Full Changelog: v4.6.8...v4.6.9