beeai-framework 0.1.12 → 0.1.14

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 (73) hide show
  1. package/dist/adapters/amazon-bedrock/backend/client.cjs +3 -1
  2. package/dist/adapters/amazon-bedrock/backend/client.cjs.map +1 -1
  3. package/dist/adapters/amazon-bedrock/backend/client.js +3 -1
  4. package/dist/adapters/amazon-bedrock/backend/client.js.map +1 -1
  5. package/dist/adapters/anthropic/backend/client.cjs +3 -1
  6. package/dist/adapters/anthropic/backend/client.cjs.map +1 -1
  7. package/dist/adapters/anthropic/backend/client.js +3 -1
  8. package/dist/adapters/anthropic/backend/client.js.map +1 -1
  9. package/dist/adapters/azure-openai/backend/client.cjs +3 -1
  10. package/dist/adapters/azure-openai/backend/client.cjs.map +1 -1
  11. package/dist/adapters/azure-openai/backend/client.js +3 -1
  12. package/dist/adapters/azure-openai/backend/client.js.map +1 -1
  13. package/dist/adapters/google-vertex/backend/client.cjs +3 -1
  14. package/dist/adapters/google-vertex/backend/client.cjs.map +1 -1
  15. package/dist/adapters/google-vertex/backend/client.js +3 -1
  16. package/dist/adapters/google-vertex/backend/client.js.map +1 -1
  17. package/dist/adapters/groq/backend/client.cjs +3 -1
  18. package/dist/adapters/groq/backend/client.cjs.map +1 -1
  19. package/dist/adapters/groq/backend/client.js +3 -1
  20. package/dist/adapters/groq/backend/client.js.map +1 -1
  21. package/dist/adapters/ollama/backend/client.cjs +3 -1
  22. package/dist/adapters/ollama/backend/client.cjs.map +1 -1
  23. package/dist/adapters/ollama/backend/client.js +3 -1
  24. package/dist/adapters/ollama/backend/client.js.map +1 -1
  25. package/dist/adapters/openai/backend/client.cjs +3 -1
  26. package/dist/adapters/openai/backend/client.cjs.map +1 -1
  27. package/dist/adapters/openai/backend/client.js +3 -1
  28. package/dist/adapters/openai/backend/client.js.map +1 -1
  29. package/dist/adapters/vercel/backend/chat.cjs +7 -3
  30. package/dist/adapters/vercel/backend/chat.cjs.map +1 -1
  31. package/dist/adapters/vercel/backend/chat.js +8 -4
  32. package/dist/adapters/vercel/backend/chat.js.map +1 -1
  33. package/dist/adapters/vercel/backend/utils.cjs +82 -0
  34. package/dist/adapters/vercel/backend/utils.cjs.map +1 -0
  35. package/dist/adapters/vercel/backend/utils.d.cts +30 -0
  36. package/dist/adapters/vercel/backend/utils.d.ts +30 -0
  37. package/dist/adapters/vercel/backend/utils.js +78 -0
  38. package/dist/adapters/vercel/backend/utils.js.map +1 -0
  39. package/dist/{agent-2C0Z9iYa.d.cts → agent-B60_2RXt.d.cts} +1 -1
  40. package/dist/{agent-DN_52QhH.d.ts → agent-BgLMNZbc.d.ts} +1 -1
  41. package/dist/agents/experimental/remote/agent.cjs +107 -61
  42. package/dist/agents/experimental/remote/agent.cjs.map +1 -1
  43. package/dist/agents/experimental/remote/agent.d.cts +37 -34
  44. package/dist/agents/experimental/remote/agent.d.ts +37 -34
  45. package/dist/agents/experimental/remote/agent.js +108 -62
  46. package/dist/agents/experimental/remote/agent.js.map +1 -1
  47. package/dist/agents/react/agent.d.cts +1 -1
  48. package/dist/agents/react/agent.d.ts +1 -1
  49. package/dist/agents/react/runners/base.d.cts +1 -1
  50. package/dist/agents/react/runners/base.d.ts +1 -1
  51. package/dist/agents/react/runners/deep-think/runner.d.cts +1 -1
  52. package/dist/agents/react/runners/deep-think/runner.d.ts +1 -1
  53. package/dist/agents/react/runners/default/runner.d.cts +1 -1
  54. package/dist/agents/react/runners/default/runner.d.ts +1 -1
  55. package/dist/agents/react/runners/granite/runner.d.cts +1 -1
  56. package/dist/agents/react/runners/granite/runner.d.ts +1 -1
  57. package/dist/internals/fetcher.cjs +31 -8
  58. package/dist/internals/fetcher.cjs.map +1 -1
  59. package/dist/internals/fetcher.d.cts +5 -3
  60. package/dist/internals/fetcher.d.ts +5 -3
  61. package/dist/internals/fetcher.js +32 -9
  62. package/dist/internals/fetcher.js.map +1 -1
  63. package/dist/tools/database/milvus.d.cts +2 -2
  64. package/dist/tools/database/milvus.d.ts +2 -2
  65. package/dist/tools/database/qdrant.cjs +174 -0
  66. package/dist/tools/database/qdrant.cjs.map +1 -0
  67. package/dist/tools/database/qdrant.d.cts +86 -0
  68. package/dist/tools/database/qdrant.d.ts +86 -0
  69. package/dist/tools/database/qdrant.js +171 -0
  70. package/dist/tools/database/qdrant.js.map +1 -0
  71. package/dist/version.cjs +1 -1
  72. package/dist/version.js +1 -1
  73. package/package.json +8 -8
@@ -2,6 +2,7 @@
2
2
 
3
3
  var amazonBedrock = require('@ai-sdk/amazon-bedrock');
4
4
  var client_cjs = require('../../../backend/client.cjs');
5
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
5
6
 
6
7
  var __defProp = Object.defineProperty;
7
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -11,7 +12,8 @@ class AmazonBedrockClient extends client_cjs.BackendClient {
11
12
  }
12
13
  create() {
13
14
  return amazonBedrock.createAmazonBedrock({
14
- ...this.settings
15
+ ...this.settings,
16
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
15
17
  });
16
18
  }
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AmazonBedrockClient","BackendClient","create","createAmazonBedrock","settings"],"mappings":";;;;;;;AAyBO,MAAMA,4BAA4BC,wBAAAA,CAAAA;EAzBzC;;;EA6BYC,MAAgC,GAAA;AACxC,IAAA,OAAOC,iCAAoB,CAAA;AACzB,MAAA,GAAG,IAAKC,CAAAA;KACV,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createAmazonBedrock,\n AmazonBedrockProviderSettings,\n AmazonBedrockProvider,\n} from \"@ai-sdk/amazon-bedrock\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type AmazonBedrockClientSettings = AmazonBedrockProviderSettings;\n\nexport class AmazonBedrockClient extends BackendClient<\n AmazonBedrockClientSettings,\n AmazonBedrockProvider\n> {\n protected create(): AmazonBedrockProvider {\n return createAmazonBedrock({\n ...this.settings,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AmazonBedrockClient","BackendClient","create","createAmazonBedrock","settings","fetch","vercelFetcher"],"mappings":";;;;;;;;AA0BO,MAAMA,4BAA4BC,wBAAAA,CAAAA;EA1BzC;;;EA8BYC,MAAgC,GAAA;AACxC,IAAA,OAAOC,iCAAoB,CAAA;AACzB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;MACRC,KAAOC,EAAAA,uBAAAA,CAAc,IAAKF,CAAAA,QAAAA,EAAUC,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createAmazonBedrock,\n AmazonBedrockProviderSettings,\n AmazonBedrockProvider,\n} from \"@ai-sdk/amazon-bedrock\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AmazonBedrockClientSettings = AmazonBedrockProviderSettings;\n\nexport class AmazonBedrockClient extends BackendClient<\n AmazonBedrockClientSettings,\n AmazonBedrockProvider\n> {\n protected create(): AmazonBedrockProvider {\n return createAmazonBedrock({\n ...this.settings,\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
2
2
  import { BackendClient } from '../../../backend/client.js';
