@blaxel/llamaindex 0.2.65-dev.77 → 0.2.65-preview.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/model.js CHANGED
@@ -91,6 +91,22 @@ class BlaxelLLM {
91
91
  headers,
92
92
  });
93
93
  };
94
+ // mk3 models use the direct gateway URL and always speak OpenAI-compatible API
95
+ if (this.modelData?.spec.runtime?.generation === "mk3") {
96
+ const gatewayUrl = this.modelData.metadata.url;
97
+ if (!gatewayUrl) {
98
+ throw new Error(`Model ${this.model} is mk3 but has no gateway URL in metadata`);
99
+ }
100
+ return openai({
101
+ model: this.model,
102
+ apiKey: currentToken,
103
+ baseURL: `${gatewayUrl}/v1`,
104
+ additionalSessionOptions: {
105
+ fetch: authenticatedFetch,
106
+ },
107
+ ...this.options,
108
+ });
109
+ }
94
110
  if (this.type === "mistral") {
95
111
  return openai({
96
112
  model: this.modelData?.spec.runtime?.model,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/llamaindex",
3
- "version": "0.2.65-dev.77",
3
+ "version": "0.2.65-preview.78",
4
4
  "description": "Blaxel SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",
@@ -49,7 +49,7 @@
49
49
  "dist"
50
50
  ],
51
51
  "dependencies": {
52
- "@blaxel/core": "0.2.65-dev.77",
52
+ "@blaxel/core": "0.2.65-preview.78",
53
53
  "@llamaindex/anthropic": "^0.3.26",
54
54
  "@llamaindex/core": "0.6.22",
55
55
  "@llamaindex/google": "0.3.22",