@jerome-benoit/sap-ai-provider-v2 4.6.1 → 4.6.3

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.
Files changed (29) hide show
  1. package/dist/{chunk-HJZCRF7J.js → chunk-5FHTB5RT.js} +3 -3
  2. package/dist/{chunk-I5ZTK7M5.js → chunk-7ZKPZONG.js} +629 -770
  3. package/dist/chunk-7ZKPZONG.js.map +1 -0
  4. package/dist/{chunk-DQXZH6CW.js → chunk-IIBSUXGT.js} +3 -2
  5. package/dist/chunk-IIBSUXGT.js.map +1 -0
  6. package/dist/{chunk-IAXILSPQ.js → chunk-RHZV73MM.js} +49 -4
  7. package/dist/chunk-RHZV73MM.js.map +1 -0
  8. package/dist/{chunk-U2HDUNO7.js → chunk-WLW2XIIX.js} +2 -2
  9. package/dist/chunk-WLW2XIIX.js.map +1 -0
  10. package/dist/{foundation-models-embedding-model-strategy-C4SXGZ66.js → foundation-models-embedding-model-strategy-FHJ3PW42.js} +4 -4
  11. package/dist/{foundation-models-language-model-strategy-3D4V6PSZ.js → foundation-models-language-model-strategy-XQ24PJK4.js} +5 -5
  12. package/dist/index.cjs +674 -771
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +6 -0
  15. package/dist/index.d.ts +6 -0
  16. package/dist/index.js +6 -6
  17. package/dist/index.js.map +1 -1
  18. package/dist/{orchestration-embedding-model-strategy-7FY6NJD7.js → orchestration-embedding-model-strategy-FKAUQZH2.js} +4 -4
  19. package/dist/{orchestration-language-model-strategy-FI5HLHWP.js → orchestration-language-model-strategy-TSZQCLG3.js} +5 -5
  20. package/package.json +6 -6
  21. package/dist/chunk-DQXZH6CW.js.map +0 -1
  22. package/dist/chunk-I5ZTK7M5.js.map +0 -1
  23. package/dist/chunk-IAXILSPQ.js.map +0 -1
  24. package/dist/chunk-U2HDUNO7.js.map +0 -1
  25. /package/dist/{chunk-HJZCRF7J.js.map → chunk-5FHTB5RT.js.map} +0 -0
  26. /package/dist/{foundation-models-embedding-model-strategy-C4SXGZ66.js.map → foundation-models-embedding-model-strategy-FHJ3PW42.js.map} +0 -0
  27. /package/dist/{foundation-models-language-model-strategy-3D4V6PSZ.js.map → foundation-models-language-model-strategy-XQ24PJK4.js.map} +0 -0
  28. /package/dist/{orchestration-embedding-model-strategy-7FY6NJD7.js.map → orchestration-embedding-model-strategy-FKAUQZH2.js.map} +0 -0
  29. /package/dist/{orchestration-language-model-strategy-FI5HLHWP.js.map → orchestration-language-model-strategy-TSZQCLG3.js.map} +0 -0
@@ -1,24 +1,24 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
2
  import {
3
3
  BaseLanguageModelStrategy
4
- } from "./chunk-IAXILSPQ.js";
4
+ } from "./chunk-RHZV73MM.js";
5
5
  import {
6
6
  convertToSAPMessages
7
- } from "./chunk-DQXZH6CW.js";
7
+ } from "./chunk-IIBSUXGT.js";
8
8
  import {
9
9
  buildModelParams,
10
10
  convertResponseFormat,
11
11
  convertToolsToSAPFormat,
12
12
  hasKeys,
13
13
  mapToolChoice
14
- } from "./chunk-U2HDUNO7.js";
14
+ } from "./chunk-WLW2XIIX.js";
15
15
  import {
16
16
  deepMerge,
17
17
  getProviderName,
18
18
  normalizeHeaders,
19
19
  orchestrationConfigRefSchema,
20
20
  sapAILanguageModelProviderOptions
21
- } from "./chunk-I5ZTK7M5.js";
21
+ } from "./chunk-7ZKPZONG.js";
22
22
 
23
23
  // src/orchestration-language-model-strategy.ts
24
24
  import { parseProviderOptions } from "@ai-sdk/provider-utils";