3
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
3
4
 
4
5
  var __defProp = Object.defineProperty;
5
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -9,7 +10,8 @@ class AmazonBedrockClient extends BackendClient {
9
10
  }
10
11
  create() {
11
12
  return createAmazonBedrock({
12
- ...this.settings
13
+ ...this.settings,
14
+ fetch: vercelFetcher(this.settings?.fetch)
13
15
  });
14
16
  }
15
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AmazonBedrockClient","BackendClient","create","createAmazonBedrock","settings"],"mappings":";;;;;AAyBO,MAAMA,4BAA4BC,aAAAA,CAAAA;EAzBzC;;;EA6BYC,MAAgC,GAAA;AACxC,IAAA,OAAOC,mBAAoB,CAAA;AACzB,MAAA,GAAG,IAAKC,CAAAA;KACV,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createAmazonBedrock,\n AmazonBedrockProviderSettings,\n AmazonBedrockProvider,\n} from \"@ai-sdk/amazon-bedrock\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type AmazonBedrockClientSettings = AmazonBedrockProviderSettings;\n\nexport class AmazonBedrockClient extends BackendClient<\n AmazonBedrockClientSettings,\n AmazonBedrockProvider\n> {\n protected create(): AmazonBedrockProvider {\n return createAmazonBedrock({\n ...this.settings,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AmazonBedrockClient","BackendClient","create","createAmazonBedrock","settings","fetch","vercelFetcher"],"mappings":";;;;;;AA0BO,MAAMA,4BAA4BC,aAAAA,CAAAA;EA1BzC;;;EA8BYC,MAAgC,GAAA;AACxC,IAAA,OAAOC,mBAAoB,CAAA;AACzB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;MACRC,KAAOC,EAAAA,aAAAA,CAAc,IAAKF,CAAAA,QAAAA,EAAUC,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createAmazonBedrock,\n AmazonBedrockProviderSettings,\n AmazonBedrockProvider,\n} from \"@ai-sdk/amazon-bedrock\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AmazonBedrockClientSettings = AmazonBedrockProviderSettings;\n\nexport class AmazonBedrockClient extends BackendClient<\n AmazonBedrockClientSettings,\n AmazonBedrockProvider\n> {\n protected create(): AmazonBedrockProvider {\n return createAmazonBedrock({\n ...this.settings,\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -4,6 +4,7 @@ var anthropic = require('@ai-sdk/anthropic');
4
4
  var client_cjs = require('../../../backend/client.cjs');
5
5
  var env_cjs = require('../../../internals/env.cjs');
6
6
  var zod = require('zod');
7
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
7
8
 
8
9
  var __defProp = Object.defineProperty;
9
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -22,7 +23,8 @@ class AnthropicClient extends client_cjs.BackendClient {
22
23
  headers: {
23
24
  ...extraHeaders,
24
25
  ...this.settings?.headers
25
- }
26
+ },
27
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
26
28
  });
27
29
  }
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AnthropicClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","createAnthropic","settings","baseURL","getEnv","apiKey","headers"],"mappings":";;;;;;;;;AAuBO,MAAMA,wBAAwBC,wBAAAA,CAAAA;EAvBrC;;;EAwBYC,MAA4B,GAAA;AACpC,IAAA,MAAMC,eAAeC,gBACnB,CAAA,uBAAA,EACAC,KAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,MAAEW,MAAOX,CAAAA,KAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,OAAOC,yBAAgB,CAAA;AACrB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,wBAAA,CAAA;AAC1CC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,cAAAA,CAAO,mBAAA,CAAA;MACvCE,OAAS,EAAA;QACP,GAAGpB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUI,EAAAA;AACpB;KACF,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createAnthropic, AnthropicProvider, AnthropicProviderSettings } from \"@ai-sdk/anthropic\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\n\nexport type AnthropicClientSettings = AnthropicProviderSettings;\n\nexport class AnthropicClient extends BackendClient<AnthropicClientSettings, AnthropicProvider> {\n protected create(): AnthropicProvider {\n const extraHeaders = parseEnv(\n \"ANTHROPIC_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n return createAnthropic({\n ...this.settings,\n baseURL: this.settings?.baseURL || getEnv(\"ANTHROPIC_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"ANTHROPIC_API_KEY\"),\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AnthropicClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","createAnthropic","settings","baseURL","getEnv","apiKey","headers","fetch","vercelFetcher"],"mappings":";;;;;;;;;;AAwBO,MAAMA,wBAAwBC,wBAAAA,CAAAA;EAxBrC;;;EAyBYC,MAA4B,GAAA;AACpC,IAAA,MAAMC,eAAeC,gBACnB,CAAA,uBAAA,EACAC,KAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,MAAEW,MAAOX,CAAAA,KAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,OAAOC,yBAAgB,CAAA;AACrB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,wBAAA,CAAA;AAC1CC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,cAAAA,CAAO,mBAAA,CAAA;MACvCE,OAAS,EAAA;QACP,GAAGpB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUI,EAAAA;AACpB,OAAA;MACAC,KAAOC,EAAAA,uBAAAA,CAAc,IAAKN,CAAAA,QAAAA,EAAUK,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createAnthropic, AnthropicProvider, AnthropicProviderSettings } from \"@ai-sdk/anthropic\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AnthropicClientSettings = AnthropicProviderSettings;\n\nexport class AnthropicClient extends BackendClient<AnthropicClientSettings, AnthropicProvider> {\n protected create(): AnthropicProvider {\n const extraHeaders = parseEnv(\n \"ANTHROPIC_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n return createAnthropic({\n ...this.settings,\n baseURL: this.settings?.baseURL || getEnv(\"ANTHROPIC_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"ANTHROPIC_API_KEY\"),\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -2,6 +2,7 @@ import { createAnthropic } from '@ai-sdk/anthropic';
2
2
  import { BackendClient } from '../../../backend/client.js';
3
3
  import { parseEnv, getEnv } from '../../../internals/env.js';
4
4
  import { z } from 'zod';
5
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
5
6
 
6
7
  var __defProp = Object.defineProperty;
7
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -20,7 +21,8 @@ class AnthropicClient extends BackendClient {
20
21
  headers: {
21
22
  ...extraHeaders,
22
23
  ...this.settings?.headers
23
- }
24
+ },
25
+ fetch: vercelFetcher(this.settings?.fetch)
24
26
  });
25
27
  }
26
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AnthropicClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","createAnthropic","settings","baseURL","getEnv","apiKey","headers"],"mappings":";;;;;;;AAuBO,MAAMA,wBAAwBC,aAAAA,CAAAA;EAvBrC;;;EAwBYC,MAA4B,GAAA;AACpC,IAAA,MAAMC,eAAeC,QACnB,CAAA,uBAAA,EACAC,CAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,EAAEW,MAAOX,CAAAA,CAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,OAAOC,eAAgB,CAAA;AACrB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,wBAAA,CAAA;AAC1CC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,MAAAA,CAAO,mBAAA,CAAA;MACvCE,OAAS,EAAA;QACP,GAAGpB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUI,EAAAA;AACpB;KACF,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createAnthropic, AnthropicProvider, AnthropicProviderSettings } from \"@ai-sdk/anthropic\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\n\nexport type AnthropicClientSettings = AnthropicProviderSettings;\n\nexport class AnthropicClient extends BackendClient<AnthropicClientSettings, AnthropicProvider> {\n protected create(): AnthropicProvider {\n const extraHeaders = parseEnv(\n \"ANTHROPIC_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n return createAnthropic({\n ...this.settings,\n baseURL: this.settings?.baseURL || getEnv(\"ANTHROPIC_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"ANTHROPIC_API_KEY\"),\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AnthropicClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","createAnthropic","settings","baseURL","getEnv","apiKey","headers","fetch","vercelFetcher"],"mappings":";;;;;;;;AAwBO,MAAMA,wBAAwBC,aAAAA,CAAAA;EAxBrC;;;EAyBYC,MAA4B,GAAA;AACpC,IAAA,MAAMC,eAAeC,QACnB,CAAA,uBAAA,EACAC,CAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,EAAEW,MAAOX,CAAAA,CAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,OAAOC,eAAgB,CAAA;AACrB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,wBAAA,CAAA;AAC1CC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,MAAAA,CAAO,mBAAA,CAAA;MACvCE,OAAS,EAAA;QACP,GAAGpB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUI,EAAAA;AACpB,OAAA;MACAC,KAAOC,EAAAA,aAAAA,CAAc,IAAKN,CAAAA,QAAAA,EAAUK,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createAnthropic, AnthropicProvider, AnthropicProviderSettings } from \"@ai-sdk/anthropic\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AnthropicClientSettings = AnthropicProviderSettings;\n\nexport class AnthropicClient extends BackendClient<AnthropicClientSettings, AnthropicProvider> {\n protected create(): AnthropicProvider {\n const extraHeaders = parseEnv(\n \"ANTHROPIC_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n return createAnthropic({\n ...this.settings,\n baseURL: this.settings?.baseURL || getEnv(\"ANTHROPIC_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"ANTHROPIC_API_KEY\"),\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  var azure = require('@ai-sdk/azure');
4
4
  var env_cjs = require('../../../internals/env.cjs');
