Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
c9a590a
refactor(tests): consolidate repetitive test patterns with it.each()
jerome-benoit Jan 10, 2026
7d53f3b
docs: harmonize JSDoc comments and add missing @internal tags
jerome-benoit Jan 10, 2026
37625b0
feat: enhance developer experience with validation and improved error…
jerome-benoit Jan 10, 2026
6351572
docs: harmonize comments for consistency and clarity
jerome-benoit Jan 10, 2026
c6098ce
fix: tighten streaming tool-call gating
jerome-benoit Jan 10, 2026
e7c7121
docs: harmonize comments for consistency
jerome-benoit Jan 10, 2026
a83c266
docs: harmonize terminology and enhance API documentation
jerome-benoit Jan 10, 2026
1a83000
Merge remote-tracking branch 'origin/update-dependencies'
jerome-benoit Jan 12, 2026
10aed79
Merge branch 'fix/convert-errors-to-vercel-ai-sdk-format'
jerome-benoit Jan 12, 2026
cdae611
chore: remove CHANGELOG.md
jerome-benoit Jan 12, 2026
9b3de74
docs: align documentation with SAP AI SDK implementation
jerome-benoit Jan 12, 2026
a676853
docs: fix remaining incorrect API references
jerome-benoit Jan 12, 2026
df15d90
chore(deps-dev): update dependencies
jerome-benoit Jan 12, 2026
bda46cf
docs: consolidate error documentation to eliminate duplication
jerome-benoit Jan 12, 2026
fe840d8
docs: improve consistency and clarity across documentation
jerome-benoit Jan 12, 2026
3cb5ec7
docs: eliminate duplications and add includeReasoning documentation
jerome-benoit Jan 12, 2026
7691c8f
docs: add missing examples to copilot instructions
jerome-benoit Jan 12, 2026
3089cf3
docs: optimize documentation structure and reduce verbosity
jerome-benoit Jan 12, 2026
b96eeee
fix: harmonize import order in all examples
jerome-benoit Jan 12, 2026
2762e93
docs: improve documentation consistency and conciseness
jerome-benoit Jan 12, 2026
dbba2b3
docs: standardize example order and condense migration guide
jerome-benoit Jan 12, 2026
8b5a8e5
docs: refactor documentation - eliminate duplication and improve conc…
jerome-benoit Jan 12, 2026
1a1e91d
docs: improve documentation quality and consistency
jerome-benoit Jan 12, 2026
8e2504c
chore : add Renovate configuration file
jerome-benoit Jan 12, 2026
1f6e8f5
chore: format renovate configuration file
jerome-benoit Jan 12, 2026
da3e6a2
docs: comprehensive documentation improvement - Phase 1 & 2 complete
jerome-benoit Jan 12, 2026
ed92deb
ci: add documentation validation to PR checks
jerome-benoit Jan 12, 2026
44010ef
fix(deps): update dependency @ai-sdk/provider-utils to ^4.0.5
renovate[bot] Jan 12, 2026
619190e
chore(deps): update actions/checkout action to v6
renovate[bot] Jan 12, 2026
c1be3fc
chore(deps): update dependency node to v24
renovate[bot] Jan 12, 2026
2482bfb
Merge pull request #2 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 12, 2026
c63ca18
Merge pull request #3 from jerome-benoit/renovate/actions-checkout-6.x
jerome-benoit Jan 12, 2026
87484c6
chore(deps): update actions/setup-node action to v6
renovate[bot] Jan 12, 2026
1e24257
Merge pull request #4 from jerome-benoit/renovate/actions-setup-node-6.x
jerome-benoit Jan 12, 2026
7f7931f
Merge pull request #5 from jerome-benoit/renovate/node-24.x
jerome-benoit Jan 12, 2026
401a47e
chore(deps): lock file maintenance
renovate[bot] Jan 12, 2026
f283983
chore: bump version to 2.1.0
jerome-benoit Jan 12, 2026
64db358
Merge pull request #6 from jerome-benoit/renovate/lock-file-maintenance
jerome-benoit Jan 12, 2026
3ef3115
docs: reduce duplication across documentation files
jerome-benoit Jan 13, 2026
c6c0733
chore: migrate npm publishing to Trusted Publishing (OIDC)
jerome-benoit Jan 13, 2026
95476e2
feat: add automatic npm tag detection for prerelease versions
jerome-benoit Jan 13, 2026
7bf6630
feat!: prepare v3.0.0-rc.1 release
jerome-benoit Jan 13, 2026
c7b4ebd
docs: update documentation for v3.0.0-rc.1 compatibility
jerome-benoit Jan 13, 2026
62037c1
docs: enhance documentation and standardize examples
jerome-benoit Jan 13, 2026
20def97
docs: improve navigation and formatting
jerome-benoit Jan 13, 2026
ca67851
docs: eliminate duplication in migration section
jerome-benoit Jan 13, 2026
afb3435
docs: eliminate error handling duplication (85% reduction)
jerome-benoit Jan 13, 2026
4f16a1a
docs: improve structure and eliminate remaining duplication
jerome-benoit Jan 13, 2026
c0b319b
docs: consolidate duplication and optimize structure (Phase 1 & 2)
jerome-benoit Jan 13, 2026
530221d
refactor(scripts): consolidate documentation validation into single T…
jerome-benoit Jan 13, 2026
4b3d23d
feat: auto-detect repository owner for npm publishing scope
jerome-benoit Jan 13, 2026
5f65aa9
chore: bump version to 3.0.0-rc.2
jerome-benoit Jan 13, 2026
7a6061b
fix(deps): update all non-major dependencies
renovate[bot] Jan 13, 2026
59084f2
fix(ci): allow same version in npm publish workflow
jerome-benoit Jan 13, 2026
acfcb61
chore: bump version to 3.0.0-rc.3
jerome-benoit Jan 13, 2026
a7d7e87
Merge pull request #7 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 13, 2026
7a8e1f8
chore: lock file maintenance
jerome-benoit Jan 13, 2026
f1d1b24
fix(ci): enable OIDC trusted publishing by removing registry-url
jerome-benoit Jan 13, 2026
882e03c
chore: bump version to 3.0.0-rc.4
jerome-benoit Jan 13, 2026
e782675
docs: improve documentation structure and best practices adherence
jerome-benoit Jan 13, 2026
3448774
feat: add orchestration v2.4/2.5 type exports
jerome-benoit Jan 13, 2026
9190845
chore: bump version to 3.0.0-rc.5
jerome-benoit Jan 13, 2026
fb3de0e
docs: comprehensive documentation audit and improvements
jerome-benoit Jan 13, 2026
17114b5
docs: improve documentation quality and consistency
jerome-benoit Jan 13, 2026
3bb25e4
chore: bump version to 3.0.0-rc.6
jerome-benoit Jan 13, 2026
eec5626
chore: release v3.0.0
jerome-benoit Jan 13, 2026
b50a130
chore: integrate OpenSpec for spec-driven development
jerome-benoit Jan 13, 2026
9597b3a
refactor: remove version number from quick test script
jerome-benoit Jan 14, 2026
0c4194c
feat: migrate to LanguageModelV3
jerome-benoit Jan 14, 2026
3339718
docs: complete V3 migration documentation
jerome-benoit Jan 14, 2026
c28f1ce
refactor: remove historical migration comments from code
jerome-benoit Jan 14, 2026
5c62301
docs(openspec): add approval gates to migration tasks
jerome-benoit Jan 14, 2026
5f0932b
fix: address review comments from PR #28
jerome-benoit Jan 14, 2026
4a9bda0
docs(openspec): harmonize PR workflow with upstream review + origin r…
jerome-benoit Jan 14, 2026
8a7bf24
docs(openspec): apply all audit corrections
jerome-benoit Jan 14, 2026
609db0e
docs(openspec): add comprehensive release notes for v4.0.0
jerome-benoit Jan 14, 2026
22703e9
docs(openspec): fix coherence issues in proposal, design, and tasks
jerome-benoit Jan 14, 2026
9db977d
fix(openspec): convert release notes links to absolute URLs with v4.0…
jerome-benoit Jan 14, 2026
2ea847f
fix: resolve lint errors for CI/CD quality gates
jerome-benoit Jan 14, 2026
715cf3a
docs(openspec): harmonize quality gates documentation in proposal
jerome-benoit Jan 14, 2026
bd474e6
docs: fix documentation coherence - update all references to Language…
jerome-benoit Jan 14, 2026
d3cd00a
docs: minor wording improvement in release process
jerome-benoit Jan 14, 2026
d851f7b
docs(openspec): fix task completion status and proposal accuracy
jerome-benoit Jan 14, 2026
2e26f3b
docs(openspec): add fork context and strategy section
jerome-benoit Jan 14, 2026
88e5988
docs(audit): add comprehensive V3 implementation audit (9.5/10 qualit…
jerome-benoit Jan 14, 2026
722c9b3
refactor: enhance debugging with error details in warnings
jerome-benoit Jan 14, 2026
e74546e
fix(workflow): correct jq operator precedence for package.json field …
jerome-benoit Jan 14, 2026
61e90eb
fix(docs): resolve relative links correctly in validation script
jerome-benoit Jan 14, 2026
272bfbc
chore(docs): remove obsolete directory exclusions from validation
jerome-benoit Jan 14, 2026
842cdf4
docs(readme): fix model ID formats with correct vendor prefixes
jerome-benoit Jan 14, 2026
4962a51
refactor(docs): consolidate and enhance model ID validation
jerome-benoit Jan 14, 2026
4f61b9a
fix(lint): convert numbers to strings in template literals
jerome-benoit Jan 14, 2026
836c36f
fix(ci): add tsx as dev dependency for CI compatibility
jerome-benoit Jan 14, 2026
1eab620
docs(release): make release notes concise and OpenSpec-aligned
jerome-benoit Jan 14, 2026
30ef35f
fix(docs): correct relative links in release notes
jerome-benoit Jan 14, 2026
81598c3
fix(docs): restore absolute URLs in release notes for GitHub Releases
jerome-benoit Jan 14, 2026
c818046
docs(readme): harmonize README structure - remove changelog content
jerome-benoit Jan 14, 2026
613e60d
chore(template): remove SAP AI SDK version from bug report
jerome-benoit Jan 14, 2026
3128ec1
fix(templates): use absolute GitHub URLs instead of relative paths
jerome-benoit Jan 14, 2026
794d6c6
docs(readme): eliminate duplication and harmonize structure
jerome-benoit Jan 14, 2026
3ca38c6
fix(stream): implement StreamIdGenerator with crypto.randomUUID() per…
jerome-benoit Jan 14, 2026
58a3c3d
docs(openspec): harmonize documentation with V3 implementation
jerome-benoit Jan 14, 2026
e74918b
refactor(test): remove unnecessary non-null assertions
jerome-benoit Jan 14, 2026
e894514
fix(lint): replace non-null assertions with conditional checks
jerome-benoit Jan 14, 2026
35645bb
docs(readme): update ToC with missing sections
jerome-benoit Jan 14, 2026
228882d
feat(docs): implement ToC validation and auto-fix tool
jerome-benoit Jan 14, 2026
9632b66
docs: simplify AGENTS.md to pure router
jerome-benoit Jan 14, 2026
c97e768
Merge pull request #8 from jerome-benoit/feature/languagemodelv3
jerome-benoit Jan 14, 2026
56b57c7
chore: prepare v4.0.0-rc.1 pre-release
jerome-benoit Jan 14, 2026
8e1f446
docs(openspec): add Phase 5.1a for RC pre-release workflow
jerome-benoit Jan 14, 2026
2ec9416
docs(openspec): harmonize RC release status across all documents
jerome-benoit Jan 14, 2026
f59693b
fix(ci): add automatic npm tag detection for publish simulation
jerome-benoit Jan 14, 2026
c00343d
refactor: simplify exports architecture - remove types/ folder
jerome-benoit Jan 14, 2026
ef87c65
chore: update documentation ToCs
jerome-benoit Jan 14, 2026
820db38
docs: optimize code examples by referencing executable files
jerome-benoit Jan 15, 2026
6f37912
docs: fix broken Vercel AI SDK documentation links
jerome-benoit Jan 15, 2026
4807c24
fix: update GitHub issue templates to reference upstream repo
jerome-benoit Jan 15, 2026
72fd012
chore: integrate eslint-plugin-perfectionist with natural sorting
jerome-benoit Jan 15, 2026
1e20d24
chore: lock file maintenance
jerome-benoit Jan 15, 2026
b54ee5a
test: improve test coverage and reduce mock verbosity
jerome-benoit Jan 15, 2026
003a030
feat: enhance doc validator with code metrics and comments validation
jerome-benoit Jan 15, 2026
63f1323
chore: prepare v4.0.0-rc.2
jerome-benoit Jan 15, 2026
bdc244f
docs: harmonize OpenSpec for v4.0.0-rc.2 release
jerome-benoit Jan 15, 2026
9fced94
fix(deps): update all non-major dependencies
renovate[bot] Jan 15, 2026
cf955a1
docs: add RC2 feedback gathering task (5.1b.4)
jerome-benoit Jan 15, 2026
a1846b1
docs: harmonize OpenSpec status to 'RC2 Published - Gathering Feedback'
jerome-benoit Jan 15, 2026
441d15d
docs: harmonize metrics and remove historical references
jerome-benoit Jan 15, 2026
fab369e
Merge pull request #9 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 15, 2026
7cc296a
chore: add .editorconfig and Volta config for Node.js version management
jerome-benoit Jan 15, 2026
7252d90
docs: add missing example-document-grounding and example-translation …
jerome-benoit Jan 15, 2026
63030e2
chore: code formatting
jerome-benoit Jan 15, 2026
1d0a72a
feat(validator): add checks 12-14 for heading hierarchy, code block s…
jerome-benoit Jan 15, 2026
5528add
docs: add comprehensive AbortSignal limitation documentation to ARCHI…
jerome-benoit Jan 15, 2026
0b976f0
docs: add AbortSignal limitation notes to doGenerate and doStream JSDoc
jerome-benoit Jan 15, 2026
eafb56d
fix(validator): fix linting errors in trackCodeBlocks and validateHea…
jerome-benoit Jan 15, 2026
9bddc93
refactor(validator): remove global mutable state, use functional resu…
jerome-benoit Jan 15, 2026
096d33b
chore: cleanup .gitignore
jerome-benoit Jan 15, 2026
3993548
refactor: improve documentation validation and ToC generation
jerome-benoit Jan 15, 2026
3ba09ff
refactor(scripts): eliminate code duplication and fix ToC anchor gene…
jerome-benoit Jan 15, 2026
b208b5d
refactor(scripts): restructure markdown-utils tests and update metrics
jerome-benoit Jan 15, 2026
dd06c0d
chore: release v4.0.0
jerome-benoit Jan 15, 2026
73dcc0d
docs: finalize RELEASE_NOTES.md for v4.0.0
jerome-benoit Jan 15, 2026
2102509
docs: update OpenSpec with v4.0.0 publication details
jerome-benoit Jan 15, 2026
5fe818f
docs: update OpenSpec with post-release status
jerome-benoit Jan 15, 2026
dfff940
docs: document PR #28 description update
jerome-benoit Jan 15, 2026
f4b604c
docs: remove comment reference from Task 5.4.2
jerome-benoit Jan 15, 2026
21f5901
docs: harmonize OpenSpec documentation to reflect v4.0.0 release comp…
jerome-benoit Jan 15, 2026
b4142d8
docs: correct test count to 249 across all OpenSpec files
jerome-benoit Jan 15, 2026
845392f
docs: finalize OpenSpec files for v4.0.0 stable release
jerome-benoit Jan 15, 2026
fc52072
docs: fix test count and coverage metrics in OpenSpec files
jerome-benoit Jan 15, 2026
8bc48ba
feat(streaming): add response-metadata.id for request tracing
jerome-benoit Jan 15, 2026
4489d8c
refactor(scripts): enhance documentation validation and ToC fixing sc…
jerome-benoit Jan 16, 2026
b2d40df
refactor(scripts): improve validation logic and update test metrics t…
jerome-benoit Jan 16, 2026
81359c9
fix(validate-docs): accept parent directory links (../) as valid rela…
jerome-benoit Jan 16, 2026
2bdf116
test(scripts): add unit tests for CLI, validation and markdown utilities
jerome-benoit Jan 16, 2026
b5f0f77
refactor: remove language model v3 integration bits
jerome-benoit Jan 16, 2026
b8efc0e
docs: clarify reasoning part handling and examples
jerome-benoit Jan 16, 2026
2c0e89b
chore: migrate to markdownlint-cli with fine-grained inline directives
jerome-benoit Jan 16, 2026
298a40e
feat(errors): improve SSE and SDK error extraction
jerome-benoit Jan 16, 2026
8617f54
style: remove extra blank line in markdownlintrc
jerome-benoit Jan 16, 2026
80e34b4
docs: align documentation with latest changes
jerome-benoit Jan 16, 2026
87794d3
ci: add markdownlint to linting scripts
jerome-benoit Jan 16, 2026
192f06c
docs: audit documentation and add ToC/link validation tools
jerome-benoit Jan 17, 2026
f8129e6
refactor(scripts): simplify comments and add edge case tests
jerome-benoit Jan 17, 2026
421ab63
chore: release v4.0.1
jerome-benoit Jan 17, 2026
d78744a
fix(deps): update all non-major dependencies
renovate[bot] Jan 17, 2026
a247a15
Merge pull request #10 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 17, 2026
8f3c748
chore: release v4.0.2
jerome-benoit Jan 17, 2026
cbf85ab
fix(error): add 408/409 to retryable status codes
jerome-benoit Jan 17, 2026
1e0a2ec
fix(messages): use InvalidPromptError for unsupported roles
jerome-benoit Jan 17, 2026
b66701d
docs: align error handling documentation with implementation
jerome-benoit Jan 17, 2026
317a78e
feat: add EmbeddingModelV3 support for text embeddings
jerome-benoit Jan 17, 2026
577204d
test(stream): add includeRawChunks tests and documentation
jerome-benoit Jan 17, 2026
d387606
feat: add runtime validation with parseProviderOptions and Zod schema
jerome-benoit Jan 17, 2026
4ac817d
docs: harmonize documentation style in README
jerome-benoit Jan 17, 2026
1529593
docs: harmonize documentation style across all files
jerome-benoit Jan 17, 2026
515361d
docs: standardize note/blockquote patterns and link naming
jerome-benoit Jan 17, 2026
eaa012f
refactor: unify validation with single Zod schema, remove duplication
jerome-benoit Jan 17, 2026
534cb63
refactor: add fail-fast validation for defaultSettings.modelParams
jerome-benoit Jan 17, 2026
0def09b
docs: simplify inline comments
jerome-benoit Jan 17, 2026
ce24c4b
test: remove duplicate validation tests
jerome-benoit Jan 17, 2026
6a748d2
chore: bump version to 4.1.0
jerome-benoit Jan 17, 2026
957ee0f
refactor: improve SAP AI SDK error mapping semantics
jerome-benoit Jan 17, 2026
b8bfac4
docs: clarify deployment resolution error comment
jerome-benoit Jan 17, 2026
534458c
chore: bump version to 4.1.1
jerome-benoit Jan 17, 2026
ea7f81d
fix(deps): update dependency eslint-plugin-jsdoc to ^62.1.0
renovate[bot] Jan 18, 2026
fb89120
refactor(validation): consolidate modelParams validation and harmoniz…
jerome-benoit Jan 18, 2026
f37abcb
refactor: change reasoning tag from <reasoning> to <think>
jerome-benoit Jan 18, 2026
dc6f426
Merge pull request #11 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 18, 2026
0eb153c
refactor: use HTTP_STATUS constants for status codes
jerome-benoit Jan 19, 2026
79b34da
chore: bump version to 4.1.2
jerome-benoit Jan 19, 2026
cf3886e
feat: implement ProviderV3 compliance
jerome-benoit Jan 19, 2026
13d6998
chore(deps): lock file maintenance
renovate[bot] Jan 19, 2026
cdaa813
Merge pull request #12 from jerome-benoit/renovate/lock-file-maintenance
jerome-benoit Jan 19, 2026
ff23355
docs: refine SAP AI Provider module and classes
jerome-benoit Jan 19, 2026
7b72b0a
chore: add backward compatibility for ai v5
jerome-benoit Jan 19, 2026
804277a
chore: lock. file maintenance
jerome-benoit Jan 19, 2026
87dc51e
refactor: use readonly properties in settings and configs
jerome-benoit Jan 19, 2026
f969b10
feat(responseFormat): use settings.responseFormat as fallback when op…
jerome-benoit Jan 19, 2026
8967e0f
chore: bump version to 4.1.3
jerome-benoit Jan 19, 2026
16e29b1
feat: add customizable provider name with AI SDK naming convention
jerome-benoit Jan 19, 2026
357f7e2
chore: bump version to 4.2.0
jerome-benoit Jan 19, 2026
647f56b
refactor: harmonize provider name terminology
jerome-benoit Jan 19, 2026
cd08040
chore: bump version to 4.2.1
jerome-benoit Jan 19, 2026
fd6839e
fix(deps): update all non-major dependencies
renovate[bot] Jan 20, 2026
f409655
fix: propagate nested modelParams correctly with deep merge
jerome-benoit Jan 20, 2026
a39fffb
Merge pull request #13 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 20, 2026
459a2c5
chore: lock file maintenance
jerome-benoit Jan 20, 2026
395662b
chore(deps): lock file maintenance
renovate[bot] Jan 20, 2026
a898bc3
Merge pull request #14 from jerome-benoit/renovate/lock-file-maintenance
jerome-benoit Jan 20, 2026
026d26d
chore: clean build directory before each build
jerome-benoit Jan 20, 2026
0b5f850
chore: bump version to 4.2.2
jerome-benoit Jan 20, 2026
d43acb1
feat: export SAPAILanguageModel class for type annotations and instan…
jerome-benoit Jan 20, 2026
7edb732
feat: implement HTTP-level AbortSignal support
jerome-benoit Jan 20, 2026
26ec52c
docs: add constructor documentation for SAPAIEmbeddingModel
jerome-benoit Jan 20, 2026
5842adb
feat: add logLevel option to control SAP Cloud SDK logging
jerome-benoit Jan 20, 2026
d67f073
docs: harmonize descriptions to "Language Model V3"
jerome-benoit Jan 20, 2026
a88ffdd
refactor: remove duplicate tests in provider test suite
jerome-benoit Jan 20, 2026
94a7c09
refactor: further consolidate redundant provider tests
jerome-benoit Jan 20, 2026
c452ee0
refactor: consolidate deployment and destination config tests
jerome-benoit Jan 20, 2026
e54dfa5
refactor: refine SAP AI Core model implementations
jerome-benoit Jan 20, 2026
6f958c1
chore: bump version to 4.2.3
jerome-benoit Jan 20, 2026
b39c759
fix: include all orchestration modules in stream requests
jerome-benoit Jan 20, 2026
da3dafb
refactor: extract header normalization to shared utility
jerome-benoit Jan 21, 2026
002c83c
feat: enhance error messages with SAP AI Core response details
jerome-benoit Jan 21, 2026
acf3972
refactor: unify error creation with automatic response body enrichment
jerome-benoit Jan 21, 2026
91755b4
Merge pull request #17 from jerome-benoit/feat/enhanced-error-messages
jerome-benoit Jan 21, 2026
cecf582
fix: move isConfigReference to type-only export
jerome-benoit Jan 21, 2026
d4c7410
fix: add camelCaseKey for topK and seed in parameter mappings
jerome-benoit Jan 21, 2026
d019050
chore(deps-dev): bump eslint-plugin-jsdoc, prettier, @ai-sdk/gateway,…
jerome-benoit Jan 21, 2026
d38bcd8
chore: bump version to 4.2.4
jerome-benoit Jan 21, 2026
c271084
docs: sync migration guide and project dependencies
jerome-benoit Jan 21, 2026
111fa35
docs: remove private convertToSAPMessages function
jerome-benoit Jan 21, 2026
049907d
feat: enable noUncheckedIndexedAccess for stricter type safety
jerome-benoit Jan 21, 2026
a286081
feat: inject package version at build time
jerome-benoit Jan 21, 2026
f33f2aa
chore: bump version to 4.2.5
jerome-benoit Jan 21, 2026
827162d
refactor: replace zod-to-json-schema with native z.toJSONSchema()
jerome-benoit Jan 22, 2026
b8e835b
chore(deps): update all non-major dependencies
renovate[bot] Jan 22, 2026
f411ed0
Merge pull request #15 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 22, 2026
d6dfcb2
refactor: remove unused warningsOut variable
jerome-benoit Jan 22, 2026
82ddb47
test: add large content handling tests for message conversion and str…
jerome-benoit Jan 22, 2026
594ab61
chore: bump version to 4.2.6
jerome-benoit Jan 22, 2026
4bbc6f9
chore(deps): update @ai-sdk/provider and @ai-sdk/provider-utils
jerome-benoit Jan 23, 2026
a81db18
feat: add VERSION to providerMetadata and strengthen test assertions
jerome-benoit Jan 23, 2026
a103bda
chore(deps): update dependency eslint-plugin-jsdoc to ^62.4.1
renovate[bot] Jan 24, 2026
ac8520a
chore: migrate package ownership from mymediset to jerome-benoit
jerome-benoit Jan 25, 2026
54d0f08
chore: missed rebranding from mymediset to jerome-benoit
jerome-benoit Jan 25, 2026
684b4b2
Merge pull request #18 from jerome-benoit/renovate/all-minor-patch
jerome-benoit Jan 26, 2026
be6b4fe
chore: bump dependencies
jerome-benoit Jan 26, 2026
f2d83ce
chore: bump version to 4.2.7
jerome-benoit Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .cursor/rules/ai-sdk-integration.mdc
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
---
description: Guidance for integrating with the Vercel AI SDK
---

# AI SDK Integration

The provider implements the `LanguageModelV2` contract and is designed to work with the Vercel AI SDK.
The provider implements the `LanguageModelV3` and `EmbeddingModelV3` contracts
and is designed to work with the Vercel AI SDK 5.0+.

## Key Points

- Create models via the provider function: `const model = provider("gpt-4o")`.
- Supported operations include `doGenerate` and `doStream` (see [src/sap-ai-chat-language-model.ts](mdc:src/sap-ai-chat-language-model.ts)).
- Create language models via the provider function: `const model = provider("gpt-4o")`.
- Create embedding models via: `const model = provider.embedding("text-embedding-ada-002")`.
- Supported operations include `doGenerate` and `doStream` for language models,
`doEmbed` for embedding models (see
[src/sap-ai-language-model.ts](mdc:src/sap-ai-language-model.ts) and
[src/sap-ai-embedding-model.ts](mdc:src/sap-ai-embedding-model.ts)).
- Tool calling is supported by passing `tools` in call options.
- Structured outputs (JSON schema response_format) are enabled for most models except Anthropic and Amazon families.
- Structured outputs (JSON schema response_format) are enabled for most models
except Anthropic and Amazon families.
- `n` (multi-choice) is disabled for Amazon models.

## Recommended API Usage

- Text generation: `generateText` with `model: provider("<modelId>")`.
- Streaming: `streamText` for SSE token streams.
- Structured outputs: `generateObject` when the model supports JSON schema.
- Embeddings: `embed` or `embedMany` with `model: provider.embedding("<modelId>")`.

Refer to examples in [README.md](mdc:README.md) and [examples/](mdc:examples/).

15 changes: 9 additions & 6 deletions .cursor/rules/build-and-publish.mdc
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
---
description: Build, type-check, test, and publish workflow for the package
---

# Build and Publish

## Build Outputs

- Bundler: tsup (CJS + ESM + DTS + sourcemaps) — see [tsup.config.ts](mdc:tsup.config.ts)
- Bundler: tsup (CJS + ESM + DTS + sourcemaps) — see
[tsup.config.ts](mdc:tsup.config.ts)
- Output dir: [dist/](mdc:dist/)
- Package exports configured in [package.json](mdc:package.json)

## Commands

- Clean: `npm run clean`
- Build: `npm run build`
- Type-check: `npm run type-check`
- Lint: `npm run lint`
- Prettier check/fix: `npm run prettier-check` / `npm run prettier-fix`
- Test (all): `npm test`
- Lint-fix: `npm run lint-fix`
- Prettier-check: `npm run prettier-check`
- Prettier-fix: `npm run prettier-fix`
- Test: `npm test`

`prepublishOnly` enforces type-check, tests, and build before publish (see [package.json](mdc:package.json)).
`prepublishOnly` enforces type-check, lint, test, build and check-build before
publish (see [package.json](mdc:package.json)).

## Node Engine

Expand All @@ -27,4 +31,3 @@ description: Build, type-check, test, and publish workflow for the package
## Verification

- Verify distribution artifacts exist: `npm run check-build`.

58 changes: 44 additions & 14 deletions .cursor/rules/environment-and-config.mdc
Original file line number Diff line number Diff line change
@@ -1,31 +1,61 @@
---
description: Environment variables, credentials, and configuration guidance
---

# Environment and Configuration

## Credentials

- Preferred: Provide an SAP AI Core service key JSON to `createSAPAIProvider({ serviceKey })` (see [src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)).
- Alternative: Provide an OAuth token via `createSAPAIProviderSync({ token })` or set `SAP_AI_TOKEN`.
The SAP AI SDK (`@sap-ai-sdk/orchestration`) handles authentication
automatically:

## Environment Variables
1. **On SAP BTP**: Uses service binding from `VCAP_SERVICES`
2. **Locally**: Uses `AICORE_SERVICE_KEY` environment variable containing the
full JSON service key

See details in [README.md](mdc:README.md).
## Provider Configuration

- `SAP_AI_SERVICE_KEY` — full JSON string of your service key.
- `SAP_AI_TOKEN` — direct OAuth token (used by default instance `sapai`).
- `SAP_AI_BASE_URL` — override base URL if needed.
Configure the provider using `createSAPAIProvider(options)`:

Do not commit secrets. Prefer local `.env` and CI secrets. `dotenv` is available for local development.
```typescript
import { createSAPAIProvider } from "@jerome-benoit/sap-ai-provider";

## Deployment and Resource Group
// Default configuration (auto-detects authentication)
const provider = createSAPAIProvider();

// With specific resource group
const provider = createSAPAIProvider({
resourceGroup: "production",
});

// With specific deployment ID
const provider = createSAPAIProvider({
deploymentId: "d65d81e7c077e583",
});

// With custom destination
const provider = createSAPAIProvider({
destination: {
url: "https://api.ai.prod.eu-central-1.aws.ml.hana.ondemand.com",
},
});
```

- Default `deploymentId`: `d65d81e7c077e583`
- Default `resourceGroup`: `default`
## Environment Variables

- `AICORE_SERVICE_KEY` — Full JSON string of your SAP AI Core service key (used
by SAP AI SDK)

Do not commit secrets. Prefer local `.env` and CI secrets. `dotenv` is available
for local development.

## Deployment and Resource Group

Both can be overridden in provider settings or via environment variables in your host app.
- Default `resourceGroup`: `'default'`

## SAP BTP (xsenv)
Both `resourceGroup` and `deploymentId` can be configured in provider settings.

For BTP environments, consider loading credentials from `VCAP_SERVICES` via `@sap/xsenv` as shown in [README.md](mdc:README.md).
## SAP BTP (VCAP_SERVICES)

For BTP environments, the SAP AI SDK automatically reads credentials from
`VCAP_SERVICES` when the application is bound to an AI Core service instance.
75 changes: 56 additions & 19 deletions .cursor/rules/project-structure.mdc
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
---
alwaysApply: true
---

# Project Structure Guide

This repository provides an SAP AI Core provider compatible with the Vercel AI SDK. Use these anchors to navigate the codebase quickly.
This repository provides an SAP AI Core provider compatible with the Vercel AI
SDK. Use these anchors to navigate the codebase quickly.

## Entry Points and Core Modules

- Main package entry: [src/index.ts](mdc:src/index.ts)
- Re-exports provider factory and types.
- Provider factory and default instance: [src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)
- `createSAPAIProvider(options)` returns a function for model creation (async; handles OAuth when given a service key).
- `createSAPAIProviderSync(options)` for token-based sync usage.
- `sapai` default instance reads `SAP_AI_TOKEN` at call time.
- Chat LLM implementation: [src/sap-ai-chat-language-model.ts](mdc:src/sap-ai-chat-language-model.ts)
- Implements Vercel AI SDK `LanguageModelV2` contract.
- Supports text, tool calls, streaming, structured outputs (varies by model family).
- Message templating: [src/convert-to-sap-messages.ts](mdc:src/convert-to-sap-messages.ts)
- Settings and model IDs: [src/sap-ai-chat-settings.ts](mdc:src/sap-ai-chat-settings.ts)
- Provider factory and default instance:
[src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)
- `createSAPAIProvider(options)` returns a provider function for model
creation.
- `sapai` default instance uses default configuration (auto-detects service
binding or AICORE_SERVICE_KEY env var).
- Language model implementation:
[src/sap-ai-language-model.ts](mdc:src/sap-ai-language-model.ts)
- Implements Vercel AI SDK `LanguageModelV3` contract (v4.0.0+).
- Supports text, tool calls, streaming, structured outputs (varies by model
family).
- Embedding model implementation:
[src/sap-ai-embedding-model.ts](mdc:src/sap-ai-embedding-model.ts)
- Implements Vercel AI SDK `EmbeddingModelV3` contract.
- Supports single and batch embedding generation.
- Message templating:
[src/convert-to-sap-messages.ts](mdc:src/convert-to-sap-messages.ts)
- Settings and model IDs: [src/sap-ai-settings.ts](mdc:src/sap-ai-settings.ts)
- Also re-exports all SAP AI SDK types for convenience.
- Error handling helpers: [src/sap-ai-error.ts](mdc:src/sap-ai-error.ts)
- Types: [src/types/completion-response.ts](mdc:src/types/completion-response.ts), [src/types/completion-request.ts](mdc:src/types/completion-request.ts)

## Build, Types, and Distribution

- TypeScript config: [tsconfig.json](mdc:tsconfig.json)
- Build config (CJS+ESM+DTS): [tsup.config.ts](mdc:tsup.config.ts)
- ESLint config: [eslint.config.mjs](mdc:eslint.config.mjs)
- Output: [dist/](mdc:dist/) produces `index.js`, `index.mjs`, `index.d.ts` with sourcemaps.
- `package.json` exports are aligned for Node and ESM: [package.json](mdc:package.json)
- Output: [dist/](mdc:dist/) produces `index.js`, `index.cjs`, `index.d.ts` with
sourcemaps.
- `package.json` exports are aligned for Node and ESM:
[package.json](mdc:package.json)

## Testing

Expand All @@ -37,14 +50,38 @@ This repository provides an SAP AI Core provider compatible with the Vercel AI S
## Examples and Docs

- README with usage and configuration: [README.md](mdc:README.md)
- Complete API reference: [API_REFERENCE.md](mdc:API_REFERENCE.md)
- Architecture documentation: [ARCHITECTURE.md](mdc:ARCHITECTURE.md)
- Contribution guidelines: [CONTRIBUTING.md](mdc:CONTRIBUTING.md)
- Environment setup guide: [ENVIRONMENT_SETUP.md](mdc:ENVIRONMENT_SETUP.md)
- Troubleshooting guide: [TROUBLESHOOTING.md](mdc:TROUBLESHOOTING.md)
- Migration guide: [MIGRATION_GUIDE.md](mdc:MIGRATION_GUIDE.md)
- cURL API testing guide:
[CURL_API_TESTING_GUIDE.md](mdc:CURL_API_TESTING_GUIDE.md)
- AI agent instructions: [AGENTS.md](mdc:AGENTS.md)
- Examples: [examples/](mdc:examples/)
- Chat completion: [examples/example-simple-chat-completion.ts](mdc:examples/example-simple-chat-completion.ts)
- Tool calling: [examples/example-chat-completion-tool.ts](mdc:examples/example-chat-completion-tool.ts)
- Image recognition: [examples/example-image-recognition.ts](mdc:examples/example-image-recognition.ts)
- Text generation: [examples/example-generate-text.ts](mdc:examples/example-generate-text.ts)
- Chat completion:
[examples/example-simple-chat-completion.ts](mdc:examples/example-simple-chat-completion.ts)
- Tool calling:
[examples/example-chat-completion-tool.ts](mdc:examples/example-chat-completion-tool.ts)
- Image recognition:
[examples/example-image-recognition.ts](mdc:examples/example-image-recognition.ts)
- Text generation:
[examples/example-generate-text.ts](mdc:examples/example-generate-text.ts)
- Data masking:
[examples/example-data-masking.ts](mdc:examples/example-data-masking.ts)
- Streaming:
[examples/example-streaming-chat.ts](mdc:examples/example-streaming-chat.ts)
- Document grounding (RAG):
[examples/example-document-grounding.ts](mdc:examples/example-document-grounding.ts)
- Translation:
[examples/example-translation.ts](mdc:examples/example-translation.ts)
- Embeddings:
[examples/example-embeddings.ts](mdc:examples/example-embeddings.ts)

## Runtime Requirements

- Node.js >= 18 (see `engines` in [package.json](mdc:package.json)).
- Environment variables are used for credentials when no service key is provided.

- Authentication is handled automatically by SAP AI SDK:
- On SAP BTP: Uses service binding (VCAP_SERVICES)
- Locally: Uses AICORE_SERVICE_KEY environment variable
21 changes: 14 additions & 7 deletions .cursor/rules/testing.mdc
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
globs: **/*.test.ts,**/*.test.tsx
---

# Testing Guide (Vitest)

## Test Environments

- Node tests: [vitest.node.config.js](mdc:vitest.node.config.js)
- Edge runtime tests: [vitest.edge.config.js](mdc:vitest.edge.config.js)

Use Node environment for most unit tests. Use Edge runtime when covering streaming or runtime-specific behaviors.
Use Node environment for most unit tests. Use Edge runtime when covering
streaming or runtime-specific behaviors.

## Commands

Expand All @@ -19,12 +21,17 @@ Use Node environment for most unit tests. Use Edge runtime when covering streami

## Stubbing Network

- Prefer injecting a custom `fetch` via provider settings for deterministic tests (see [src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)).
- For streaming flows, assert `LanguageModelV2StreamPart` events via the `doStream` pipeline (see [src/sap-ai-chat-language-model.ts](mdc:src/sap-ai-chat-language-model.ts)).
- Prefer injecting a custom `fetch` via provider settings for deterministic
tests (see [src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)).
- For streaming flows, assert `LanguageModelV3StreamPart` events via the
`doStream` pipeline (see
[src/sap-ai-language-model.ts](mdc:src/sap-ai-language-model.ts)).

## Test Patterns

- Validate message templating: cover [src/convert-to-sap-messages.ts](mdc:src/convert-to-sap-messages.ts).
- Validate error propagation using helpers in [src/sap-ai-error.ts](mdc:src/sap-ai-error.ts).
- Assert structured output behavior varies by model family (Anthropic/Amazon do not support JSON schema formatting).

- Validate message templating: cover
[src/convert-to-sap-messages.ts](mdc:src/convert-to-sap-messages.ts).
- Validate error propagation using helpers in
[src/sap-ai-error.ts](mdc:src/sap-ai-error.ts).
- Assert structured output behavior varies by model family (Anthropic/Amazon do
not support JSON schema formatting).
22 changes: 15 additions & 7 deletions .cursor/rules/typescript-style.mdc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
globs: *.ts,*.tsx,*.mts,*.cts
---

# TypeScript Style Guide

Follow these conventions across TypeScript sources to align with the existing configuration and code style.
Follow these conventions across TypeScript sources to align with the existing
configuration and code style.

## Language and Types

Expand All @@ -20,17 +22,23 @@ Follow these conventions across TypeScript sources to align with the existing co

## Errors and Handling

- Do not swallow errors. Propagate or wrap with context via `SAPAIError` utilities when applicable (see [src/sap-ai-error.ts](mdc:src/sap-ai-error.ts)).
- Only use `try/catch` where meaningful recovery or re-throw with context is performed.
- Do not swallow errors. Propagate or wrap with context using Vercel AI SDK
standard errors (`APICallError`, `LoadAPIKeyError`, `NoSuchModelError` from
`@ai-sdk/provider`).
- Only use `try/catch` where meaningful recovery or re-throw with context is
performed.

## Formatting and Linting

- Respect [eslint.config.mjs](mdc:eslint.config.mjs) and Prettier (see `prettier-*` scripts in [package.json](mdc:package.json)).
- Respect [eslint.config.mjs](mdc:eslint.config.mjs) and Prettier (see
`prettier-*` scripts in [package.json](mdc:package.json)).
- Keep lines readable; prefer multi-line over dense one-liners.
- Avoid inline explanatory comments; add brief comments above non-obvious logic.

## Provider-specific Conventions

- The provider function must not be invoked with `new` (explicitly guarded in [src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)).
- When adding model capabilities, ensure `SAPAIChatLanguageModel` maintains the `LanguageModelV2` contract (see [src/sap-ai-chat-language-model.ts](mdc:src/sap-ai-chat-language-model.ts)).

- The provider function must not be invoked with `new` (explicitly guarded in
[src/sap-ai-provider.ts](mdc:src/sap-ai-provider.ts)).
- When adding model capabilities, ensure `SAPAILanguageModel` maintains the
`LanguageModelV3` contract (see
[src/sap-ai-language-model.ts](mdc:src/sap-ai-language-model.ts)).
36 changes: 27 additions & 9 deletions .cursor/rules/usage-and-examples.mdc
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
---
description: How to use the provider and where to find examples
---

# Usage and Examples

Start with the README’s Quick Start and Advanced sections: [README.md](mdc:README.md).
Start with the README’s Quick Start and Advanced sections:
[README.md](mdc:README.md).

## Examples

- Simple chat completion: [examples/example-simple-chat-completion.ts](mdc:examples/example-simple-chat-completion.ts)
- Tool calling: [examples/example-chat-completion-tool.ts](mdc:examples/example-chat-completion-tool.ts)
- Image recognition: [examples/example-image-recognition.ts](mdc:examples/example-image-recognition.ts)
- Text generation: [examples/example-generate-text.ts](mdc:examples/example-generate-text.ts)
- Simple chat completion:
[examples/example-simple-chat-completion.ts](mdc:examples/example-simple-chat-completion.ts)
- Tool calling:
[examples/example-chat-completion-tool.ts](mdc:examples/example-chat-completion-tool.ts)
- Image recognition:
[examples/example-image-recognition.ts](mdc:examples/example-image-recognition.ts)
- Text generation:
[examples/example-generate-text.ts](mdc:examples/example-generate-text.ts)
- Data masking:
[examples/example-data-masking.ts](mdc:examples/example-data-masking.ts)
- Streaming chat:
[examples/example-streaming-chat.ts](mdc:examples/example-streaming-chat.ts)
- Document grounding (RAG):
[examples/example-document-grounding.ts](mdc:examples/example-document-grounding.ts)
- Translation:
[examples/example-translation.ts](mdc:examples/example-translation.ts)
- Embeddings:
[examples/example-embeddings.ts](mdc:examples/example-embeddings.ts)

## Common Patterns

- Create provider with service key: `createSAPAIProvider({ serviceKey })`.
- Default instance with env token: `sapai("gpt-4o")`.
- Use with Vercel AI SDK: `generateText`, `streamText`, `generateObject`.
- Create provider: `createSAPAIProvider()` (auto-detects AICORE_SERVICE_KEY from
environment)
- With options:
`createSAPAIProvider({ resourceGroup: 'production', deploymentId: 'abc123' })`
- Default instance: `sapai("gpt-4o")` (uses default configuration)
- Use with Vercel AI SDK: `generateText`, `streamText`, `generateObject`

See exported APIs: [src/index.ts](mdc:src/index.ts)

Loading
Loading