@juspay/neurolink 9.68.1 → 9.68.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/browser/neurolink.min.js +326 -326
- package/dist/lib/providers/fireworks.d.ts +9 -20
- package/dist/lib/providers/fireworks.js +31 -115
- package/dist/lib/providers/xai.d.ts +11 -22
- package/dist/lib/providers/xai.js +32 -120
- package/dist/providers/fireworks.d.ts +9 -20
- package/dist/providers/fireworks.js +31 -115
- package/dist/providers/xai.d.ts +11 -22
- package/dist/providers/xai.js +32 -120
- package/package.json +1 -1
|
@@ -1,132 +1,60 @@
|
|
|
1
|
-
import { createOpenAI } from "@ai-sdk/openai";
|
|
2
1
|
import { FireworksModels } from "../constants/enums.js";
|
|
3
|
-
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
|
-
import { DEFAULT_MAX_STEPS } from "../core/constants.js";
|
|
5
|
-
import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
|
|
6
|
-
import { isNeuroLink } from "../neurolink.js";
|
|
7
|
-
import { createLoggingFetch } from "../utils/loggingFetch.js";
|
|
8
|
-
import { tracers, ATTR, withClientStreamSpan } from "../telemetry/index.js";
|
|
9
2
|
import { AuthenticationError, InvalidModelError, NetworkError, ProviderError, RateLimitError, } from "../types/index.js";
|
|
10
3
|
import { logger } from "../utils/logger.js";
|
|
11
4
|
import { createFireworksConfig, getProviderModel, validateApiKey, } from "../utils/providerConfig.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { resolveToolChoice } from "../utils/toolChoice.js";
|
|
15
|
-
import { toAnalyticsStreamResult } from "./providerTypeUtils.js";
|
|
16
|
-
import { stepCountIs } from "../utils/tool.js";
|
|
17
|
-
import { streamText } from "../utils/generation.js";
|
|
5
|
+
import { TimeoutError } from "../utils/timeout.js";
|
|
6
|
+
import { OpenAIChatCompletionsProvider } from "./openaiChatCompletionsBase.js";
|
|
18
7
|
const FIREWORKS_DEFAULT_BASE_URL = "https://api.fireworks.ai/inference/v1";
|
|
19
8
|
const getFireworksApiKey = () => validateApiKey(createFireworksConfig());
|
|
20
9
|
const getDefaultFireworksModel = () => getProviderModel("FIREWORKS_MODEL", FireworksModels.DEEPSEEK_V4_PRO);
|
|
21
10
|
/**
|
|
22
|
-
* Fireworks AI Provider
|
|
11
|
+
* Fireworks AI Provider — direct HTTP, no AI SDK.
|
|
23
12
|
*
|
|
24
13
|
* Hosted open-model serving at api.fireworks.ai/inference/v1
|
|
25
14
|
* (OpenAI-compatible). Best for low-latency at scale on Llama / Mixtral /
|
|
26
|
-
* Qwen / DeepSeek.
|
|
15
|
+
* Qwen / DeepSeek. All request/stream/tool-loop orchestration lives in
|
|
16
|
+
* `OpenAIChatCompletionsProvider`; this class only declares configuration
|
|
17
|
+
* and provider-specific error mapping.
|
|
27
18
|
*
|
|
28
19
|
* @see https://docs.fireworks.ai/api-reference/introduction
|
|
29
20
|
*/
|
|
30
|
-
export class FireworksProvider extends
|
|
31
|
-
model;
|
|
32
|
-
apiKey;
|
|
33
|
-
baseURL;
|
|
21
|
+
export class FireworksProvider extends OpenAIChatCompletionsProvider {
|
|
34
22
|
constructor(modelName, sdk, _region, credentials) {
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
// Trim the override before applying precedence. A blank/whitespace
|
|
24
|
+
// `credentials.apiKey` must NOT bypass the env key — that would build a
|
|
25
|
+
// client with an unusable bearer token and fail at request time.
|
|
37
26
|
const overrideApiKey = credentials?.apiKey?.trim();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
FIREWORKS_DEFAULT_BASE_URL;
|
|
46
|
-
const fireworks = createOpenAI({
|
|
47
|
-
apiKey: this.apiKey,
|
|
48
|
-
baseURL: this.baseURL,
|
|
49
|
-
fetch: createLoggingFetch("fireworks"),
|
|
50
|
-
});
|
|
51
|
-
this.model = fireworks.chat(this.modelName);
|
|
27
|
+
const apiKey = overrideApiKey && overrideApiKey.length > 0
|
|
28
|
+
? overrideApiKey
|
|
29
|
+
: getFireworksApiKey();
|
|
30
|
+
const baseURL = credentials?.baseURL?.trim() ||
|
|
31
|
+
process.env.FIREWORKS_BASE_URL?.trim() ||
|
|
32
|
+
FIREWORKS_DEFAULT_BASE_URL;
|
|
33
|
+
super("fireworks", modelName, sdk, { baseURL, apiKey });
|
|
52
34
|
logger.debug("Fireworks Provider initialized", {
|
|
53
35
|
modelName: this.modelName,
|
|
54
36
|
providerName: this.providerName,
|
|
55
|
-
baseURL: this.baseURL,
|
|
37
|
+
baseURL: this.config.baseURL,
|
|
56
38
|
});
|
|
57
39
|
}
|
|
58
|
-
async executeStream(options, _analysisSchema) {
|
|
59
|
-
return withClientStreamSpan({
|
|
60
|
-
name: "neurolink.provider.stream",
|
|
61
|
-
tracer: tracers.provider,
|
|
62
|
-
attributes: {
|
|
63
|
-
[ATTR.GEN_AI_SYSTEM]: "fireworks",
|
|
64
|
-
[ATTR.GEN_AI_MODEL]: this.modelName,
|
|
65
|
-
[ATTR.GEN_AI_OPERATION]: "stream",
|
|
66
|
-
[ATTR.NL_STREAM_MODE]: true,
|
|
67
|
-
},
|
|
68
|
-
}, async () => this.executeStreamInner(options), (r) => r.stream, (r, wrapped) => ({ ...r, stream: wrapped }));
|
|
69
|
-
}
|
|
70
|
-
async executeStreamInner(options) {
|
|
71
|
-
this.validateStreamOptions(options);
|
|
72
|
-
const startTime = Date.now();
|
|
73
|
-
const timeout = this.getTimeout(options);
|
|
74
|
-
const timeoutController = createTimeoutController(timeout, this.providerName, "stream");
|
|
75
|
-
try {
|
|
76
|
-
const shouldUseTools = !options.disableTools && this.supportsTools();
|
|
77
|
-
const tools = shouldUseTools
|
|
78
|
-
? options.tools || (await this.getAllTools())
|
|
79
|
-
: {};
|
|
80
|
-
const messages = await this.buildMessagesForStream(options);
|
|
81
|
-
const model = await this.getAISDKModelWithMiddleware(options);
|
|
82
|
-
const result = await streamText({
|
|
83
|
-
model,
|
|
84
|
-
messages,
|
|
85
|
-
temperature: options.temperature,
|
|
86
|
-
maxOutputTokens: options.maxTokens,
|
|
87
|
-
tools,
|
|
88
|
-
stopWhen: stepCountIs(options.maxSteps || DEFAULT_MAX_STEPS),
|
|
89
|
-
toolChoice: resolveToolChoice(options, tools, shouldUseTools),
|
|
90
|
-
abortSignal: composeAbortSignals(options.abortSignal, timeoutController?.controller.signal),
|
|
91
|
-
experimental_telemetry: this.telemetryHandler.getTelemetryConfig(options),
|
|
92
|
-
experimental_repairToolCall: this.getToolCallRepairFn(options),
|
|
93
|
-
onStepFinish: ({ toolCalls, toolResults }) => {
|
|
94
|
-
emitToolEndFromStepFinish(this.neurolink?.getEventEmitter(), toolResults);
|
|
95
|
-
this.handleToolExecutionStorage(toolCalls, toolResults, options, new Date()).catch((error) => {
|
|
96
|
-
logger.warn("[FireworksProvider] Failed to store tool executions", {
|
|
97
|
-
provider: this.providerName,
|
|
98
|
-
error: error instanceof Error ? error.message : String(error),
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
timeoutController?.cleanup();
|
|
104
|
-
const transformedStream = this.createTextStream(result);
|
|
105
|
-
const analyticsPromise = streamAnalyticsCollector.createAnalytics(this.providerName, this.modelName, toAnalyticsStreamResult(result), Date.now() - startTime, {
|
|
106
|
-
requestId: `fireworks-stream-${Date.now()}`,
|
|
107
|
-
streamingMode: true,
|
|
108
|
-
});
|
|
109
|
-
return {
|
|
110
|
-
stream: transformedStream,
|
|
111
|
-
provider: this.providerName,
|
|
112
|
-
model: this.modelName,
|
|
113
|
-
analytics: analyticsPromise,
|
|
114
|
-
metadata: { startTime, streamId: `fireworks-${Date.now()}` },
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
timeoutController?.cleanup();
|
|
119
|
-
throw this.handleProviderError(error);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
40
|
getProviderName() {
|
|
123
|
-
return
|
|
41
|
+
return "fireworks";
|
|
124
42
|
}
|
|
125
43
|
getDefaultModel() {
|
|
126
44
|
return getDefaultFireworksModel();
|
|
127
45
|
}
|
|
128
|
-
|
|
129
|
-
return
|
|
46
|
+
getFallbackModelName() {
|
|
47
|
+
return FireworksModels.DEEPSEEK_V4_PRO;
|
|
48
|
+
}
|
|
49
|
+
getFallbackModels() {
|
|
50
|
+
return [
|
|
51
|
+
FireworksModels.DEEPSEEK_V4_PRO,
|
|
52
|
+
FireworksModels.GLM_5P1,
|
|
53
|
+
FireworksModels.GLM_5,
|
|
54
|
+
FireworksModels.KIMI_K2P6,
|
|
55
|
+
FireworksModels.KIMI_K2P5,
|
|
56
|
+
FireworksModels.GPT_OSS_120B,
|
|
57
|
+
];
|
|
130
58
|
}
|
|
131
59
|
formatProviderError(error) {
|
|
132
60
|
if (error instanceof TimeoutError) {
|
|
@@ -149,16 +77,4 @@ export class FireworksProvider extends BaseProvider {
|
|
|
149
77
|
}
|
|
150
78
|
return new ProviderError(`Fireworks error: ${message}`, "fireworks");
|
|
151
79
|
}
|
|
152
|
-
async validateConfiguration() {
|
|
153
|
-
return typeof this.apiKey === "string" && this.apiKey.trim().length > 0;
|
|
154
|
-
}
|
|
155
|
-
getConfiguration() {
|
|
156
|
-
return {
|
|
157
|
-
provider: this.providerName,
|
|
158
|
-
model: this.modelName,
|
|
159
|
-
defaultModel: getDefaultFireworksModel(),
|
|
160
|
-
baseURL: this.baseURL,
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
80
|
}
|
|
164
|
-
export default FireworksProvider;
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
import type { AIProviderName } from "../constants/enums.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import type { LanguageModel } from "../types/index.js";
|
|
2
|
+
import type { NeurolinkCredentials } from "../types/index.js";
|
|
3
|
+
import { OpenAIChatCompletionsProvider } from "./openaiChatCompletionsBase.js";
|
|
5
4
|
/**
|
|
6
|
-
* xAI Grok Provider
|
|
5
|
+
* xAI Grok Provider — direct HTTP, no AI SDK.
|
|
7
6
|
*
|
|
8
|
-
* OpenAI-compatible chat completions at api.x.ai/v1
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* OpenAI-compatible chat completions at api.x.ai/v1 (Grok family:
|
|
8
|
+
* grok-3, grok-3-mini, grok-2-latest, grok-2-vision-latest, grok-beta).
|
|
9
|
+
* All request/stream/tool-loop orchestration lives in
|
|
10
|
+
* `OpenAIChatCompletionsProvider`; this class only declares configuration
|
|
11
|
+
* and provider-specific error mapping.
|
|
11
12
|
*
|
|
12
13
|
* @see https://docs.x.ai/api
|
|
13
14
|
*/
|
|
14
|
-
export declare class XaiProvider extends
|
|
15
|
-
private model;
|
|
16
|
-
private apiKey;
|
|
17
|
-
private baseURL;
|
|
15
|
+
export declare class XaiProvider extends OpenAIChatCompletionsProvider {
|
|
18
16
|
constructor(modelName?: string, sdk?: unknown, _region?: string, credentials?: NeurolinkCredentials["xai"]);
|
|
19
|
-
protected executeStream(options: StreamOptions, _analysisSchema?: ValidationSchema): Promise<StreamResult>;
|
|
20
|
-
private executeStreamInner;
|
|
21
17
|
protected getProviderName(): AIProviderName;
|
|
22
18
|
protected getDefaultModel(): string;
|
|
23
|
-
protected
|
|
19
|
+
protected getFallbackModelName(): string;
|
|
20
|
+
protected getFallbackModels(): string[];
|
|
24
21
|
protected formatProviderError(error: unknown): Error;
|
|
25
|
-
validateConfiguration(): Promise<boolean>;
|
|
26
|
-
getConfiguration(): {
|
|
27
|
-
provider: AIProviderName;
|
|
28
|
-
model: string;
|
|
29
|
-
defaultModel: string;
|
|
30
|
-
baseURL: string;
|
|
31
|
-
};
|
|
32
22
|
}
|
|
33
|
-
export default XaiProvider;
|
package/dist/providers/xai.js
CHANGED
|
@@ -1,135 +1,59 @@
|
|
|
1
|
-
import { createOpenAI } from "@ai-sdk/openai";
|
|
2
1
|
import { XaiModels } from "../constants/enums.js";
|
|
3
|
-
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
|
-
import { DEFAULT_MAX_STEPS } from "../core/constants.js";
|
|
5
|
-
import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
|
|
6
|
-
import { isNeuroLink } from "../neurolink.js";
|
|
7
|
-
import { createLoggingFetch } from "../utils/loggingFetch.js";
|
|
8
|
-
import { tracers, ATTR, withClientStreamSpan } from "../telemetry/index.js";
|
|
9
2
|
import { AuthenticationError, InvalidModelError, NetworkError, ProviderError, RateLimitError, } from "../types/index.js";
|
|
10
3
|
import { logger } from "../utils/logger.js";
|
|
11
4
|
import { createXaiConfig, getProviderModel, validateApiKey, } from "../utils/providerConfig.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { resolveToolChoice } from "../utils/toolChoice.js";
|
|
15
|
-
import { toAnalyticsStreamResult } from "./providerTypeUtils.js";
|
|
16
|
-
import { stepCountIs } from "../utils/tool.js";
|
|
17
|
-
import { streamText } from "../utils/generation.js";
|
|
18
|
-
/**
|
|
19
|
-
* Logging fetch wrapper — masks the proxy URL on non-2xx responses so
|
|
20
|
-
* stack traces and log lines don't leak the upstream's internal token /
|
|
21
|
-
* tenant id (mirrors the deepseek/groq/etc. providers).
|
|
22
|
-
*/
|
|
5
|
+
import { TimeoutError } from "../utils/timeout.js";
|
|
6
|
+
import { OpenAIChatCompletionsProvider } from "./openaiChatCompletionsBase.js";
|
|
23
7
|
const XAI_DEFAULT_BASE_URL = "https://api.x.ai/v1";
|
|
24
8
|
const getXaiApiKey = () => validateApiKey(createXaiConfig());
|
|
25
9
|
const getDefaultXaiModel = () => getProviderModel("XAI_MODEL", XaiModels.GROK_3);
|
|
26
10
|
/**
|
|
27
|
-
* xAI Grok Provider
|
|
11
|
+
* xAI Grok Provider — direct HTTP, no AI SDK.
|
|
28
12
|
*
|
|
29
|
-
* OpenAI-compatible chat completions at api.x.ai/v1
|
|
30
|
-
*
|
|
31
|
-
*
|
|
13
|
+
* OpenAI-compatible chat completions at api.x.ai/v1 (Grok family:
|
|
14
|
+
* grok-3, grok-3-mini, grok-2-latest, grok-2-vision-latest, grok-beta).
|
|
15
|
+
* All request/stream/tool-loop orchestration lives in
|
|
16
|
+
* `OpenAIChatCompletionsProvider`; this class only declares configuration
|
|
17
|
+
* and provider-specific error mapping.
|
|
32
18
|
*
|
|
33
19
|
* @see https://docs.x.ai/api
|
|
34
20
|
*/
|
|
35
|
-
export class XaiProvider extends
|
|
36
|
-
model;
|
|
37
|
-
apiKey;
|
|
38
|
-
baseURL;
|
|
21
|
+
export class XaiProvider extends OpenAIChatCompletionsProvider {
|
|
39
22
|
constructor(modelName, sdk, _region, credentials) {
|
|
40
|
-
|
|
41
|
-
|
|
23
|
+
// Trim the override before applying precedence. A blank/whitespace
|
|
24
|
+
// `credentials.apiKey` must NOT bypass the env key — that would build a
|
|
25
|
+
// client with an unusable bearer token and fail at request time.
|
|
42
26
|
const overrideApiKey = credentials?.apiKey?.trim();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
apiKey: this.apiKey,
|
|
51
|
-
baseURL: this.baseURL,
|
|
52
|
-
fetch: createLoggingFetch("xai"),
|
|
53
|
-
});
|
|
54
|
-
this.model = xai.chat(this.modelName);
|
|
27
|
+
const apiKey = overrideApiKey && overrideApiKey.length > 0
|
|
28
|
+
? overrideApiKey
|
|
29
|
+
: getXaiApiKey();
|
|
30
|
+
const baseURL = credentials?.baseURL?.trim() ||
|
|
31
|
+
process.env.XAI_BASE_URL?.trim() ||
|
|
32
|
+
XAI_DEFAULT_BASE_URL;
|
|
33
|
+
super("xai", modelName, sdk, { baseURL, apiKey });
|
|
55
34
|
logger.debug("xAI Provider initialized", {
|
|
56
35
|
modelName: this.modelName,
|
|
57
36
|
providerName: this.providerName,
|
|
58
|
-
baseURL: this.baseURL,
|
|
37
|
+
baseURL: this.config.baseURL,
|
|
59
38
|
});
|
|
60
39
|
}
|
|
61
|
-
async executeStream(options, _analysisSchema) {
|
|
62
|
-
return withClientStreamSpan({
|
|
63
|
-
name: "neurolink.provider.stream",
|
|
64
|
-
tracer: tracers.provider,
|
|
65
|
-
attributes: {
|
|
66
|
-
[ATTR.GEN_AI_SYSTEM]: "xai",
|
|
67
|
-
[ATTR.GEN_AI_MODEL]: this.modelName,
|
|
68
|
-
[ATTR.GEN_AI_OPERATION]: "stream",
|
|
69
|
-
[ATTR.NL_STREAM_MODE]: true,
|
|
70
|
-
},
|
|
71
|
-
}, async () => this.executeStreamInner(options), (r) => r.stream, (r, wrapped) => ({ ...r, stream: wrapped }));
|
|
72
|
-
}
|
|
73
|
-
async executeStreamInner(options) {
|
|
74
|
-
this.validateStreamOptions(options);
|
|
75
|
-
const startTime = Date.now();
|
|
76
|
-
const timeout = this.getTimeout(options);
|
|
77
|
-
const timeoutController = createTimeoutController(timeout, this.providerName, "stream");
|
|
78
|
-
try {
|
|
79
|
-
const shouldUseTools = !options.disableTools && this.supportsTools();
|
|
80
|
-
const tools = shouldUseTools
|
|
81
|
-
? options.tools || (await this.getAllTools())
|
|
82
|
-
: {};
|
|
83
|
-
const messages = await this.buildMessagesForStream(options);
|
|
84
|
-
const model = await this.getAISDKModelWithMiddleware(options);
|
|
85
|
-
const result = await streamText({
|
|
86
|
-
model,
|
|
87
|
-
messages,
|
|
88
|
-
temperature: options.temperature,
|
|
89
|
-
maxOutputTokens: options.maxTokens,
|
|
90
|
-
tools,
|
|
91
|
-
stopWhen: stepCountIs(options.maxSteps || DEFAULT_MAX_STEPS),
|
|
92
|
-
toolChoice: resolveToolChoice(options, tools, shouldUseTools),
|
|
93
|
-
abortSignal: composeAbortSignals(options.abortSignal, timeoutController?.controller.signal),
|
|
94
|
-
experimental_telemetry: this.telemetryHandler.getTelemetryConfig(options),
|
|
95
|
-
experimental_repairToolCall: this.getToolCallRepairFn(options),
|
|
96
|
-
onStepFinish: ({ toolCalls, toolResults }) => {
|
|
97
|
-
emitToolEndFromStepFinish(this.neurolink?.getEventEmitter(), toolResults);
|
|
98
|
-
this.handleToolExecutionStorage(toolCalls, toolResults, options, new Date()).catch((error) => {
|
|
99
|
-
logger.warn("[XaiProvider] Failed to store tool executions", {
|
|
100
|
-
provider: this.providerName,
|
|
101
|
-
error: error instanceof Error ? error.message : String(error),
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
timeoutController?.cleanup();
|
|
107
|
-
const transformedStream = this.createTextStream(result);
|
|
108
|
-
const analyticsPromise = streamAnalyticsCollector.createAnalytics(this.providerName, this.modelName, toAnalyticsStreamResult(result), Date.now() - startTime, {
|
|
109
|
-
requestId: `xai-stream-${Date.now()}`,
|
|
110
|
-
streamingMode: true,
|
|
111
|
-
});
|
|
112
|
-
return {
|
|
113
|
-
stream: transformedStream,
|
|
114
|
-
provider: this.providerName,
|
|
115
|
-
model: this.modelName,
|
|
116
|
-
analytics: analyticsPromise,
|
|
117
|
-
metadata: { startTime, streamId: `xai-${Date.now()}` },
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
timeoutController?.cleanup();
|
|
122
|
-
throw this.handleProviderError(error);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
40
|
getProviderName() {
|
|
126
|
-
return
|
|
41
|
+
return "xai";
|
|
127
42
|
}
|
|
128
43
|
getDefaultModel() {
|
|
129
44
|
return getDefaultXaiModel();
|
|
130
45
|
}
|
|
131
|
-
|
|
132
|
-
return
|
|
46
|
+
getFallbackModelName() {
|
|
47
|
+
return XaiModels.GROK_3_MINI;
|
|
48
|
+
}
|
|
49
|
+
getFallbackModels() {
|
|
50
|
+
return [
|
|
51
|
+
XaiModels.GROK_3,
|
|
52
|
+
XaiModels.GROK_3_MINI,
|
|
53
|
+
XaiModels.GROK_2_LATEST,
|
|
54
|
+
XaiModels.GROK_2_VISION_LATEST,
|
|
55
|
+
XaiModels.GROK_BETA,
|
|
56
|
+
];
|
|
133
57
|
}
|
|
134
58
|
formatProviderError(error) {
|
|
135
59
|
if (error instanceof TimeoutError) {
|
|
@@ -157,16 +81,4 @@ export class XaiProvider extends BaseProvider {
|
|
|
157
81
|
}
|
|
158
82
|
return new ProviderError(`xAI error: ${message}`, "xai");
|
|
159
83
|
}
|
|
160
|
-
async validateConfiguration() {
|
|
161
|
-
return typeof this.apiKey === "string" && this.apiKey.trim().length > 0;
|
|
162
|
-
}
|
|
163
|
-
getConfiguration() {
|
|
164
|
-
return {
|
|
165
|
-
provider: this.providerName,
|
|
166
|
-
model: this.modelName,
|
|
167
|
-
defaultModel: getDefaultXaiModel(),
|
|
168
|
-
baseURL: this.baseURL,
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
84
|
}
|
|
172
|
-
export default XaiProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.68.
|
|
3
|
+
"version": "9.68.3",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applications with 21+ providers: OpenAI, Anthropic, Google AI Studio, Google Vertex, AWS Bedrock, Azure OpenAI, Mistral, LiteLLM, SageMaker, Hugging Face, Ollama, OpenAI-compatible, OpenRouter, DeepSeek, NVIDIA NIM, LM Studio, llama.cpp, plus voice (OpenAI TTS, ElevenLabs, Deepgram, Azure Speech).",
|
|
6
6
|
"author": {
|