5
5
  var client_cjs = require('../../../backend/client.cjs');
6
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
6
7
 
7
8
  var __defProp = Object.defineProperty;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -16,7 +17,8 @@ class AzureOpenAIClient extends client_cjs.BackendClient {
16
17
  apiKey: this.settings.apiKey || env_cjs.getEnv("AZURE_OPENAI_API_KEY"),
17
18
  baseURL: this.settings.baseURL || env_cjs.getEnv("AZURE_OPENAI_API_ENDPOINT"),
18
19
  resourceName: this.settings.resourceName || env_cjs.getEnv("AZURE_OPENAI_API_RESOURCE"),
19
- apiVersion: this.settings.apiVersion || env_cjs.getEnv("AZURE_OPENAI_API_VERSION")
20
+ apiVersion: this.settings.apiVersion || env_cjs.getEnv("AZURE_OPENAI_API_VERSION"),
21
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
20
22
  });
21
23
  }
22
24
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AzureOpenAIClient","BackendClient","create","createAzure","settings","apiKey","getEnv","baseURL","resourceName","apiVersion"],"mappings":";;;;;;;;AAsBO,MAAMA,0BAA0BC,wBAAAA,CAAAA;EAtBvC;;;EA0BYC,MAA8B,GAAA;AACtC,IAAA,OAAOC,iBAAY,CAAA;AACjB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,MAAAA,EAAQ,IAAKD,CAAAA,QAAAA,CAASC,MAAUC,IAAAA,cAAAA,CAAO,sBAAA,CAAA;AACvCC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,CAASG,OAAWD,IAAAA,cAAAA,CAAO,2BAAA,CAAA;AACzCE,MAAAA,YAAAA,EAAc,IAAKJ,CAAAA,QAAAA,CAASI,YAAgBF,IAAAA,cAAAA,CAAO,2BAAA,CAAA;AACnDG,MAAAA,UAAAA,EAAY,IAAKL,CAAAA,QAAAA,CAASK,UAAcH,IAAAA,cAAAA,CAAO,0BAAA;KACjD,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AzureOpenAIProvider, AzureOpenAIProviderSettings, createAzure } from \"@ai-sdk/azure\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type AzureOpenAIClientSettings = AzureOpenAIProviderSettings;\n\nexport class AzureOpenAIClient extends BackendClient<\n AzureOpenAIClientSettings,\n AzureOpenAIProvider\n> {\n protected create(): AzureOpenAIProvider {\n return createAzure({\n ...this.settings,\n apiKey: this.settings.apiKey || getEnv(\"AZURE_OPENAI_API_KEY\"),\n baseURL: this.settings.baseURL || getEnv(\"AZURE_OPENAI_API_ENDPOINT\"),\n resourceName: this.settings.resourceName || getEnv(\"AZURE_OPENAI_API_RESOURCE\"),\n apiVersion: this.settings.apiVersion || getEnv(\"AZURE_OPENAI_API_VERSION\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AzureOpenAIClient","BackendClient","create","createAzure","settings","apiKey","getEnv","baseURL","resourceName","apiVersion","fetch","vercelFetcher"],"mappings":";;;;;;;;;AAuBO,MAAMA,0BAA0BC,wBAAAA,CAAAA;EAvBvC;;;EA2BYC,MAA8B,GAAA;AACtC,IAAA,OAAOC,iBAAY,CAAA;AACjB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,MAAAA,EAAQ,IAAKD,CAAAA,QAAAA,CAASC,MAAUC,IAAAA,cAAAA,CAAO,sBAAA,CAAA;AACvCC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,CAASG,OAAWD,IAAAA,cAAAA,CAAO,2BAAA,CAAA;AACzCE,MAAAA,YAAAA,EAAc,IAAKJ,CAAAA,QAAAA,CAASI,YAAgBF,IAAAA,cAAAA,CAAO,2BAAA,CAAA;AACnDG,MAAAA,UAAAA,EAAY,IAAKL,CAAAA,QAAAA,CAASK,UAAcH,IAAAA,cAAAA,CAAO,0BAAA,CAAA;MAC/CI,KAAOC,EAAAA,uBAAAA,CAAc,IAAKP,CAAAA,QAAAA,EAAUM,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AzureOpenAIProvider, AzureOpenAIProviderSettings, createAzure } from \"@ai-sdk/azure\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AzureOpenAIClientSettings = AzureOpenAIProviderSettings;\n\nexport class AzureOpenAIClient extends BackendClient<\n AzureOpenAIClientSettings,\n AzureOpenAIProvider\n> {\n protected create(): AzureOpenAIProvider {\n return createAzure({\n ...this.settings,\n apiKey: this.settings.apiKey || getEnv(\"AZURE_OPENAI_API_KEY\"),\n baseURL: this.settings.baseURL || getEnv(\"AZURE_OPENAI_API_ENDPOINT\"),\n resourceName: this.settings.resourceName || getEnv(\"AZURE_OPENAI_API_RESOURCE\"),\n apiVersion: this.settings.apiVersion || getEnv(\"AZURE_OPENAI_API_VERSION\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { createAzure } from '@ai-sdk/azure';
2
2
  import { getEnv } from '../../../internals/env.js';
3
3
  import { BackendClient } from '../../../backend/client.js';
4
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -14,7 +15,8 @@ class AzureOpenAIClient extends BackendClient {
14
15
  apiKey: this.settings.apiKey || getEnv("AZURE_OPENAI_API_KEY"),
15
16
  baseURL: this.settings.baseURL || getEnv("AZURE_OPENAI_API_ENDPOINT"),
16
17
  resourceName: this.settings.resourceName || getEnv("AZURE_OPENAI_API_RESOURCE"),
17
- apiVersion: this.settings.apiVersion || getEnv("AZURE_OPENAI_API_VERSION")
18
+ apiVersion: this.settings.apiVersion || getEnv("AZURE_OPENAI_API_VERSION"),
19
+ fetch: vercelFetcher(this.settings?.fetch)
18
20
  });
19
21
  }