@@ -505,4 +505,4 @@ var OrchestrationLanguageModelStrategy = class extends BaseLanguageModelStrategy
505
505
  export {
506
506
  OrchestrationLanguageModelStrategy
507
507
  };
508
- //# sourceMappingURL=orchestration-language-model-strategy-FI5HLHWP.js.map
508
+ //# sourceMappingURL=orchestration-language-model-strategy-TSZQCLG3.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jerome-benoit/sap-ai-provider-v2",
3
- "version": "4.6.1",
3
+ "version": "4.6.3",
4
4
  "type": "module",
5
5
  "description": "SAP AI Provider for Vercel AI SDK (LanguageModelV2/EmbeddingModelV2 interfaces)",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "license": "Apache-2.0",
34
34
  "author": "jerome-benoit",
35
35
  "volta": {
36
- "node": "24.14.0"
36
+ "node": "24.14.1"
37
37
  },
38
38
  "main": "./dist/index.cjs",
39
39
  "module": "./dist/index.js",
@@ -92,10 +92,10 @@
92
92
  "@edge-runtime/vm": "^5.0.0",
93
93
  "@eslint/js": "^10.0.1",
94
94
  "@types/node": "^25.5.0",
95
- "@vitest/coverage-v8": "^4.1.0",
95
+ "@vitest/coverage-v8": "^4.1.2",
96
96
  "dotenv": "^17.3.1",
97
97
  "eslint": "^10.1.0",
98
- "eslint-plugin-jsdoc": "^62.8.0",
98
+ "eslint-plugin-jsdoc": "^62.8.1",
99
99
  "eslint-plugin-perfectionist": "^5.7.0",
100
100
  "globals": "^17.4.0",
101
101
  "markdown-link-check": "^3.14.2",
@@ -105,8 +105,8 @@
105
105
  "tsup": "^8.5.1",
106
106
  "tsx": "^4.21.0",
107
107
  "typescript": "^5.9.3",
108
- "typescript-eslint": "^8.57.1",
109
- "vitest": "^4.1.0"
108
+ "typescript-eslint": "^8.57.2",
109
+ "vitest": "^4.1.2"
110
110
  },
111
111
  "peerDependencies": {
112
112
  "ai": "^5.0.0 || ^6.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/convert-to-sap-messages.ts"],"sourcesContent":["import type {\n AssistantChatMessage,\n ChatMessage,\n SystemChatMessage,\n ToolChatMessage,\n UserChatMessage,\n} from \"@sap-ai-sdk/orchestration\";\n\nimport {\n InvalidPromptError,\n LanguageModelV3Prompt,\n UnsupportedFunctionalityError,\n} from \"@ai-sdk/provider\";\nimport { Buffer } from \"node:buffer\";\n\n/**\n * Options for converting Vercel AI SDK prompts to SAP AI SDK messages.\n * @see {@link convertToSAPMessages}\n */\nexport interface ConvertToSAPMessagesOptions {\n /**\n * Whether to escape Jinja2 template delimiters (`{{`, `{%`, `{#`) in message content.\n * This prevents SAP orchestration from interpreting user content as template syntax.\n * @default true\n */\n readonly escapeTemplatePlaceholders?: boolean;\n /**\n * Whether to include assistant reasoning parts (wrapped in `<think>` tags).\n * @default false\n */\n readonly includeReasoning?: boolean;\n}\n\n/**\n * @internal\n */\nconst ZERO_WIDTH_SPACE = \"\\u200B\";\n\n/**\n * Safely serializes a value to JSON string, handling edge cases that would cause JSON.stringify to throw.\n *\n * Handles:\n * - Circular references (objects that reference themselves)\n * - BigInt values (converted to string representation)\n * - Undefined values and symbols (handled by JSON.stringify's default behavior)\n * @param value - The value to serialize.\n * @returns JSON string representation, or a fallback string representation if serialization fails.\n * @internal\n */\nfunction safeJsonStringify(value: unknown): string {\n try {\n return JSON.stringify(value, (_key, val) =>\n typeof val === \"bigint\" ? val.toString() : (val as unknown),\n );\n } catch {\n return String(value);\n }\n}\n\n/**\n * @internal\n */\nconst JINJA2_DELIMITERS_PATTERN = /\\{(?=[{%#])/g;\n\n/**\n * @internal\n */\nconst JINJA2_DELIMITERS_ESCAPED_PATTERN = new RegExp(`\\\\{${ZERO_WIDTH_SPACE}([{%#])`, \"g\");\n\n/**\n * @internal\n */\ninterface UserContentItem {\n readonly file?: {\n readonly file_data: string;\n };\n readonly image_url?: {\n readonly url: string;\n };\n readonly text?: string;\n readonly type: \"file\" | \"image_url\" | \"text\";\n}\n\n/**\n * Converts Vercel AI SDK prompt to SAP AI SDK ChatMessage array.\n *\n * Handles all Vercel AI SDK message types:\n * - `system` → `SystemChatMessage`\n * - `user` (text/images) → `UserChatMessage`\n * - `assistant` (text/tool-calls) → `AssistantChatMessage`\n * - `tool` (tool results) → `ToolChatMessage`\n * @param prompt - The Vercel AI SDK LanguageModelV3Prompt to convert.\n * @param options - Conversion options.\n * @param options.escapeTemplatePlaceholders - Whether to escape Jinja2 template delimiters (default: true).\n * @param options.includeReasoning - Whether to include assistant reasoning parts (default: false).\n * @returns SAP AI SDK ChatMessage array ready for orchestration requests.\n * @throws {UnsupportedFunctionalityError} When encountering unsupported content types or file formats.\n * @throws {InvalidPromptError} When encountering unsupported message roles.\n */\nexport function convertToSAPMessages(\n prompt: LanguageModelV3Prompt,\n options: ConvertToSAPMessagesOptions = {},\n): ChatMessage[] {\n const messages: ChatMessage[] = [];\n const includeReasoning = options.includeReasoning ?? false;\n const escapeTemplatePlaceholders = options.escapeTemplatePlaceholders ?? true;\n\n const maybeEscape = (text: string): string =>\n escapeTemplatePlaceholders ? escapeOrchestrationPlaceholders(text) : text;\n\n for (const message of prompt) {\n switch (message.role) {\n case \"assistant\": {\n let text = \"\";\n const toolCalls: {\n function: { arguments: string; name: string };\n id: string;\n type: \"function\";\n }[] = [];\n\n for (const part of message.content) {\n switch (part.type) {\n case \"reasoning\": {\n if (includeReasoning && part.text) {\n text += `<think>${maybeEscape(part.text)}</think>`;\n }\n break;\n }\n case \"text\": {\n text += maybeEscape(part.text);\n break;\n }\n case \"tool-call\": {\n // Normalize tool call input to JSON string (Vercel AI SDK provides strings or objects)\n let argumentsJson: string;\n if (typeof part.input === \"string\") {\n argumentsJson = part.input;\n } else {\n argumentsJson = JSON.stringify(part.input);\n }\n\n // Escape tool call arguments if needed (they may contain placeholder syntax)\n toolCalls.push({\n function: {\n arguments: maybeEscape(argumentsJson),\n name: part.toolName,\n },\n id: part.toolCallId,\n type: \"function\",\n });\n break;\n }\n }\n }\n\n if (text || toolCalls.length > 0) {\n const assistantMessage: AssistantChatMessage = {\n content: text,\n role: \"assistant\",\n tool_calls: toolCalls.length > 0 ? toolCalls : undefined,\n };\n messages.push(assistantMessage);\n }\n break;\n }\n\n case \"system\": {\n const systemMessage: SystemChatMessage = {\n content: maybeEscape(message.content),\n role: \"system\",\n };\n messages.push(systemMessage);\n break;\n }\n\n case \"tool\": {\n for (const part of message.content) {\n if (part.type === \"tool-result\") {\n const serializedOutput = safeJsonStringify(part.output);\n const toolMessage: ToolChatMessage = {\n content: maybeEscape(serializedOutput),\n role: \"tool\",\n tool_call_id: part.toolCallId,\n };\n messages.push(toolMessage);\n }\n }\n break;\n }\n\n case \"user\": {\n const contentParts: UserContentItem[] = [];\n\n for (const part of message.content) {\n switch (part.type) {\n case \"file\": {\n const fileDataUrl = buildDataUrl(part);\n\n if (part.mediaType.startsWith(\"image/\")) {\n const supportedFormats = [\n \"image/png\",\n \"image/jpeg\",\n \"image/jpg\",\n \"image/gif\",\n \"image/webp\",\n ];\n if (!supportedFormats.includes(part.mediaType.toLowerCase())) {\n console.warn(\n `Image format ${part.mediaType} may not be supported by all models. ` +\n `Recommended formats: PNG, JPEG, GIF, WebP`,\n );\n }\n\n contentParts.push({\n image_url: {\n url: fileDataUrl,\n },\n type: \"image_url\",\n });\n } else {\n contentParts.push({\n file: {\n file_data: fileDataUrl,\n },\n type: \"file\",\n });\n }\n break;\n }\n case \"text\": {\n contentParts.push({\n text: maybeEscape(part.text),\n type: \"text\",\n });\n break;\n }\n default: {\n throw new UnsupportedFunctionalityError({\n functionality: `Content type ${(part as { type: string }).type}`,\n });\n }\n }\n }\n\n const firstPart = contentParts[0];\n const userMessage: UserChatMessage =\n contentParts.length === 1 && firstPart?.type === \"text\"\n ? {\n content: firstPart.text ?? \"\",\n role: \"user\",\n }\n : {\n content: contentParts as UserChatMessage[\"content\"],\n role: \"user\",\n };\n\n messages.push(userMessage);\n break;\n }\n\n default: {\n const _exhaustiveCheck: never = message;\n throw new InvalidPromptError({\n message: `Unsupported role: ${(_exhaustiveCheck as { role: string }).role}`,\n prompt: JSON.stringify(message),\n });\n }\n }\n }\n\n return messages;\n}\n\n/**\n * Escapes Jinja2 template delimiters by inserting zero-width spaces.\n *\n * Converts `{{`, `{%`, `{#` to `{\\u200B{`, `{\\u200B%`, `{\\u200B#` respectively.\n * This prevents SAP orchestration from interpreting user content as template syntax.\n * @param text - The text to escape.\n * @returns The escaped text with zero-width spaces inserted.\n * @see {@link unescapeOrchestrationPlaceholders} for the reverse operation.\n */\nexport function escapeOrchestrationPlaceholders(text: string): string {\n if (!text) return text;\n return text.replaceAll(JINJA2_DELIMITERS_PATTERN, `{${ZERO_WIDTH_SPACE}`);\n}\n\n/**\n * Reverses escaping by removing zero-width spaces from template delimiters.\n *\n * Useful for processing model responses that may contain escaped delimiters.\n * @param text - The text to unescape.\n * @returns The unescaped text with zero-width spaces removed.\n * @see {@link escapeOrchestrationPlaceholders} for the escaping operation.\n */\nexport function unescapeOrchestrationPlaceholders(text: string): string {\n if (!text) return text;\n return text.replaceAll(JINJA2_DELIMITERS_ESCAPED_PATTERN, \"{$1\");\n}\n\n/**\n * Builds a data URL from a file part's data and media type.\n *\n * Supports URL, base64 string, Uint8Array, Buffer, and buffer-like objects.\n * @internal\n * @param part - The file part containing data and mediaType.\n * @param part.data - The file data as URL, base64 string, or Uint8Array.\n * @param part.mediaType - The MIME type of the file.\n * @returns The data URL string.\n * @throws {UnsupportedFunctionalityError} If the data type is not supported.\n */\nfunction buildDataUrl(part: { data: string | Uint8Array | URL; mediaType: string }): string {\n if (part.data instanceof URL) {\n return part.data.toString();\n }\n\n if (typeof part.data === \"string\") {\n return `data:${part.mediaType};base64,${part.data}`;\n }\n\n if (part.data instanceof Uint8Array) {\n const base64Data = Buffer.from(part.data).toString(\"base64\");\n return `data:${part.mediaType};base64,${base64Data}`;\n }\n\n if (Buffer.isBuffer(part.data)) {\n const base64Data = Buffer.from(part.data).toString(\"base64\");\n return `data:${part.mediaType};base64,${base64Data}`;\n }\n\n const maybeBufferLike = part.data as unknown;\n\n if (\n maybeBufferLike !== null &&\n typeof maybeBufferLike === \"object\" &&\n \"toString\" in (maybeBufferLike as Record<string, unknown>)\n ) {\n const base64Data = (\n maybeBufferLike as {\n toString: (encoding?: string) => string;\n }\n ).toString(\"base64\");\n return `data:${part.mediaType};base64,${base64Data}`;\n }\n\n throw new UnsupportedFunctionalityError({\n functionality: \"Unsupported file data type. Expected URL, base64 string,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