@intuned/browser-dev 0.1.14-dev.1 → 0.1.14-dev.2

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.
@@ -10,7 +10,6 @@ var _OpenAI = require("./providers/OpenAI");
10
10
  var _Gemini = require("./providers/Gemini");
11
11
  var _dotenv = require("dotenv");
12
12
  var _loadRuntime = require("../../common/loadRuntime");
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
13
  (0, _dotenv.config)();
15
14
  class APIGateway {
16
15
  useGateway = false;
@@ -40,15 +39,6 @@ class APIGateway {
40
39
  this.config = this.getDefaultConfig();
41
40
  this.validateGatewayConfig(this.config);
42
41
  this.useGateway = true;
43
- try {
44
- const runtime = await Promise.resolve().then(() => _interopRequireWildcard(require("@intuned/runtime")));
45
- const {
46
- apiKey
47
- } = runtime.getAiGatewayConfig();
48
- if (apiKey) {
49
- this.gatewayAuthToken = apiKey;
50
- }
51
- } catch {}
52
42
  this.isInitialized = true;
53
43
  }
54
44
  getApiKeyFromEnv(provider) {
@@ -118,7 +108,7 @@ class APIGateway {
118
108
  const baseUrl = this.buildGatewayUrl();
119
109
  return {
120
110
  model: this.model,
121
- apiKey: this.gatewayAuthToken,
111
+ apiKey: "--THIS_VALUE_WILL_BE_REPLACED_BY_INTUNED_BE--",
122
112
  extraHeaders,
123
113
  baseUrl
124
114
  };
@@ -17,7 +17,6 @@ const createAnthropicInstance = input => {
17
17
  });
18
18
  } else {
19
19
  return (0, _anthropic.createAnthropic)({
20
- apiKey: apiKey || "--THI_VALUE_WILL_BE_REPLACED_BY_INTUNED_BE--",
21
20
  baseURL: baseUrl,
22
21
  fetch: _jwtTokenManager.backendFunctionsTokenManager.fetchWithToken.bind(_jwtTokenManager.backendFunctionsTokenManager)
23
22
  });
@@ -19,7 +19,6 @@ const createGoogleInstance = input => {
19
19
  });
20
20
  } else {
21
21
  return (0, _google.createGoogleGenerativeAI)({
22
- apiKey: apiKey || "--THI_VALUE_WILL_BE_REPLACED_BY_INTUNED_BE--",
23
22
  headers,
24
23
  baseURL: baseUrl,
25
24
  fetch: _jwtTokenManager.backendFunctionsTokenManager.fetchWithToken.bind(_jwtTokenManager.backendFunctionsTokenManager)
@@ -19,7 +19,6 @@ const createOpenAIInstance = input => {
19
19
  });
20
20
  } else {
21
21
  return (0, _openai.createOpenAI)({
22
- apiKey: apiKey || "--THI_VALUE_WILL_BE_REPLACED_BY_INTUNED_BE--",
23
22
  headers,
24
23
  baseURL: baseUrl,
25
24
  fetch: _jwtTokenManager.backendFunctionsTokenManager.fetchWithToken.bind(_jwtTokenManager.backendFunctionsTokenManager)
@@ -233,7 +233,7 @@ const mockLoadRuntime = _vitest.vi.mocked(_loadRuntime.loadRuntime);
233
233
  });
234
234
  const result = await gateway.createProviderInstance();
235
235
  (0, _extendedTest.expect)(mockCreateAnthropicInstance).toHaveBeenCalledWith({
236
- apiKey: undefined,
236
+ apiKey: "--THIS_VALUE_WILL_BE_REPLACED_BY_INTUNED_BE--",
237
237
  headers: undefined,
238
238
  model: "claude-3-sonnet",
239
239
  baseUrl: "https://functions.example.com/api/workspace123/functions/integration456/intuned-ai-gateway"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/browser-dev",
3
- "version": "0.1.14-dev.1",
3
+ "version": "0.1.14-dev.2",
4
4
  "description": "runner package for intuned functions",
5
5
  "types": "./dist/index.d.ts",
6
6
  "typesVersions": {