20
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["AzureOpenAIClient","BackendClient","create","createAzure","settings","apiKey","getEnv","baseURL","resourceName","apiVersion"],"mappings":";;;;;;AAsBO,MAAMA,0BAA0BC,aAAAA,CAAAA;EAtBvC;;;EA0BYC,MAA8B,GAAA;AACtC,IAAA,OAAOC,WAAY,CAAA;AACjB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,MAAAA,EAAQ,IAAKD,CAAAA,QAAAA,CAASC,MAAUC,IAAAA,MAAAA,CAAO,sBAAA,CAAA;AACvCC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,CAASG,OAAWD,IAAAA,MAAAA,CAAO,2BAAA,CAAA;AACzCE,MAAAA,YAAAA,EAAc,IAAKJ,CAAAA,QAAAA,CAASI,YAAgBF,IAAAA,MAAAA,CAAO,2BAAA,CAAA;AACnDG,MAAAA,UAAAA,EAAY,IAAKL,CAAAA,QAAAA,CAASK,UAAcH,IAAAA,MAAAA,CAAO,0BAAA;KACjD,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AzureOpenAIProvider, AzureOpenAIProviderSettings, createAzure } from \"@ai-sdk/azure\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type AzureOpenAIClientSettings = AzureOpenAIProviderSettings;\n\nexport class AzureOpenAIClient extends BackendClient<\n AzureOpenAIClientSettings,\n AzureOpenAIProvider\n> {\n protected create(): AzureOpenAIProvider {\n return createAzure({\n ...this.settings,\n apiKey: this.settings.apiKey || getEnv(\"AZURE_OPENAI_API_KEY\"),\n baseURL: this.settings.baseURL || getEnv(\"AZURE_OPENAI_API_ENDPOINT\"),\n resourceName: this.settings.resourceName || getEnv(\"AZURE_OPENAI_API_RESOURCE\"),\n apiVersion: this.settings.apiVersion || getEnv(\"AZURE_OPENAI_API_VERSION\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["AzureOpenAIClient","BackendClient","create","createAzure","settings","apiKey","getEnv","baseURL","resourceName","apiVersion","fetch","vercelFetcher"],"mappings":";;;;;;;AAuBO,MAAMA,0BAA0BC,aAAAA,CAAAA;EAvBvC;;;EA2BYC,MAA8B,GAAA;AACtC,IAAA,OAAOC,WAAY,CAAA;AACjB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,MAAAA,EAAQ,IAAKD,CAAAA,QAAAA,CAASC,MAAUC,IAAAA,MAAAA,CAAO,sBAAA,CAAA;AACvCC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,CAASG,OAAWD,IAAAA,MAAAA,CAAO,2BAAA,CAAA;AACzCE,MAAAA,YAAAA,EAAc,IAAKJ,CAAAA,QAAAA,CAASI,YAAgBF,IAAAA,MAAAA,CAAO,2BAAA,CAAA;AACnDG,MAAAA,UAAAA,EAAY,IAAKL,CAAAA,QAAAA,CAASK,UAAcH,IAAAA,MAAAA,CAAO,0BAAA,CAAA;MAC/CI,KAAOC,EAAAA,aAAAA,CAAc,IAAKP,CAAAA,QAAAA,EAAUM,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AzureOpenAIProvider, AzureOpenAIProviderSettings, createAzure } from \"@ai-sdk/azure\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type AzureOpenAIClientSettings = AzureOpenAIProviderSettings;\n\nexport class AzureOpenAIClient extends BackendClient<\n AzureOpenAIClientSettings,\n AzureOpenAIProvider\n> {\n protected create(): AzureOpenAIProvider {\n return createAzure({\n ...this.settings,\n apiKey: this.settings.apiKey || getEnv(\"AZURE_OPENAI_API_KEY\"),\n baseURL: this.settings.baseURL || getEnv(\"AZURE_OPENAI_API_ENDPOINT\"),\n resourceName: this.settings.resourceName || getEnv(\"AZURE_OPENAI_API_RESOURCE\"),\n apiVersion: this.settings.apiVersion || getEnv(\"AZURE_OPENAI_API_VERSION\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  var env_cjs = require('../../../internals/env.cjs');
4
4
  var googleVertex = require('@ai-sdk/google-vertex');
5
5
  var client_cjs = require('../../../backend/client.cjs');
6
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
6
7
 
7
8
  var __defProp = Object.defineProperty;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -15,7 +16,8 @@ class GoogleVertexClient extends client_cjs.BackendClient {
15
16
  ...this.settings,
16
17
  project: this.settings?.project || env_cjs.getEnv("GOOGLE_VERTEX_PROJECT"),
17
18
  baseURL: this.settings?.baseURL || env_cjs.getEnv("GOOGLE_VERTEX_ENDPOINT"),
18
- location: this.settings?.location || env_cjs.getEnv("GOOGLE_VERTEX_LOCATION")
19
+ location: this.settings?.location || env_cjs.getEnv("GOOGLE_VERTEX_LOCATION"),
20
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
19
21
  });
20
22
  }
21
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["GoogleVertexClient","BackendClient","create","createVertex","settings","project","getEnv","baseURL","location"],"mappings":";;;;;;;;AA0BO,MAAMA,2BAA2BC,wBAAAA,CAAAA;EA1BxC;;;EA8BYC,MAA+B,GAAA;AACvC,IAAA,OAAOC,yBAAa,CAAA;AAClB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,uBAAA,CAAA;AAC1CC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,EAAUG,OAAWD,IAAAA,cAAAA,CAAO,wBAAA,CAAA;AAC1CE,MAAAA,QAAAA,EAAU,IAAKJ,CAAAA,QAAAA,EAAUI,QAAYF,IAAAA,cAAAA,CAAO,wBAAA;KAC9C,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport {\n createVertex,\n GoogleVertexProvider,\n GoogleVertexProviderSettings,\n} from \"@ai-sdk/google-vertex\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type GoogleVertexClientSettings = GoogleVertexProviderSettings;\n\nexport class GoogleVertexClient extends BackendClient<\n GoogleVertexClientSettings,\n GoogleVertexProvider\n> {\n protected create(): GoogleVertexProvider {\n return createVertex({\n ...this.settings,\n project: this.settings?.project || getEnv(\"GOOGLE_VERTEX_PROJECT\"),\n baseURL: this.settings?.baseURL || getEnv(\"GOOGLE_VERTEX_ENDPOINT\"),\n location: this.settings?.location || getEnv(\"GOOGLE_VERTEX_LOCATION\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["GoogleVertexClient","BackendClient","create","createVertex","settings","project","getEnv","baseURL","location","fetch","vercelFetcher"],"mappings":";;;;;;;;;AA2BO,MAAMA,2BAA2BC,wBAAAA,CAAAA;EA3BxC;;;EA+BYC,MAA+B,GAAA;AACvC,IAAA,OAAOC,yBAAa,CAAA;AAClB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,uBAAA,CAAA;AAC1CC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,EAAUG,OAAWD,IAAAA,cAAAA,CAAO,wBAAA,CAAA;AAC1CE,MAAAA,QAAAA,EAAU,IAAKJ,CAAAA,QAAAA,EAAUI,QAAYF,IAAAA,cAAAA,CAAO,wBAAA,CAAA;MAC5CG,KAAOC,EAAAA,uBAAAA,CAAc,IAAKN,CAAAA,QAAAA,EAAUK,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport {\n createVertex,\n GoogleVertexProvider,\n GoogleVertexProviderSettings,\n} from \"@ai-sdk/google-vertex\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type GoogleVertexClientSettings = GoogleVertexProviderSettings;\n\nexport class GoogleVertexClient extends BackendClient<\n GoogleVertexClientSettings,\n GoogleVertexProvider\n> {\n protected create(): GoogleVertexProvider {\n return createVertex({\n ...this.settings,\n project: this.settings?.project || getEnv(\"GOOGLE_VERTEX_PROJECT\"),\n baseURL: this.settings?.baseURL || getEnv(\"GOOGLE_VERTEX_ENDPOINT\"),\n location: this.settings?.location || getEnv(\"GOOGLE_VERTEX_LOCATION\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { getEnv } from '../../../internals/env.js';
2
2
  import { createVertex } from '@ai-sdk/google-vertex';
3
3
  import { BackendClient } from '../../../backend/client.js';
