@jerome-benoit/sap-ai-provider 3.0.0-rc.3 → 3.0.0-rc.5

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/README.md CHANGED
@@ -7,28 +7,6 @@
7
7
 
8
8
  A community provider for SAP AI Core that integrates seamlessly with the Vercel AI SDK. Built on top of the official **@sap-ai-sdk/orchestration** package, this provider enables you to use SAP's enterprise-grade AI models through the familiar Vercel AI SDK interface.
9
9
 
10
- > **Note on Terminology:** This documentation uses "tool calling" (Vercel AI SDK convention), equivalent to "function calling" in OpenAI documentation. Both terms refer to the same capability of models invoking external functions.
11
-
12
- ## ⚠️ Breaking Changes in v3.0.0-rc.1
13
-
14
- Version 3.0 standardizes error handling to use Vercel AI SDK native error types. **See the [Migration Guide](./MIGRATION_GUIDE.md#v2x--v30) for complete upgrade instructions.**
15
-
16
- **Key changes:**
17
-
18
- - `SAPAIError` removed → Use `APICallError` from `@ai-sdk/provider`
19
- - Error properties: `error.code` → `error.statusCode`
20
- - Automatic retries for rate limits (429) and server errors (5xx)
21
-
22
- ## ⚠️ Breaking Changes in v2.0
23
-
24
- Version 2.0 uses the official SAP AI SDK. **See the [Migration Guide](./MIGRATION_GUIDE.md#v1x--v20) for complete upgrade instructions.**
25
-
26
- **Key changes:**
27
-
28
- - Authentication via `AICORE_SERVICE_KEY` environment variable
29
- - Synchronous provider creation: `createSAPAIProvider()` (no await)
30
- - Helper functions from SAP AI SDK
31
-
32
10
  ## Table of Contents
33
11
 
34
12
  - [Features](#features)
@@ -41,7 +19,7 @@ Version 2.0 uses the official SAP AI SDK. **See the [Migration Guide](./MIGRATIO
41
19
  - [Configuration Options](#configuration-options)
42
20
  - [Error Handling](#error-handling)
43
21
  - [Examples](#examples)
44
- - [Migration Guides (v1→v2, v2→v3)](./MIGRATION_GUIDE.md)
22
+ - [Migration Guides](#migration-guides)
45
23
  - [Contributing](#contributing)
46
24
  - [License](#license)
47
25
 
@@ -258,6 +236,8 @@ The following helper functions are exported by this package for convenient confi
258
236
 
259
237
  ### Tool Calling
260
238
 
239
+ > **Note on Terminology:** This documentation uses "tool calling" (Vercel AI SDK convention), equivalent to "function calling" in OpenAI documentation. Both terms refer to the same capability of models invoking external functions.
240
+
261
241
  ```typescript
262
242
  import "dotenv/config"; // Load environment variables
263
243
  import { createSAPAIProvider } from "@mymediset/sap-ai-provider";
@@ -461,7 +441,29 @@ npx tsx examples/example-generate-text.ts
461
441
 
462
442
  **Note:** Examples require `AICORE_SERVICE_KEY` environment variable. See [Environment Setup](./ENVIRONMENT_SETUP.md) for configuration.
463
443
 
464
- **Upgrading from v1 or v2?** See the [Migration Guide](./MIGRATION_GUIDE.md) for detailed instructions (v1→v2, v2→v3).
444
+ ## Migration Guides
445
+
446
+ ### Upgrading from v2.x to v3.x
447
+
448
+ Version 3.0 standardizes error handling to use Vercel AI SDK native error types. **See the [Migration Guide](./MIGRATION_GUIDE.md#v2x--v30) for complete upgrade instructions.**
449
+
450
+ **Key changes:**
451
+
452
+ - `SAPAIError` removed → Use `APICallError` from `@ai-sdk/provider`
453
+ - Error properties: `error.code` → `error.statusCode`
454
+ - Automatic retries for rate limits (429) and server errors (5xx)
455
+
456
+ ### Upgrading from v1.x to v2.x
457
+
458
+ Version 2.0 uses the official SAP AI SDK. **See the [Migration Guide](./MIGRATION_GUIDE.md#v1x--v20) for complete upgrade instructions.**
459
+
460
+ **Key changes:**
461
+
462
+ - Authentication via `AICORE_SERVICE_KEY` environment variable
463
+ - Synchronous provider creation: `createSAPAIProvider()` (no await)
464
+ - Helper functions from SAP AI SDK
465
+
466
+ **For detailed migration instructions with code examples, see the [complete Migration Guide](./MIGRATION_GUIDE.md).**
465
467
 
466
468
  ## Important Note
467
469
 
package/dist/index.cjs CHANGED
@@ -29737,16 +29737,17 @@ var require_dist = __commonJS({
29737
29737
  // src/index.ts
29738
29738
  var index_exports = {};
29739
29739
  __export(index_exports, {
29740
- OrchestrationClient: () => import_orchestration4.OrchestrationClient,
29741
- OrchestrationResponse: () => import_orchestration3.OrchestrationResponse,
29742
- OrchestrationStreamChunkResponse: () => import_orchestration3.OrchestrationStreamChunkResponse,
29743
- OrchestrationStreamResponse: () => import_orchestration3.OrchestrationStreamResponse,
29740
+ OrchestrationClient: () => import_orchestration5.OrchestrationClient,
29741
+ OrchestrationResponse: () => import_orchestration4.OrchestrationResponse,
29742
+ OrchestrationStreamChunkResponse: () => import_orchestration4.OrchestrationStreamChunkResponse,
29743
+ OrchestrationStreamResponse: () => import_orchestration4.OrchestrationStreamResponse,
29744
29744
  buildAzureContentSafetyFilter: () => import_orchestration2.buildAzureContentSafetyFilter,
29745
29745
  buildDocumentGroundingConfig: () => import_orchestration2.buildDocumentGroundingConfig,
29746
29746
  buildDpiMaskingProvider: () => import_orchestration2.buildDpiMaskingProvider,
29747
29747
  buildLlamaGuard38BFilter: () => import_orchestration2.buildLlamaGuard38BFilter,
29748
29748
  buildTranslationConfig: () => import_orchestration2.buildTranslationConfig,
29749
29749
  createSAPAIProvider: () => createSAPAIProvider,
29750
+ isConfigReference: () => import_orchestration3.isConfigReference,
29750
29751
  sapai: () => sapai
29751
29752
  });
29752
29753
  module.exports = __toCommonJS(index_exports);
@@ -30909,11 +30910,14 @@ var sapai = createSAPAIProvider();
30909
30910
  // src/sap-ai-chat-settings.ts
30910
30911
  var import_orchestration2 = require("@sap-ai-sdk/orchestration");
30911
30912
 
30912
- // src/types/completion-response.ts
30913
+ // src/types/completion-request.ts
30913
30914
  var import_orchestration3 = require("@sap-ai-sdk/orchestration");
30914
30915
 
30915
- // src/index.ts
30916
+ // src/types/completion-response.ts
30916
30917
  var import_orchestration4 = require("@sap-ai-sdk/orchestration");
30918
+
30919
+ // src/index.ts
30920
+ var import_orchestration5 = require("@sap-ai-sdk/orchestration");
30917
30921
  // Annotate the CommonJS export names for ESM import in node:
30918
30922
  0 && (module.exports = {
30919
30923
  OrchestrationClient,
@@ -30926,6 +30930,7 @@ var import_orchestration4 = require("@sap-ai-sdk/orchestration");
30926
30930
  buildLlamaGuard38BFilter,
30927
30931
  buildTranslationConfig,
30928
30932
  createSAPAIProvider,
30933
+ isConfigReference,
30929
30934
  sapai
30930
30935
  });
30931
30936
  /*! Bundled license information: