@jerome-benoit/sap-ai-provider 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +174 -188
- package/README.md +150 -69
- package/dist/index.cjs +140 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -147
- package/dist/index.d.ts +40 -147
- package/dist/index.js +140 -93
- package/dist/index.js.map +1 -1
- package/package.json +12 -6
package/README.md
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
[](https://sdk.vercel.ai/docs)
|
|
6
6
|
[](https://sdk.vercel.ai/docs/ai-sdk-core/provider-management)
|
|
7
7
|
|
|
8
|
-
A community provider for SAP AI Core that integrates seamlessly with the Vercel
|
|
8
|
+
A community provider for SAP AI Core that integrates seamlessly with the Vercel
|
|
9
|
+
AI SDK. Built on top of the official **@sap-ai-sdk/orchestration** package, this
|
|
10
|
+
provider enables you to use SAP's enterprise-grade AI models through the
|
|
11
|
+
familiar Vercel AI SDK interface.
|
|
9
12
|
|
|
10
13
|
## Table of Contents
|
|
11
14
|
|
|
@@ -51,16 +54,19 @@ A community provider for SAP AI Core that integrates seamlessly with the Vercel
|
|
|
51
54
|
|
|
52
55
|
## Features
|
|
53
56
|
|
|
54
|
-
- 🔐 **Simplified Authentication** - Uses SAP AI SDK's built-in credential
|
|
57
|
+
- 🔐 **Simplified Authentication** - Uses SAP AI SDK's built-in credential
|
|
58
|
+
handling
|
|
55
59
|
- 🎯 **Tool Calling Support** - Full tool/function calling capabilities
|
|
56
|
-
- 🧠 **Reasoning-Safe by Default** - Assistant reasoning parts are not forwarded
|
|
60
|
+
- 🧠 **Reasoning-Safe by Default** - Assistant reasoning parts are not forwarded
|
|
61
|
+
unless enabled
|
|
57
62
|
- 🖼️ **Multi-modal Input** - Support for text and image inputs
|
|
58
63
|
- 📡 **Streaming Support** - Real-time text generation with structured V3 blocks
|
|
59
64
|
- 🔒 **Data Masking** - Built-in SAP DPI integration for privacy
|
|
60
65
|
- 🛡️ **Content Filtering** - Azure Content Safety and Llama Guard support
|
|
61
66
|
- 🔧 **TypeScript Support** - Full type safety and IntelliSense
|
|
62
67
|
- 🎨 **Multiple Models** - Support for GPT-4, Claude, Gemini, Nova, and more
|
|
63
|
-
- ⚡ **Language Model V3** - Latest Vercel AI SDK specification with enhanced
|
|
68
|
+
- ⚡ **Language Model V3** - Latest Vercel AI SDK specification with enhanced
|
|
69
|
+
streaming
|
|
64
70
|
|
|
65
71
|
## Quick Start
|
|
66
72
|
|
|
@@ -95,7 +101,8 @@ try {
|
|
|
95
101
|
}
|
|
96
102
|
```
|
|
97
103
|
|
|
98
|
-
> **Note:** Requires `AICORE_SERVICE_KEY` environment variable. See
|
|
104
|
+
> **Note:** Requires `AICORE_SERVICE_KEY` environment variable. See
|
|
105
|
+
> [Environment Setup](./ENVIRONMENT_SETUP.md) for configuration.
|
|
99
106
|
|
|
100
107
|
## Quick Reference
|
|
101
108
|
|
|
@@ -158,11 +165,13 @@ const result = await generateText({
|
|
|
158
165
|
});
|
|
159
166
|
```
|
|
160
167
|
|
|
161
|
-
The `sapai` export provides a convenient default provider instance with
|
|
168
|
+
The `sapai` export provides a convenient default provider instance with
|
|
169
|
+
automatic configuration from environment variables or service bindings.
|
|
162
170
|
|
|
163
171
|
## Authentication
|
|
164
172
|
|
|
165
|
-
Authentication is handled automatically by the SAP AI SDK using the
|
|
173
|
+
Authentication is handled automatically by the SAP AI SDK using the
|
|
174
|
+
`AICORE_SERVICE_KEY` environment variable.
|
|
166
175
|
|
|
167
176
|
**Quick Setup:**
|
|
168
177
|
|
|
@@ -170,13 +179,15 @@ Authentication is handled automatically by the SAP AI SDK using the `AICORE_SERV
|
|
|
170
179
|
2. Add your SAP AI Core service key JSON to `AICORE_SERVICE_KEY`
|
|
171
180
|
3. Import in code: `import "dotenv/config";`
|
|
172
181
|
|
|
173
|
-
**For complete setup instructions, SAP BTP deployment, troubleshooting, and
|
|
182
|
+
**For complete setup instructions, SAP BTP deployment, troubleshooting, and
|
|
183
|
+
advanced scenarios, see the [Environment Setup Guide](./ENVIRONMENT_SETUP.md).**
|
|
174
184
|
|
|
175
185
|
## Basic Usage
|
|
176
186
|
|
|
177
187
|
### Text Generation
|
|
178
188
|
|
|
179
|
-
**Complete example:**
|
|
189
|
+
**Complete example:**
|
|
190
|
+
[examples/example-generate-text.ts](./examples/example-generate-text.ts)
|
|
180
191
|
|
|
181
192
|
```typescript
|
|
182
193
|
const result = await generateText({
|
|
@@ -190,9 +201,12 @@ console.log(result.text);
|
|
|
190
201
|
|
|
191
202
|
### Chat Conversations
|
|
192
203
|
|
|
193
|
-
**Complete example:**
|
|
204
|
+
**Complete example:**
|
|
205
|
+
[examples/example-simple-chat-completion.ts](./examples/example-simple-chat-completion.ts)
|
|
194
206
|
|
|
195
|
-
Note: assistant `reasoning` parts are dropped by default. Set
|
|
207
|
+
Note: assistant `reasoning` parts are dropped by default. Set
|
|
208
|
+
`includeReasoning: true` on the model settings if you explicitly want to forward
|
|
209
|
+
them.
|
|
196
210
|
|
|
197
211
|
```typescript
|
|
198
212
|
const result = await generateText({
|
|
@@ -211,7 +225,8 @@ const result = await generateText({
|
|
|
211
225
|
|
|
212
226
|
### Streaming Responses
|
|
213
227
|
|
|
214
|
-
**Complete example:**
|
|
228
|
+
**Complete example:**
|
|
229
|
+
[examples/example-streaming-chat.ts](./examples/example-streaming-chat.ts)
|
|
215
230
|
|
|
216
231
|
```typescript
|
|
217
232
|
const result = streamText({
|
|
@@ -254,20 +269,24 @@ const result = await generateText({
|
|
|
254
269
|
|
|
255
270
|
## Supported Models
|
|
256
271
|
|
|
257
|
-
This provider supports all models available through SAP AI Core Orchestration
|
|
272
|
+
This provider supports all models available through SAP AI Core Orchestration
|
|
273
|
+
service, including:
|
|
258
274
|
|
|
259
275
|
**Popular models:**
|
|
260
276
|
|
|
261
|
-
- **OpenAI**: gpt-4o, gpt-4o-mini, gpt-4.1, o1, o3 (recommended for
|
|
277
|
+
- **OpenAI**: gpt-4o, gpt-4o-mini, gpt-4.1, o1, o3, o4-mini (recommended for
|
|
278
|
+
multi-tool apps)
|
|
262
279
|
- **Anthropic Claude**: anthropic--claude-3.5-sonnet, anthropic--claude-4-opus
|
|
263
280
|
- **Google Gemini**: gemini-2.5-pro, gemini-2.0-flash
|
|
264
281
|
|
|
265
282
|
⚠️ **Important:** Google Gemini models have a 1 tool limit per request.
|
|
266
283
|
|
|
267
284
|
- **Amazon Nova**: amazon--nova-pro, amazon--nova-lite
|
|
268
|
-
- **Open Source**: mistralai--mistral-large-instruct,
|
|
285
|
+
- **Open Source**: mistralai--mistral-large-instruct,
|
|
286
|
+
meta--llama3.1-70b-instruct
|
|
269
287
|
|
|
270
|
-
> **Note:** Model availability depends on your SAP AI Core tenant configuration,
|
|
288
|
+
> **Note:** Model availability depends on your SAP AI Core tenant configuration,
|
|
289
|
+
> region, and subscription.
|
|
271
290
|
|
|
272
291
|
**To discover available models in your environment:**
|
|
273
292
|
|
|
@@ -275,18 +294,26 @@ This provider supports all models available through SAP AI Core Orchestration se
|
|
|
275
294
|
curl "https://<AI_API_URL>/v2/lm/deployments" -H "Authorization: Bearer $TOKEN"
|
|
276
295
|
```
|
|
277
296
|
|
|
278
|
-
For complete model details, capabilities comparison, and limitations, see
|
|
297
|
+
For complete model details, capabilities comparison, and limitations, see
|
|
298
|
+
**[API Reference: SAPAIModelId](./API_REFERENCE.md#sapaimodelid)**.
|
|
279
299
|
|
|
280
300
|
## Advanced Features
|
|
281
301
|
|
|
282
|
-
The following helper functions are exported by this package for convenient
|
|
302
|
+
The following helper functions are exported by this package for convenient
|
|
303
|
+
configuration of SAP AI Core features. These builders provide type-safe
|
|
304
|
+
configuration for data masking, content filtering, grounding, and translation
|
|
305
|
+
modules.
|
|
283
306
|
|
|
284
307
|
### Tool Calling
|
|
285
308
|
|
|
286
|
-
> **Note on Terminology:** This documentation uses "tool calling" (Vercel AI SDK
|
|
309
|
+
> **Note on Terminology:** This documentation uses "tool calling" (Vercel AI SDK
|
|
310
|
+
> convention), equivalent to "function calling" in OpenAI documentation. Both
|
|
311
|
+
> terms refer to the same capability of models invoking external functions.
|
|
287
312
|
|
|
288
|
-
📖 **Complete guide:**
|
|
289
|
-
|
|
313
|
+
📖 **Complete guide:**
|
|
314
|
+
[API Reference - Tool Calling](./API_REFERENCE.md#tool-calling-function-calling)\
|
|
315
|
+
**Complete example:**
|
|
316
|
+
[examples/example-chat-completion-tool.ts](./examples/example-chat-completion-tool.ts)
|
|
290
317
|
|
|
291
318
|
```typescript
|
|
292
319
|
const weatherTool = tool({
|
|
@@ -305,11 +332,15 @@ const result = await generateText({
|
|
|
305
332
|
|
|
306
333
|
**Run it:** `npx tsx examples/example-chat-completion-tool.ts`
|
|
307
334
|
|
|
308
|
-
⚠️ **Important:** Gemini models support only 1 tool per request. For multi-tool
|
|
335
|
+
⚠️ **Important:** Gemini models support only 1 tool per request. For multi-tool
|
|
336
|
+
applications, use GPT-4o, Claude, or Amazon Nova models. See
|
|
337
|
+
[API Reference - Tool Calling](./API_REFERENCE.md#tool-calling-function-calling)
|
|
338
|
+
for complete model comparison.
|
|
309
339
|
|
|
310
340
|
### Multi-modal Input (Images)
|
|
311
341
|
|
|
312
|
-
**Complete example:**
|
|
342
|
+
**Complete example:**
|
|
343
|
+
[examples/example-image-recognition.ts](./examples/example-image-recognition.ts)
|
|
313
344
|
|
|
314
345
|
```typescript
|
|
315
346
|
const result = await generateText({
|
|
@@ -341,13 +372,14 @@ const dpiConfig = buildDpiMaskingProvider({
|
|
|
341
372
|
});
|
|
342
373
|
```
|
|
343
374
|
|
|
344
|
-
**Full documentation:**
|
|
375
|
+
**Full documentation:**
|
|
376
|
+
[API_REFERENCE.md - Data Masking](./API_REFERENCE.md#builddpimaskingproviderconfig)
|
|
345
377
|
|
|
346
378
|
### Content Filtering
|
|
347
379
|
|
|
348
380
|
```typescript
|
|
349
381
|
import "dotenv/config"; // Load environment variables
|
|
350
|
-
import {
|
|
382
|
+
import { buildAzureContentSafetyFilter, createSAPAIProvider } from "@mymediset/sap-ai-provider";
|
|
351
383
|
|
|
352
384
|
const provider = createSAPAIProvider({
|
|
353
385
|
defaultSettings: {
|
|
@@ -365,14 +397,17 @@ const provider = createSAPAIProvider({
|
|
|
365
397
|
});
|
|
366
398
|
```
|
|
367
399
|
|
|
368
|
-
**Full documentation:**
|
|
400
|
+
**Full documentation:**
|
|
401
|
+
[API_REFERENCE.md - Content Filtering](./API_REFERENCE.md#buildazurecontentsafetyfiltertype-config)
|
|
369
402
|
|
|
370
403
|
### Document Grounding (RAG)
|
|
371
404
|
|
|
372
405
|
Ground LLM responses in your own documents using vector databases.
|
|
373
406
|
|
|
374
|
-
**Complete example:**
|
|
375
|
-
|
|
407
|
+
**Complete example:**
|
|
408
|
+
[examples/example-document-grounding.ts](./examples/example-document-grounding.ts)\
|
|
409
|
+
**Complete documentation:**
|
|
410
|
+
[API Reference - Document Grounding](./API_REFERENCE.md#builddocumentgroundingconfigconfig)
|
|
376
411
|
|
|
377
412
|
```typescript
|
|
378
413
|
const provider = createSAPAIProvider({
|
|
@@ -402,8 +437,10 @@ const model = provider("gpt-4o");
|
|
|
402
437
|
|
|
403
438
|
Automatically translate user queries and model responses.
|
|
404
439
|
|
|
405
|
-
**Complete example:**
|
|
406
|
-
|
|
440
|
+
**Complete example:**
|
|
441
|
+
[examples/example-translation.ts](./examples/example-translation.ts)\
|
|
442
|
+
**Complete documentation:**
|
|
443
|
+
[API Reference - Translation](./API_REFERENCE.md#buildtranslationconfigtype-config)
|
|
407
444
|
|
|
408
445
|
```typescript
|
|
409
446
|
const provider = createSAPAIProvider({
|
|
@@ -430,7 +467,8 @@ const model = provider("gpt-4o");
|
|
|
430
467
|
|
|
431
468
|
## Configuration Options
|
|
432
469
|
|
|
433
|
-
The provider and models can be configured with various settings for
|
|
470
|
+
The provider and models can be configured with various settings for
|
|
471
|
+
authentication, model parameters, data masking, content filtering, and more.
|
|
434
472
|
|
|
435
473
|
**Common Configuration:**
|
|
436
474
|
|
|
@@ -440,11 +478,14 @@ The provider and models can be configured with various settings for authenticati
|
|
|
440
478
|
- `masking`: SAP Data Privacy Integration (DPI) configuration
|
|
441
479
|
- `filtering`: Content safety filters (Azure Content Safety, Llama Guard)
|
|
442
480
|
|
|
443
|
-
For complete configuration reference including all available options, types, and
|
|
481
|
+
For complete configuration reference including all available options, types, and
|
|
482
|
+
examples, see
|
|
483
|
+
**[API Reference - Configuration](./API_REFERENCE.md#sapaiprovidersettings)**.
|
|
444
484
|
|
|
445
485
|
## Error Handling
|
|
446
486
|
|
|
447
|
-
The provider uses standard Vercel AI SDK error types for consistent error
|
|
487
|
+
The provider uses standard Vercel AI SDK error types for consistent error
|
|
488
|
+
handling.
|
|
448
489
|
|
|
449
490
|
**Quick Example:**
|
|
450
491
|
|
|
@@ -470,9 +511,12 @@ try {
|
|
|
470
511
|
|
|
471
512
|
**Complete reference:**
|
|
472
513
|
|
|
473
|
-
- **[API Reference - Error Handling](./API_REFERENCE.md#error-handling-examples)** -
|
|
474
|
-
|
|
475
|
-
- **[
|
|
514
|
+
- **[API Reference - Error Handling](./API_REFERENCE.md#error-handling-examples)** -
|
|
515
|
+
Complete examples with all error properties
|
|
516
|
+
- **[API Reference - HTTP Status Codes](./API_REFERENCE.md#http-status-code-reference)** -
|
|
517
|
+
Status code reference table
|
|
518
|
+
- **[Troubleshooting Guide](./TROUBLESHOOTING.md)** - Detailed solutions for
|
|
519
|
+
each error type
|
|
476
520
|
|
|
477
521
|
## Troubleshooting
|
|
478
522
|
|
|
@@ -481,9 +525,11 @@ try {
|
|
|
481
525
|
- **Authentication (401)**: Check `AICORE_SERVICE_KEY` or `VCAP_SERVICES`
|
|
482
526
|
- **Model not found (404)**: Confirm tenant/region supports the model ID
|
|
483
527
|
- **Rate limit (429)**: Automatic retry with exponential backoff
|
|
484
|
-
- **Streaming**: Iterate `textStream` correctly; don't mix `generateText` and
|
|
528
|
+
- **Streaming**: Iterate `textStream` correctly; don't mix `generateText` and
|
|
529
|
+
`streamText`
|
|
485
530
|
|
|
486
|
-
**For comprehensive troubleshooting, see
|
|
531
|
+
**For comprehensive troubleshooting, see
|
|
532
|
+
[Troubleshooting Guide](./TROUBLESHOOTING.md)** with detailed solutions for:
|
|
487
533
|
|
|
488
534
|
- [Authentication Failed (401)](./TROUBLESHOOTING.md#problem-authentication-failed-or-401-errors)
|
|
489
535
|
- [Model Not Found (404)](./TROUBLESHOOTING.md#problem-404-modeldeployment-not-found)
|
|
@@ -492,31 +538,42 @@ try {
|
|
|
492
538
|
- [Streaming Issues](./TROUBLESHOOTING.md#streaming-issues)
|
|
493
539
|
- [Tool Calling Problems](./TROUBLESHOOTING.md#tool-calling-issues)
|
|
494
540
|
|
|
495
|
-
Error code reference table:
|
|
541
|
+
Error code reference table:
|
|
542
|
+
[API Reference - HTTP Status Codes](./API_REFERENCE.md#http-status-code-reference)
|
|
496
543
|
|
|
497
544
|
## Performance
|
|
498
545
|
|
|
499
546
|
- Prefer streaming (`streamText`) for long outputs to reduce latency and memory.
|
|
500
|
-
- Tune `modelParams` carefully: lower `temperature` for deterministic results;
|
|
501
|
-
|
|
502
|
-
-
|
|
547
|
+
- Tune `modelParams` carefully: lower `temperature` for deterministic results;
|
|
548
|
+
set `maxTokens` to expected response size.
|
|
549
|
+
- Use `defaultSettings` at provider creation for shared knobs across models to
|
|
550
|
+
avoid per-call overhead.
|
|
551
|
+
- Avoid unnecessary history: keep `messages` concise to reduce prompt size and
|
|
552
|
+
cost.
|
|
503
553
|
|
|
504
554
|
## Security
|
|
505
555
|
|
|
506
|
-
- Do not commit `.env` or credentials; use environment variables and secrets
|
|
507
|
-
|
|
508
|
-
-
|
|
556
|
+
- Do not commit `.env` or credentials; use environment variables and secrets
|
|
557
|
+
managers.
|
|
558
|
+
- Treat `AICORE_SERVICE_KEY` as sensitive; avoid logging it or including in
|
|
559
|
+
crash reports.
|
|
560
|
+
- Mask PII with DPI: configure `masking.masking_providers` using
|
|
561
|
+
`buildDpiMaskingProvider()`.
|
|
509
562
|
- Validate and sanitize tool outputs before executing any side effects.
|
|
510
563
|
|
|
511
564
|
## Debug Mode
|
|
512
565
|
|
|
513
|
-
- Use the curl guide `CURL_API_TESTING_GUIDE.md` to diagnose raw API behavior
|
|
514
|
-
|
|
515
|
-
-
|
|
566
|
+
- Use the curl guide `CURL_API_TESTING_GUIDE.md` to diagnose raw API behavior
|
|
567
|
+
independent of the SDK.
|
|
568
|
+
- Log request IDs from `error.responseBody` (parse JSON for `request_id`) to
|
|
569
|
+
correlate with backend traces.
|
|
570
|
+
- Temporarily enable verbose logging in your app around provider calls; redact
|
|
571
|
+
secrets.
|
|
516
572
|
|
|
517
573
|
## Examples
|
|
518
574
|
|
|
519
|
-
The `examples/` directory contains complete, runnable examples demonstrating key
|
|
575
|
+
The `examples/` directory contains complete, runnable examples demonstrating key
|
|
576
|
+
features:
|
|
520
577
|
|
|
521
578
|
| Example | Description | Key Features |
|
|
522
579
|
| ----------------------------------- | --------------------------- | --------------------------------------- |
|
|
@@ -535,30 +592,41 @@ The `examples/` directory contains complete, runnable examples demonstrating key
|
|
|
535
592
|
npx tsx examples/example-generate-text.ts
|
|
536
593
|
```
|
|
537
594
|
|
|
538
|
-
> **Note:** Examples require `AICORE_SERVICE_KEY` environment variable. See
|
|
595
|
+
> **Note:** Examples require `AICORE_SERVICE_KEY` environment variable. See
|
|
596
|
+
> [Environment Setup](./ENVIRONMENT_SETUP.md) for configuration.
|
|
539
597
|
|
|
540
598
|
## Migration Guides
|
|
541
599
|
|
|
542
600
|
### Upgrading from v3.x to v4.x
|
|
543
601
|
|
|
544
|
-
Version 4.0 migrates from **LanguageModelV2** to **LanguageModelV3**
|
|
602
|
+
Version 4.0 migrates from **LanguageModelV2** to **LanguageModelV3**
|
|
603
|
+
specification (AI SDK 6.0+). **See the
|
|
604
|
+
[Migration Guide](./MIGRATION_GUIDE.md#version-3x-to-4x-breaking-changes) for
|
|
605
|
+
complete upgrade instructions.**
|
|
545
606
|
|
|
546
607
|
**Key changes:**
|
|
547
608
|
|
|
548
|
-
- **Finish Reason**: Changed from string to object
|
|
549
|
-
|
|
550
|
-
- **
|
|
609
|
+
- **Finish Reason**: Changed from string to object
|
|
610
|
+
(`result.finishReason.unified`)
|
|
611
|
+
- **Usage Structure**: Nested format with detailed token breakdown
|
|
612
|
+
(`result.usage.inputTokens.total`)
|
|
613
|
+
- **Stream Events**: Structured blocks (`text-start`, `text-delta`, `text-end`)
|
|
614
|
+
instead of simple deltas
|
|
551
615
|
- **Warning Types**: Updated format with `feature` field for categorization
|
|
552
616
|
|
|
553
617
|
**Impact by user type:**
|
|
554
618
|
|
|
555
|
-
- High-level API users (`generateText`/`streamText`): ✅ Minimal impact (likely
|
|
556
|
-
|
|
619
|
+
- High-level API users (`generateText`/`streamText`): ✅ Minimal impact (likely
|
|
620
|
+
no changes)
|
|
621
|
+
- Direct provider users: ⚠️ Update type imports (`LanguageModelV2` →
|
|
622
|
+
`LanguageModelV3`)
|
|
557
623
|
- Custom stream parsers: ⚠️ Update parsing logic for V3 structure
|
|
558
624
|
|
|
559
625
|
### Upgrading from v2.x to v3.x
|
|
560
626
|
|
|
561
|
-
Version 3.0 standardizes error handling to use Vercel AI SDK native error types.
|
|
627
|
+
Version 3.0 standardizes error handling to use Vercel AI SDK native error types.
|
|
628
|
+
**See the [Migration Guide](./MIGRATION_GUIDE.md#v2x--v30) for complete upgrade
|
|
629
|
+
instructions.**
|
|
562
630
|
|
|
563
631
|
**Key changes:**
|
|
564
632
|
|
|
@@ -568,7 +636,9 @@ Version 3.0 standardizes error handling to use Vercel AI SDK native error types.
|
|
|
568
636
|
|
|
569
637
|
### Upgrading from v1.x to v2.x
|
|
570
638
|
|
|
571
|
-
Version 2.0 uses the official SAP AI SDK. **See the
|
|
639
|
+
Version 2.0 uses the official SAP AI SDK. **See the
|
|
640
|
+
[Migration Guide](./MIGRATION_GUIDE.md#v1x--v20) for complete upgrade
|
|
641
|
+
instructions.**
|
|
572
642
|
|
|
573
643
|
**Key changes:**
|
|
574
644
|
|
|
@@ -576,37 +646,48 @@ Version 2.0 uses the official SAP AI SDK. **See the [Migration Guide](./MIGRATIO
|
|
|
576
646
|
- Synchronous provider creation: `createSAPAIProvider()` (no await)
|
|
577
647
|
- Helper functions from SAP AI SDK
|
|
578
648
|
|
|
579
|
-
**For detailed migration instructions with code examples, see the
|
|
649
|
+
**For detailed migration instructions with code examples, see the
|
|
650
|
+
[complete Migration Guide](./MIGRATION_GUIDE.md).**
|
|
580
651
|
|
|
581
652
|
## Important Note
|
|
582
653
|
|
|
583
|
-
> **Third-Party Provider**: This SAP AI Core provider
|
|
654
|
+
> **Third-Party Provider**: This SAP AI Core provider
|
|
655
|
+
> (`@mymediset/sap-ai-provider`) is developed and maintained by mymediset, not
|
|
656
|
+
> by SAP SE. While it uses the official SAP AI SDK and integrates with SAP AI
|
|
657
|
+
> Core services, it is not an official SAP product.
|
|
584
658
|
|
|
585
659
|
## Contributing
|
|
586
660
|
|
|
587
|
-
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md)
|
|
661
|
+
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md)
|
|
662
|
+
for details.
|
|
588
663
|
|
|
589
664
|
## Resources
|
|
590
665
|
|
|
591
666
|
### Documentation
|
|
592
667
|
|
|
593
|
-
- [Migration Guide](./MIGRATION_GUIDE.md) - Version upgrade instructions (v1.x →
|
|
594
|
-
|
|
595
|
-
- [
|
|
668
|
+
- [Migration Guide](./MIGRATION_GUIDE.md) - Version upgrade instructions (v1.x →
|
|
669
|
+
v2.x → v3.x → v4.x)
|
|
670
|
+
- [API Reference](./API_REFERENCE.md) - Complete API documentation with all
|
|
671
|
+
types and functions
|
|
672
|
+
- [Environment Setup](./ENVIRONMENT_SETUP.md) - Authentication and configuration
|
|
673
|
+
setup
|
|
596
674
|
- [Troubleshooting](./TROUBLESHOOTING.md) - Common issues and solutions
|
|
597
|
-
- [Architecture](./ARCHITECTURE.md) - Internal architecture, design decisions,
|
|
598
|
-
|
|
675
|
+
- [Architecture](./ARCHITECTURE.md) - Internal architecture, design decisions,
|
|
676
|
+
and request flows
|
|
677
|
+
- [curl API Testing](./CURL_API_TESTING_GUIDE.md) - Direct API testing for
|
|
678
|
+
debugging
|
|
599
679
|
|
|
600
680
|
### Community
|
|
601
681
|
|
|
602
|
-
- 🐛 [Issue Tracker](https://github.com/BITASIA/sap-ai-provider/issues) - Report
|
|
603
|
-
|
|
682
|
+
- 🐛 [Issue Tracker](https://github.com/BITASIA/sap-ai-provider/issues) - Report
|
|
683
|
+
bugs, request features, and ask questions
|
|
604
684
|
|
|
605
685
|
### Related Projects
|
|
606
686
|
|
|
607
687
|
- [Vercel AI SDK](https://sdk.vercel.ai/) - The AI SDK this provider extends
|
|
608
688
|
- [SAP AI SDK](https://sap.github.io/ai-sdk/) - Official SAP Cloud SDK for AI
|
|
609
|
-
- [SAP AI Core Documentation](https://help.sap.com/docs/ai-core) - Official SAP
|
|
689
|
+
- [SAP AI Core Documentation](https://help.sap.com/docs/ai-core) - Official SAP
|
|
690
|
+
AI Core docs
|
|
610
691
|
|
|
611
692
|
## License
|
|
612
693
|
|