4
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -13,7 +14,8 @@ class GoogleVertexClient extends BackendClient {
13
14
  ...this.settings,
14
15
  project: this.settings?.project || getEnv("GOOGLE_VERTEX_PROJECT"),
15
16
  baseURL: this.settings?.baseURL || getEnv("GOOGLE_VERTEX_ENDPOINT"),
16
- location: this.settings?.location || getEnv("GOOGLE_VERTEX_LOCATION")
17
+ location: this.settings?.location || getEnv("GOOGLE_VERTEX_LOCATION"),
18
+ fetch: vercelFetcher(this.settings?.fetch)
17
19
  });
18
20
  }
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["GoogleVertexClient","BackendClient","create","createVertex","settings","project","getEnv","baseURL","location"],"mappings":";;;;;;AA0BO,MAAMA,2BAA2BC,aAAAA,CAAAA;EA1BxC;;;EA8BYC,MAA+B,GAAA;AACvC,IAAA,OAAOC,YAAa,CAAA;AAClB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,uBAAA,CAAA;AAC1CC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,EAAUG,OAAWD,IAAAA,MAAAA,CAAO,wBAAA,CAAA;AAC1CE,MAAAA,QAAAA,EAAU,IAAKJ,CAAAA,QAAAA,EAAUI,QAAYF,IAAAA,MAAAA,CAAO,wBAAA;KAC9C,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport {\n createVertex,\n GoogleVertexProvider,\n GoogleVertexProviderSettings,\n} from \"@ai-sdk/google-vertex\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type GoogleVertexClientSettings = GoogleVertexProviderSettings;\n\nexport class GoogleVertexClient extends BackendClient<\n GoogleVertexClientSettings,\n GoogleVertexProvider\n> {\n protected create(): GoogleVertexProvider {\n return createVertex({\n ...this.settings,\n project: this.settings?.project || getEnv(\"GOOGLE_VERTEX_PROJECT\"),\n baseURL: this.settings?.baseURL || getEnv(\"GOOGLE_VERTEX_ENDPOINT\"),\n location: this.settings?.location || getEnv(\"GOOGLE_VERTEX_LOCATION\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["GoogleVertexClient","BackendClient","create","createVertex","settings","project","getEnv","baseURL","location","fetch","vercelFetcher"],"mappings":";;;;;;;AA2BO,MAAMA,2BAA2BC,aAAAA,CAAAA;EA3BxC;;;EA+BYC,MAA+B,GAAA;AACvC,IAAA,OAAOC,YAAa,CAAA;AAClB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,uBAAA,CAAA;AAC1CC,MAAAA,OAAAA,EAAS,IAAKH,CAAAA,QAAAA,EAAUG,OAAWD,IAAAA,MAAAA,CAAO,wBAAA,CAAA;AAC1CE,MAAAA,QAAAA,EAAU,IAAKJ,CAAAA,QAAAA,EAAUI,QAAYF,IAAAA,MAAAA,CAAO,wBAAA,CAAA;MAC5CG,KAAOC,EAAAA,aAAAA,CAAc,IAAKN,CAAAA,QAAAA,EAAUK,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport {\n createVertex,\n GoogleVertexProvider,\n GoogleVertexProviderSettings,\n} from \"@ai-sdk/google-vertex\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type GoogleVertexClientSettings = GoogleVertexProviderSettings;\n\nexport class GoogleVertexClient extends BackendClient<\n GoogleVertexClientSettings,\n GoogleVertexProvider\n> {\n protected create(): GoogleVertexProvider {\n return createVertex({\n ...this.settings,\n project: this.settings?.project || getEnv(\"GOOGLE_VERTEX_PROJECT\"),\n baseURL: this.settings?.baseURL || getEnv(\"GOOGLE_VERTEX_ENDPOINT\"),\n location: this.settings?.location || getEnv(\"GOOGLE_VERTEX_LOCATION\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  var groq = require('@ai-sdk/groq');
4
4
  var client_cjs = require('../../../backend/client.cjs');
5
5
  var env_cjs = require('../../../internals/env.cjs');
6
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
6
7
 
7
8
  var __defProp = Object.defineProperty;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -14,7 +15,8 @@ class GroqClient extends client_cjs.BackendClient {
14
15
  return groq.createGroq({
15
16
  ...this.settings,
16
17
  baseURL: this.settings.baseURL || env_cjs.getEnv("GROQ_API_BASE_URL"),
17
- apiKey: this.settings.apiKey || env_cjs.getEnv("GROQ_API_KEY")
18
+ apiKey: this.settings.apiKey || env_cjs.getEnv("GROQ_API_KEY"),
19
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
18
20
  });
19
21
  }
20
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["GroqClient","BackendClient","create","createGroq","settings","baseURL","getEnv","apiKey"],"mappings":";;;;;;;;AAsBO,MAAMA,mBAAmBC,wBAAAA,CAAAA;EAtBhC;;;EAuBYC,MAAuB,GAAA;AAC/B,IAAA,OAAOC,eAAW,CAAA;AAChB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,CAASC,OAAWC,IAAAA,cAAAA,CAAO,mBAAA,CAAA;AACzCC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,cAAAA,CAAO,cAAA;KACzC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createGroq, GroqProvider, GroqProviderSettings } from \"@ai-sdk/groq\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv } from \"@/internals/env.js\";\n\nexport type GroqClientSettings = GroqProviderSettings;\n\nexport class GroqClient extends BackendClient<GroqClientSettings, GroqProvider> {\n protected create(): GroqProvider {\n return createGroq({\n ...this.settings,\n baseURL: this.settings.baseURL || getEnv(\"GROQ_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"GROQ_API_KEY\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["GroqClient","BackendClient","create","createGroq","settings","baseURL","getEnv","apiKey","fetch","vercelFetcher"],"mappings":";;;;;;;;;AAuBO,MAAMA,mBAAmBC,wBAAAA,CAAAA;EAvBhC;;;EAwBYC,MAAuB,GAAA;AAC/B,IAAA,OAAOC,eAAW,CAAA;AAChB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,CAASC,OAAWC,IAAAA,cAAAA,CAAO,mBAAA,CAAA;AACzCC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,cAAAA,CAAO,cAAA,CAAA;MACvCE,KAAOC,EAAAA,uBAAAA,CAAc,IAAKL,CAAAA,QAAAA,EAAUI,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createGroq, GroqProvider, GroqProviderSettings } from \"@ai-sdk/groq\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type GroqClientSettings = GroqProviderSettings;\n\nexport class GroqClient extends BackendClient<GroqClientSettings, GroqProvider> {\n protected create(): GroqProvider {\n return createGroq({\n ...this.settings,\n baseURL: this.settings.baseURL || getEnv(\"GROQ_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"GROQ_API_KEY\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { createGroq } from '@ai-sdk/groq';
2
2
  import { BackendClient } from '../../../backend/client.js';
3
3
  import { getEnv } from '../../../internals/env.js';
4
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -12,7 +13,8 @@ class GroqClient extends BackendClient {
12
13
  return createGroq({
13
14
  ...this.settings,
14
15
  baseURL: this.settings.baseURL || getEnv("GROQ_API_BASE_URL"),
15
- apiKey: this.settings.apiKey || getEnv("GROQ_API_KEY")
16
+ apiKey: this.settings.apiKey || getEnv("GROQ_API_KEY"),
17
+ fetch: vercelFetcher(this.settings?.fetch)
16
18
  });
17
19
  }
18
20
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["GroqClient","BackendClient","create","createGroq","settings","baseURL","getEnv","apiKey"],"mappings":";;;;;;AAsBO,MAAMA,mBAAmBC,aAAAA,CAAAA;EAtBhC;;;EAuBYC,MAAuB,GAAA;AAC/B,IAAA,OAAOC,UAAW,CAAA;AAChB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,CAASC,OAAWC,IAAAA,MAAAA,CAAO,mBAAA,CAAA;AACzCC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,MAAAA,CAAO,cAAA;KACzC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createGroq, GroqProvider, GroqProviderSettings } from \"@ai-sdk/groq\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv } from \"@/internals/env.js\";\n\nexport type GroqClientSettings = GroqProviderSettings;\n\nexport class GroqClient extends BackendClient<GroqClientSettings, GroqProvider> {\n protected create(): GroqProvider {\n return createGroq({\n ...this.settings,\n baseURL: this.settings.baseURL || getEnv(\"GROQ_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"GROQ_API_KEY\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["GroqClient","BackendClient","create","createGroq","settings","baseURL","getEnv","apiKey","fetch","vercelFetcher"],"mappings":";;;;;;;AAuBO,MAAMA,mBAAmBC,aAAAA,CAAAA;EAvBhC;;;EAwBYC,MAAuB,GAAA;AAC/B,IAAA,OAAOC,UAAW,CAAA;AAChB,MAAA,GAAG,IAAKC,CAAAA,QAAAA;AACRC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,CAASC,OAAWC,IAAAA,MAAAA,CAAO,mBAAA,CAAA;AACzCC,MAAAA,MAAAA,EAAQ,IAAKH,CAAAA,QAAAA,CAASG,MAAUD,IAAAA,MAAAA,CAAO,cAAA,CAAA;MACvCE,KAAOC,EAAAA,aAAAA,CAAc,IAAKL,CAAAA,QAAAA,EAAUI,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createGroq, GroqProvider, GroqProviderSettings } from \"@ai-sdk/groq\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { getEnv } from \"@/internals/env.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type GroqClientSettings = GroqProviderSettings;\n\nexport class GroqClient extends BackendClient<GroqClientSettings, GroqProvider> {\n protected create(): GroqProvider {\n return createGroq({\n ...this.settings,\n baseURL: this.settings.baseURL || getEnv(\"GROQ_API_BASE_URL\"),\n apiKey: this.settings.apiKey || getEnv(\"GROQ_API_KEY\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -3,6 +3,7 @@
3
3
  var env_cjs = require('../../../internals/env.cjs');
4
4
  var ollamaAiProvider = require('ollama-ai-provider');
5
5
  var client_cjs = require('../../../backend/client.cjs');
6
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
6
7
 
7
8
  var __defProp = Object.defineProperty;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -13,7 +14,8 @@ class OllamaClient extends client_cjs.BackendClient {
13
14
  create() {
14
15
  return ollamaAiProvider.createOllama({
15
16
  ...this.settings ?? {},
16
- baseURL: this.settings?.baseURL ?? env_cjs.getEnv("OLLAMA_BASE_URL")
17
+ baseURL: this.settings?.baseURL ?? env_cjs.getEnv("OLLAMA_BASE_URL"),
18
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
17
19
  });
18
20
  }
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["OllamaClient","BackendClient","create","createOllama","settings","baseURL","getEnv"],"mappings":";;;;;;;;AAsBO,MAAMA,qBAAqBC,wBAAAA,CAAAA;EAtBlC;;;EAuBYC,MAAyB,GAAA;AACjC,IAAA,OAAOC,6BAAa,CAAA;MAClB,GAAI,IAAA,CAAKC,YAAY,EAAC;AACtBC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,iBAAA;KAC5C,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport { createOllama, OllamaProvider, OllamaProviderSettings } from \"ollama-ai-provider\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type OllamaClientSettings = OllamaProviderSettings;\n\nexport class OllamaClient extends BackendClient<OllamaClientSettings, OllamaProvider> {\n protected create(): OllamaProvider {\n return createOllama({\n ...(this.settings ?? {}),\n baseURL: this.settings?.baseURL ?? getEnv(\"OLLAMA_BASE_URL\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["OllamaClient","BackendClient","create","createOllama","settings","baseURL","getEnv","fetch","vercelFetcher"],"mappings":";;;;;;;;;AAuBO,MAAMA,qBAAqBC,wBAAAA,CAAAA;EAvBlC;;;EAwBYC,MAAyB,GAAA;AACjC,IAAA,OAAOC,6BAAa,CAAA;MAClB,GAAI,IAAA,CAAKC,YAAY,EAAC;AACtBC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,cAAAA,CAAO,iBAAA,CAAA;MAC1CC,KAAOC,EAAAA,uBAAAA,CAAc,IAAKJ,CAAAA,QAAAA,EAAUG,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport { createOllama, OllamaProvider, OllamaProviderSettings } from \"ollama-ai-provider\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type OllamaClientSettings = OllamaProviderSettings;\n\nexport class OllamaClient extends BackendClient<OllamaClientSettings, OllamaProvider> {\n protected create(): OllamaProvider {\n return createOllama({\n ...(this.settings ?? {}),\n baseURL: this.settings?.baseURL ?? getEnv(\"OLLAMA_BASE_URL\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { getEnv } from '../../../internals/env.js';
2
2
  import { createOllama } from 'ollama-ai-provider';
3
3
  import { BackendClient } from '../../../backend/client.js';
4
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -11,7 +12,8 @@ class OllamaClient extends BackendClient {
11
12
  create() {
12
13
  return createOllama({
13
14
  ...this.settings ?? {},
14
- baseURL: this.settings?.baseURL ?? getEnv("OLLAMA_BASE_URL")
15
+ baseURL: this.settings?.baseURL ?? getEnv("OLLAMA_BASE_URL"),
16
+ fetch: vercelFetcher(this.settings?.fetch)
15
17
  });
16
18
  }
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["OllamaClient","BackendClient","create","createOllama","settings","baseURL","getEnv"],"mappings":";;;;;;AAsBO,MAAMA,qBAAqBC,aAAAA,CAAAA;EAtBlC;;;EAuBYC,MAAyB,GAAA;AACjC,IAAA,OAAOC,YAAa,CAAA;MAClB,GAAI,IAAA,CAAKC,YAAY,EAAC;AACtBC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,iBAAA;KAC5C,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport { createOllama, OllamaProvider, OllamaProviderSettings } from \"ollama-ai-provider\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type OllamaClientSettings = OllamaProviderSettings;\n\nexport class OllamaClient extends BackendClient<OllamaClientSettings, OllamaProvider> {\n protected create(): OllamaProvider {\n return createOllama({\n ...(this.settings ?? {}),\n baseURL: this.settings?.baseURL ?? getEnv(\"OLLAMA_BASE_URL\"),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["OllamaClient","BackendClient","create","createOllama","settings","baseURL","getEnv","fetch","vercelFetcher"],"mappings":";;;;;;;AAuBO,MAAMA,qBAAqBC,aAAAA,CAAAA;EAvBlC;;;EAwBYC,MAAyB,GAAA;AACjC,IAAA,OAAOC,YAAa,CAAA;MAClB,GAAI,IAAA,CAAKC,YAAY,EAAC;AACtBC,MAAAA,OAAAA,EAAS,IAAKD,CAAAA,QAAAA,EAAUC,OAAWC,IAAAA,MAAAA,CAAO,iBAAA,CAAA;MAC1CC,KAAOC,EAAAA,aAAAA,CAAc,IAAKJ,CAAAA,QAAAA,EAAUG,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getEnv } from \"@/internals/env.js\";\nimport { createOllama, OllamaProvider, OllamaProviderSettings } from \"ollama-ai-provider\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type OllamaClientSettings = OllamaProviderSettings;\n\nexport class OllamaClient extends BackendClient<OllamaClientSettings, OllamaProvider> {\n protected create(): OllamaProvider {\n return createOllama({\n ...(this.settings ?? {}),\n baseURL: this.settings?.baseURL ?? getEnv(\"OLLAMA_BASE_URL\"),\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -4,6 +4,7 @@ var openai = require('@ai-sdk/openai');
4
4
  var env_cjs = require('../../../internals/env.cjs');
5
5
  var zod = require('zod');
6
6
  var client_cjs = require('../../../backend/client.cjs');
7
+ var utils_cjs = require('../../vercel/backend/utils.cjs');
7
8
 
8
9
  var __defProp = Object.defineProperty;
9
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -30,7 +31,8 @@ class OpenAIClient extends client_cjs.BackendClient {
30
31
  headers: {
31
32
  ...extraHeaders,
32
33
  ...this.settings?.headers
33
- }
34
+ },
35
+ fetch: utils_cjs.vercelFetcher(this.settings?.fetch)
34
36
  });
