@jerome-benoit/sap-ai-provider 4.4.14 → 4.4.15

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 (21) hide show
  1. package/dist/{chunk-U7BF2UBR.js → chunk-3JJ7OXMW.js} +2 -2
  2. package/dist/{chunk-UNZSD2AO.js → chunk-CXZSTU4M.js} +4 -4
  3. package/dist/{chunk-ZOLGAP4J.js → chunk-JV2ULRVE.js} +2 -2
  4. package/dist/{chunk-KI7PB43L.js → chunk-SD6CRCHX.js} +9 -7
  5. package/dist/chunk-SD6CRCHX.js.map +1 -0
  6. package/dist/{foundation-models-embedding-model-strategy-MOCNAFHN.js → foundation-models-embedding-model-strategy-OEKTLGZN.js} +3 -3
  7. package/dist/{foundation-models-language-model-strategy-I33LH7BS.js → foundation-models-language-model-strategy-ZCRPVWAV.js} +5 -5
  8. package/dist/index.cjs +9 -7
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.js +6 -6
  11. package/dist/{orchestration-embedding-model-strategy-RNDJFXXP.js → orchestration-embedding-model-strategy-QRHQIEEK.js} +3 -3
  12. package/dist/{orchestration-language-model-strategy-ZLUQWL3S.js → orchestration-language-model-strategy-NEW76M3M.js} +5 -5
  13. package/package.json +4 -2
  14. package/dist/chunk-KI7PB43L.js.map +0 -1
  15. /package/dist/{chunk-U7BF2UBR.js.map → chunk-3JJ7OXMW.js.map} +0 -0
  16. /package/dist/{chunk-UNZSD2AO.js.map → chunk-CXZSTU4M.js.map} +0 -0
  17. /package/dist/{chunk-ZOLGAP4J.js.map → chunk-JV2ULRVE.js.map} +0 -0
  18. /package/dist/{foundation-models-embedding-model-strategy-MOCNAFHN.js.map → foundation-models-embedding-model-strategy-OEKTLGZN.js.map} +0 -0
  19. /package/dist/{foundation-models-language-model-strategy-I33LH7BS.js.map → foundation-models-language-model-strategy-ZCRPVWAV.js.map} +0 -0
  20. /package/dist/{orchestration-embedding-model-strategy-RNDJFXXP.js.map → orchestration-embedding-model-strategy-QRHQIEEK.js.map} +0 -0
  21. /package/dist/{orchestration-language-model-strategy-ZLUQWL3S.js.map → orchestration-language-model-strategy-NEW76M3M.js.map} +0 -0
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {createRequire as __createRequire} from 'module';var require=__createRequ
2
2
  import {
3
3
  escapeOrchestrationPlaceholders,
4
4
  unescapeOrchestrationPlaceholders
5
- } from "./chunk-KI7PB43L.js";
5
+ } from "./chunk-SD6CRCHX.js";
6
6
  import {
7
7
  ApiSwitchError,
8
8
  SAP_AI_PROVIDER_NAME,
@@ -16,7 +16,7 @@ import {
16
16
  sapAILanguageModelProviderOptions,
17
17
  validateEmbeddingModelParamsSettings,
18
18
  validateModelParamsSettings
19
- } from "./chunk-ZOLGAP4J.js";
19
+ } from "./chunk-JV2ULRVE.js";
20
20
 
21
21
  // src/sap-ai-embedding-model.ts
22
22
  import { parseProviderOptions } from "@ai-sdk/provider-utils";
@@ -51,21 +51,21 @@ function getOrCreateLanguageModelStrategy(api) {
51
51
  async function createEmbeddingModelStrategy(api) {
52
52
  if (api === "foundation-models") {
53
53
  const { AzureOpenAiEmbeddingClient } = await import("@sap-ai-sdk/foundation-models");
54
- const { FoundationModelsEmbeddingModelStrategy } = await import("./foundation-models-embedding-model-strategy-MOCNAFHN.js");
54
+ const { FoundationModelsEmbeddingModelStrategy } = await import("./foundation-models-embedding-model-strategy-OEKTLGZN.js");
55
55
  return new FoundationModelsEmbeddingModelStrategy(AzureOpenAiEmbeddingClient);
56
56
  }
57
57
  const { OrchestrationEmbeddingClient: OrchestrationEmbeddingClient2 } = await import("@sap-ai-sdk/orchestration");
58
- const { OrchestrationEmbeddingModelStrategy } = await import("./orchestration-embedding-model-strategy-RNDJFXXP.js");
58
+ const { OrchestrationEmbeddingModelStrategy } = await import("./orchestration-embedding-model-strategy-QRHQIEEK.js");
59
59
  return new OrchestrationEmbeddingModelStrategy(OrchestrationEmbeddingClient2);
60
60
  }
61
61
  async function createLanguageModelStrategy(api) {
62
62
  if (api === "foundation-models") {
63
63
  const { AzureOpenAiChatClient } = await import("@sap-ai-sdk/foundation-models");
64
- const { FoundationModelsLanguageModelStrategy } = await import("./foundation-models-language-model-strategy-I33LH7BS.js");
64
+ const { FoundationModelsLanguageModelStrategy } = await import("./foundation-models-language-model-strategy-ZCRPVWAV.js");
65
65
  return new FoundationModelsLanguageModelStrategy(AzureOpenAiChatClient);
66
66
  }
67
67
  const { OrchestrationClient: OrchestrationClient2 } = await import("@sap-ai-sdk/orchestration");
68
- const { OrchestrationLanguageModelStrategy } = await import("./orchestration-language-model-strategy-ZLUQWL3S.js");
68
+ const { OrchestrationLanguageModelStrategy } = await import("./orchestration-language-model-strategy-NEW76M3M.js");
69
69
  return new OrchestrationLanguageModelStrategy(OrchestrationClient2);
70
70
  }
71
71
 
@@ -4,12 +4,12 @@ import {
4
4
  hasKeys,
5
5
  normalizeEmbedding,
6
6
  prepareEmbeddingCall
7
- } from "./chunk-U7BF2UBR.js";
7
+ } from "./chunk-3JJ7OXMW.js";
8
8
  import {
9
9
  VERSION,
10
10
  convertToAISDKError,
11
11
  deepMerge
12
- } from "./chunk-ZOLGAP4J.js";
12
+ } from "./chunk-JV2ULRVE.js";
13
13
 
14
14
  // src/orchestration-embedding-model-strategy.ts
15
15
  var OrchestrationEmbeddingModelStrategy = class {
@@ -76,4 +76,4 @@ var OrchestrationEmbeddingModelStrategy = class {
76
76
  export {
77
77
  OrchestrationEmbeddingModelStrategy
78
78
  };
79
- //# sourceMappingURL=orchestration-embedding-model-strategy-RNDJFXXP.js.map
79
+ //# sourceMappingURL=orchestration-embedding-model-strategy-QRHQIEEK.js.map
@@ -1,23 +1,23 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
2
  import {
3
3
  BaseLanguageModelStrategy
4
- } from "./chunk-UNZSD2AO.js";
4
+ } from "./chunk-CXZSTU4M.js";
5
5
  import {
6
6
  convertToSAPMessages
7
- } from "./chunk-KI7PB43L.js";
7
+ } from "./chunk-SD6CRCHX.js";
8
8
  import {
9
9
  buildModelParams,
10
10
  convertResponseFormat,
11
11
  convertToolsToSAPFormat,
12
12
  hasKeys,
13
13
  mapToolChoice
14
- } from "./chunk-U7BF2UBR.js";
14
+ } from "./chunk-3JJ7OXMW.js";
15
15
  import {
16
16
  deepMerge,
17
17
  getProviderName,
18
18
  orchestrationConfigRefSchema,
19
19
  sapAILanguageModelProviderOptions
20
- } from "./chunk-ZOLGAP4J.js";
20
+ } from "./chunk-JV2ULRVE.js";
21
21
 
22
22
  // src/orchestration-language-model-strategy.ts
23
23
  import { parseProviderOptions } from "@ai-sdk/provider-utils";
@@ -488,4 +488,4 @@ var OrchestrationLanguageModelStrategy = class extends BaseLanguageModelStrategy
488
488
  export {
489
489
  OrchestrationLanguageModelStrategy
490
490
  };
491
- //# sourceMappingURL=orchestration-language-model-strategy-ZLUQWL3S.js.map
491
+ //# sourceMappingURL=orchestration-language-model-strategy-NEW76M3M.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jerome-benoit/sap-ai-provider",
3
- "version": "4.4.14",
3
+ "version": "4.4.15",
4
4
  "type": "module",
5
5
  "description": "SAP AI Provider for Vercel AI SDK (powered by @sap-ai-sdk/orchestration and @sap-ai-sdk/foundation-models)",
6
6
  "keywords": [
@@ -58,9 +58,10 @@
58
58
  "lint": "npm run lint:md:all && eslint .",
59
59
  "lint-fix": "npm run lint:md:fix && eslint . --fix",
60
60
  "lint:md": "markdownlint -c .markdownlintrc '**/*.md'",
61
- "lint:md:all": "npm run lint:md && npm run lint:md:toc",
61
+ "lint:md:all": "npm run lint:md && npm run lint:md:toc && npm run lint:md:mermaid",
62
62
  "lint:md:fix": "markdownlint -c .markdownlintrc '**/*.md' --fix",
63
63
  "lint:md:links": "find . -name '*.md' -not -path './node_modules/*' -exec markdown-link-check -c .markdown-link-check.json {} \\;",
64
+ "lint:md:mermaid": "find . -name '*.md' -not -path './node_modules/*' -exec mermaid-validate validate-md {} \\; 2>&1 | grep -v 'No Mermaid code blocks'",
64
65
  "lint:md:toc": "tsx scripts/check-toc.ts",
65
66
  "prepare:v2": "tsx scripts/prepare-v2-package.ts",
66
67
  "prepublishOnly": "if [ \"$AI_SDK_VERSION\" = \"v2\" ]; then npm run build:v2 && npm run check-build:v2 && npm run prepare:v2; else npm run build && npm run check-build; fi",
@@ -93,6 +94,7 @@
93
94
  "globals": "^17.3.0",
94
95
  "markdown-link-check": "^3.14.2",
95
96
  "markdownlint-cli": "^0.47.0",
97
+ "mermaid-validate": "^1.3.2",
96
98
  "prettier": "^3.8.1",
97
99
  "tsup": "^8.5.1",
98
100
  "tsx": "^4.21.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 image_url?: {\n readonly url: string;\n };\n readonly text?: string;\n readonly type: \"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 const assistantMessage: AssistantChatMessage = {\n content: text || \"\",\n role: \"assistant\",\n tool_calls: toolCalls.length > 0 ? toolCalls : undefined,\n };\n messages.push(assistantMessage);\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 if (!part.mediaType.startsWith(\"image/\")) {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only image files are supported\",\n });\n }\n\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 let imageUrl: string;\n if (part.data instanceof URL) {\n imageUrl = part.data.toString();\n } else if (typeof part.data === \"string\") {\n imageUrl = `data:${part.mediaType};base64,${part.data}`;\n } else if (part.data instanceof Uint8Array) {\n const base64Data = Buffer.from(part.data).toString(\"base64\");\n imageUrl = `data:${part.mediaType};base64,${base64Data}`;\n } else if (Buffer.isBuffer(part.data)) {\n const base64Data = Buffer.from(part.data).toString(\"base64\");\n imageUrl = `data:${part.mediaType};base64,${base64Data}`;\n } else {\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 imageUrl = `data:${part.mediaType};base64,${base64Data}`;\n } else {\n throw new UnsupportedFunctionalityError({\n functionality:\n \"Unsupported file data type for image. Expected URL, base64 string, or Uint8Array.\",\n });\n }\n }\n\n contentParts.push({\n image_url: {\n url: imageUrl,\n },\n type: \"image_url\",\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"],"mappings":";;;AAQA;AAAA,EACE;AAAA,EAEA;AAAA,OACK;AACP,SAAS,cAAc;AAuBvB,IAAM,mBAAmB;AAazB,SAAS,kBAAkB,OAAwB;AACjD,MAAI;AACF,WAAO,KAAK;AAAA,MAAU;AAAA,MAAO,CAAC,MAAM,QAClC,OAAO,QAAQ,WAAW,IAAI,SAAS,IAAK;AAAA,IAC9C;AAAA,EACF,QAAQ;AACN,WAAO,OAAO,KAAK;AAAA,EACrB;AACF;AAKA,IAAM,4BAA4B;AAKlC,IAAM,oCAAoC,IAAI,OAAO,MAAM,gBAAgB,WAAW,GAAG;AA6BlF,SAAS,qBACd,QACA,UAAuC,CAAC,GACzB;AACf,QAAM,WAA0B,CAAC;AACjC,QAAM,mBAAmB,QAAQ,oBAAoB;AACrD,QAAM,6BAA6B,QAAQ,8BAA8B;AAEzE,QAAM,cAAc,CAAC,SACnB,6BAA6B,gCAAgC,IAAI,IAAI;AAEvE,aAAW,WAAW,QAAQ;AAC5B,YAAQ,QAAQ,MAAM;AAAA,MACpB,KAAK,aAAa;AAChB,YAAI,OAAO;AACX,cAAM,YAIA,CAAC;AAEP,mBAAW,QAAQ,QAAQ,SAAS;AAClC,kBAAQ,KAAK,MAAM;AAAA,YACjB,KAAK,aAAa;A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