35
37
  }
36
38
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["OpenAIClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","baseURL","settings","getEnv","compatibility","createOpenAI","apiKey","headers"],"mappings":";;;;;;;;;AAuBO,MAAMA,qBAAqBC,wBAAAA,CAAAA;EAvBlC;;;EAwBYC,MAAyB,GAAA;AACjC,IAAA,MAAMC,eAAeC,gBACnB,CAAA,oBAAA,EACAC,KAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,MAAEW,MAAOX,CAAAA,KAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,MAAMC,OAAU,GAAA,IAAA,CAAKC,QAAUD,EAAAA,OAAAA,IAAWE,eAAO,qBAAA,CAAA;AACjD,IAAA,IAAIC,aACF,GAAA,IAAA,CAAKF,QAAUE,EAAAA,aAAAA,IAAiBD,eAAO,2BAAA,CAAA;AACzC,IAAIF,IAAAA,OAAAA,IAAW,CAACG,aAAe,EAAA;AAC7BA,MAAgB,aAAA,GAAA,YAAA;KACP,MAAA,IAAA,CAACH,OAAW,IAAA,CAACG,aAAe,EAAA;AACrCA,MAAgB,aAAA,GAAA,QAAA;AAClB;AAEA,IAAA,OAAOC,mBAAa,CAAA;AAClB,MAAA,GAAG,IAAKH,CAAAA,QAAAA;AACRE,MAAAA,aAAAA;AACAE,MAAAA,MAAAA,EAAQ,IAAKJ,CAAAA,QAAAA,EAAUI,MAAUH,IAAAA,cAAAA,CAAO,gBAAA,CAAA;AACxCF,MAAAA,OAAAA;MACAM,OAAS,EAAA;QACP,GAAGrB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUK,EAAAA;AACpB;KACF,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createOpenAI, OpenAIProvider, OpenAIProviderSettings } from \"@ai-sdk/openai\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type OpenAIClientSettings = OpenAIProviderSettings;\n\nexport class OpenAIClient extends BackendClient<OpenAIClientSettings, OpenAIProvider> {\n protected create(): OpenAIProvider {\n const extraHeaders = parseEnv(\n \"OPENAI_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n const baseURL = this.settings?.baseURL || getEnv(\"OPENAI_API_ENDPOINT\");\n let compatibility: string | undefined =\n this.settings?.compatibility || getEnv(\"OPENAI_COMPATIBILITY_MODE\");\n if (baseURL && !compatibility) {\n compatibility = \"compatible\";\n } else if (!baseURL && !compatibility) {\n compatibility = \"strict\";\n }\n\n return createOpenAI({\n ...this.settings,\n compatibility: compatibility as \"strict\" | \"compatible\" | undefined,\n apiKey: this.settings?.apiKey || getEnv(\"OPENAI_API_KEY\"),\n baseURL,\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["OpenAIClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","baseURL","settings","getEnv","compatibility","createOpenAI","apiKey","headers","fetch","vercelFetcher"],"mappings":";;;;;;;;;;AAwBO,MAAMA,qBAAqBC,wBAAAA,CAAAA;EAxBlC;;;EAyBYC,MAAyB,GAAA;AACjC,IAAA,MAAMC,eAAeC,gBACnB,CAAA,oBAAA,EACAC,KAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,MAAEW,MAAOX,CAAAA,KAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,MAAMC,OAAU,GAAA,IAAA,CAAKC,QAAUD,EAAAA,OAAAA,IAAWE,eAAO,qBAAA,CAAA;AACjD,IAAA,IAAIC,aACF,GAAA,IAAA,CAAKF,QAAUE,EAAAA,aAAAA,IAAiBD,eAAO,2BAAA,CAAA;AACzC,IAAIF,IAAAA,OAAAA,IAAW,CAACG,aAAe,EAAA;AAC7BA,MAAgB,aAAA,GAAA,YAAA;KACP,MAAA,IAAA,CAACH,OAAW,IAAA,CAACG,aAAe,EAAA;AACrCA,MAAgB,aAAA,GAAA,QAAA;AAClB;AAEA,IAAA,OAAOC,mBAAa,CAAA;AAClB,MAAA,GAAG,IAAKH,CAAAA,QAAAA;AACRE,MAAAA,aAAAA;AACAE,MAAAA,MAAAA,EAAQ,IAAKJ,CAAAA,QAAAA,EAAUI,MAAUH,IAAAA,cAAAA,CAAO,gBAAA,CAAA;AACxCF,MAAAA,OAAAA;MACAM,OAAS,EAAA;QACP,GAAGrB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUK,EAAAA;AACpB,OAAA;MACAC,KAAOC,EAAAA,uBAAAA,CAAc,IAAKP,CAAAA,QAAAA,EAAUM,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createOpenAI, OpenAIProvider, OpenAIProviderSettings } from \"@ai-sdk/openai\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type OpenAIClientSettings = OpenAIProviderSettings;\n\nexport class OpenAIClient extends BackendClient<OpenAIClientSettings, OpenAIProvider> {\n protected create(): OpenAIProvider {\n const extraHeaders = parseEnv(\n \"OPENAI_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n const baseURL = this.settings?.baseURL || getEnv(\"OPENAI_API_ENDPOINT\");\n let compatibility: string | undefined =\n this.settings?.compatibility || getEnv(\"OPENAI_COMPATIBILITY_MODE\");\n if (baseURL && !compatibility) {\n compatibility = \"compatible\";\n } else if (!baseURL && !compatibility) {\n compatibility = \"strict\";\n }\n\n return createOpenAI({\n ...this.settings,\n compatibility: compatibility as \"strict\" | \"compatible\" | undefined,\n apiKey: this.settings?.apiKey || getEnv(\"OPENAI_API_KEY\"),\n baseURL,\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -2,6 +2,7 @@ import { createOpenAI } from '@ai-sdk/openai';
2
2
  import { parseEnv, getEnv } from '../../../internals/env.js';
3
3
  import { z } from 'zod';
4
4
  import { BackendClient } from '../../../backend/client.js';
5
+ import { vercelFetcher } from '../../vercel/backend/utils.js';
5
6
 
6
7
  var __defProp = Object.defineProperty;
7
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -28,7 +29,8 @@ class OpenAIClient extends BackendClient {
28
29
  headers: {
29
30
  ...extraHeaders,
30
31
  ...this.settings?.headers
31
- }
32
+ },
33
+ fetch: vercelFetcher(this.settings?.fetch)
32
34
  });
33
35
  }
34
36
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["client.ts"],"names":["OpenAIClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","baseURL","settings","getEnv","compatibility","createOpenAI","apiKey","headers"],"mappings":";;;;;;;AAuBO,MAAMA,qBAAqBC,aAAAA,CAAAA;EAvBlC;;;EAwBYC,MAAyB,GAAA;AACjC,IAAA,MAAMC,eAAeC,QACnB,CAAA,oBAAA,EACAC,CAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,EAAEW,MAAOX,CAAAA,CAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,MAAMC,OAAU,GAAA,IAAA,CAAKC,QAAUD,EAAAA,OAAAA,IAAWE,OAAO,qBAAA,CAAA;AACjD,IAAA,IAAIC,aACF,GAAA,IAAA,CAAKF,QAAUE,EAAAA,aAAAA,IAAiBD,OAAO,2BAAA,CAAA;AACzC,IAAIF,IAAAA,OAAAA,IAAW,CAACG,aAAe,EAAA;AAC7BA,MAAgB,aAAA,GAAA,YAAA;KACP,MAAA,IAAA,CAACH,OAAW,IAAA,CAACG,aAAe,EAAA;AACrCA,MAAgB,aAAA,GAAA,QAAA;AAClB;AAEA,IAAA,OAAOC,YAAa,CAAA;AAClB,MAAA,GAAG,IAAKH,CAAAA,QAAAA;AACRE,MAAAA,aAAAA;AACAE,MAAAA,MAAAA,EAAQ,IAAKJ,CAAAA,QAAAA,EAAUI,MAAUH,IAAAA,MAAAA,CAAO,gBAAA,CAAA;AACxCF,MAAAA,OAAAA;MACAM,OAAS,EAAA;QACP,GAAGrB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUK,EAAAA;AACpB;KACF,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createOpenAI, OpenAIProvider, OpenAIProviderSettings } from \"@ai-sdk/openai\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { BackendClient } from \"@/backend/client.js\";\n\nexport type OpenAIClientSettings = OpenAIProviderSettings;\n\nexport class OpenAIClient extends BackendClient<OpenAIClientSettings, OpenAIProvider> {\n protected create(): OpenAIProvider {\n const extraHeaders = parseEnv(\n \"OPENAI_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n const baseURL = this.settings?.baseURL || getEnv(\"OPENAI_API_ENDPOINT\");\n let compatibility: string | undefined =\n this.settings?.compatibility || getEnv(\"OPENAI_COMPATIBILITY_MODE\");\n if (baseURL && !compatibility) {\n compatibility = \"compatible\";\n } else if (!baseURL && !compatibility) {\n compatibility = \"strict\";\n }\n\n return createOpenAI({\n ...this.settings,\n compatibility: compatibility as \"strict\" | \"compatible\" | undefined,\n apiKey: this.settings?.apiKey || getEnv(\"OPENAI_API_KEY\"),\n baseURL,\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["client.ts"],"names":["OpenAIClient","BackendClient","create","extraHeaders","parseEnv","z","preprocess","value","Object","fromEntries","String","split","filter","pair","includes","map","record","string","baseURL","settings","getEnv","compatibility","createOpenAI","apiKey","headers","fetch","vercelFetcher"],"mappings":";;;;;;;;AAwBO,MAAMA,qBAAqBC,aAAAA,CAAAA;EAxBlC;;;EAyBYC,MAAyB,GAAA;AACjC,IAAA,MAAMC,eAAeC,QACnB,CAAA,oBAAA,EACAC,CAAEC,CAAAA,UAAAA,CAAW,CAACC,KAAAA,KAAAA;AACZ,MAAOC,OAAAA,MAAAA,CAAOC,WACZC,CAAAA,MAAAA,CAAOH,KAAS,IAAA,EAAA,EACbI,KAAM,CAAA,GAAA,CACNC,CAAAA,MAAAA,CAAO,CAACC,IAAAA,KAASA,KAAKC,QAAS,CAAA,GAAA,CAAA,CAAA,CAC/BC,GAAI,CAAA,CAACF,SAASA,IAAKF,CAAAA,KAAAA,CAAM,GAAA,CAAA,CAAA,CAAA;AAEhC,KAAA,EAAGN,EAAEW,MAAOX,CAAAA,CAAAA,CAAEY,MAAM,EAAA,CAAA,CAAA,CAAA;AAGtB,IAAA,MAAMC,OAAU,GAAA,IAAA,CAAKC,QAAUD,EAAAA,OAAAA,IAAWE,OAAO,qBAAA,CAAA;AACjD,IAAA,IAAIC,aACF,GAAA,IAAA,CAAKF,QAAUE,EAAAA,aAAAA,IAAiBD,OAAO,2BAAA,CAAA;AACzC,IAAIF,IAAAA,OAAAA,IAAW,CAACG,aAAe,EAAA;AAC7BA,MAAgB,aAAA,GAAA,YAAA;KACP,MAAA,IAAA,CAACH,OAAW,IAAA,CAACG,aAAe,EAAA;AACrCA,MAAgB,aAAA,GAAA,QAAA;AAClB;AAEA,IAAA,OAAOC,YAAa,CAAA;AAClB,MAAA,GAAG,IAAKH,CAAAA,QAAAA;AACRE,MAAAA,aAAAA;AACAE,MAAAA,MAAAA,EAAQ,IAAKJ,CAAAA,QAAAA,EAAUI,MAAUH,IAAAA,MAAAA,CAAO,gBAAA,CAAA;AACxCF,MAAAA,OAAAA;MACAM,OAAS,EAAA;QACP,GAAGrB,YAAAA;AACH,QAAA,GAAG,KAAKgB,QAAUK,EAAAA;AACpB,OAAA;MACAC,KAAOC,EAAAA,aAAAA,CAAc,IAAKP,CAAAA,QAAAA,EAAUM,KAAAA;KACtC,CAAA;AACF;AACF","file":"client.js","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createOpenAI, OpenAIProvider, OpenAIProviderSettings } from \"@ai-sdk/openai\";\nimport { getEnv, parseEnv } from \"@/internals/env.js\";\nimport { z } from \"zod\";\nimport { BackendClient } from \"@/backend/client.js\";\nimport { vercelFetcher } from \"@/adapters/vercel/backend/utils.js\";\n\nexport type OpenAIClientSettings = OpenAIProviderSettings;\n\nexport class OpenAIClient extends BackendClient<OpenAIClientSettings, OpenAIProvider> {\n protected create(): OpenAIProvider {\n const extraHeaders = parseEnv(\n \"OPENAI_API_HEADERS\",\n z.preprocess((value) => {\n return Object.fromEntries(\n String(value || \"\")\n .split(\",\")\n .filter((pair) => pair.includes(\"=\"))\n .map((pair) => pair.split(\"=\")),\n );\n }, z.record(z.string())),\n );\n\n const baseURL = this.settings?.baseURL || getEnv(\"OPENAI_API_ENDPOINT\");\n let compatibility: string | undefined =\n this.settings?.compatibility || getEnv(\"OPENAI_COMPATIBILITY_MODE\");\n if (baseURL && !compatibility) {\n compatibility = \"compatible\";\n } else if (!baseURL && !compatibility) {\n compatibility = \"strict\";\n }\n\n return createOpenAI({\n ...this.settings,\n compatibility: compatibility as \"strict\" | \"compatible\" | undefined,\n apiKey: this.settings?.apiKey || getEnv(\"OPENAI_API_KEY\"),\n baseURL,\n headers: {\n ...extraHeaders,\n ...this.settings?.headers,\n },\n fetch: vercelFetcher(this.settings?.fetch),\n });\n }\n}\n"]}
@@ -9,6 +9,7 @@ var remeda = require('remeda');
9
9
  var errors_cjs$1 = require('../../../backend/errors.cjs');
10
10
  var zod = require('zod');
11
11
  var base_cjs = require('../../../tools/base.cjs');
12
+ var utils_cjs = require('./utils.cjs');
12
13
 
13
14
  var __defProp = Object.defineProperty;
14
15
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -141,6 +142,9 @@ class VercelChatModel extends chat_cjs.ChatModel {
141
142
  parameters: ai.jsonSchema(await tool.getInputJsonSchema())
142
143
  })));
143
144
  const messages = input.messages.map((msg) => {
145
+ if (msg instanceof message_cjs.CustomMessage) {
146
+ msg = utils_cjs.encodeCustomMessage(msg);
147
+ }
144
148
  if (msg instanceof message_cjs.AssistantMessage) {
145
149
  return {
146
150
  role: "assistant",
@@ -153,13 +157,13 @@ class VercelChatModel extends chat_cjs.ChatModel {
153
157
  };
154
158
  } else if (msg instanceof message_cjs.UserMessage) {
155
159
  return {
156
- role: msg.role,
160
+ role: "user",
157
161
  content: msg.content
158
162
  };
159
163
  } else if (msg instanceof message_cjs.SystemMessage) {
160
164
  return {
161
- role: "user",
162
- content: msg.content
165
+ role: "system",
166
+ content: msg.content.map((part) => part.text).join("\n")
163
167
  };
164
168
  }
165
169
  return {