@juspay/neurolink 12.14.8 → 12.14.9
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 +2 -2
- package/dist/adapters/providerImageAdapter.js +1 -0
- package/dist/browser/neurolink.min.js +364 -364
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -0
- package/dist/mcp/servers/aiProviders/aiAnalysisTools.js +43 -30
- package/dist/neurolink.d.ts +4 -1
- package/dist/neurolink.js +41 -6
- package/dist/providers/azureOpenai.js +1 -1
- package/dist/providers/catalog/loader.d.ts +1 -1
- package/dist/providers/catalog/loader.js +30 -1
- package/dist/providers/cohere.js +1 -1
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/googleAiStudio/client.js +6 -5
- package/dist/providers/googleVertex/client.d.ts +11 -30
- package/dist/providers/googleVertex/client.js +49 -131
- package/dist/providers/huggingFace/client.js +1 -1
- package/dist/providers/llamaCpp.js +1 -1
- package/dist/providers/lmStudio.js +1 -1
- package/dist/providers/nvidiaNim/client.js +1 -1
- package/dist/providers/ollama/client.js +1 -1
- package/dist/providers/openRouter/client.js +1 -1
- package/dist/providers/openaiCompatible/client.js +1 -1
- package/dist/utils/timeout.d.ts +13 -2
- package/dist/utils/timeout.js +14 -3
- package/docs-site/static/search-index.json +1 -1
- package/package.json +1 -1
|
@@ -69,7 +69,7 @@ export class LMStudioProvider extends OpenAIChatCompletionsProvider {
|
|
|
69
69
|
},
|
|
70
70
|
...DEFAULT_ERROR_RULES,
|
|
71
71
|
];
|
|
72
|
-
return classifyProviderError(error, rules,
|
|
72
|
+
return classifyProviderError(error, rules, this.providerName, this.modelName);
|
|
73
73
|
}
|
|
74
74
|
async validateConfiguration() {
|
|
75
75
|
return this.probeModelsEndpoint(this.config.apiKey && this.config.apiKey !== LM_STUDIO_PLACEHOLDER_KEY
|
|
@@ -281,7 +281,7 @@ export class NvidiaNimProvider extends OpenAIChatCompletionsProvider {
|
|
|
281
281
|
},
|
|
282
282
|
...DEFAULT_ERROR_RULES,
|
|
283
283
|
];
|
|
284
|
-
return classifyProviderError(error, rules,
|
|
284
|
+
return classifyProviderError(error, rules, this.providerName, this.modelName);
|
|
285
285
|
}
|
|
286
286
|
async validateConfiguration() {
|
|
287
287
|
return (typeof this.config.apiKey === "string" &&
|
|
@@ -136,7 +136,7 @@ export class OllamaProvider extends OpenAIChatCompletionsProvider {
|
|
|
136
136
|
},
|
|
137
137
|
...DEFAULT_ERROR_RULES,
|
|
138
138
|
];
|
|
139
|
-
return classifyProviderError(error, rules,
|
|
139
|
+
return classifyProviderError(error, rules, this.providerName, this.modelName);
|
|
140
140
|
}
|
|
141
141
|
// ===========================================================================
|
|
142
142
|
// Optional hooks — Ollama-specific behaviour
|
|
@@ -149,7 +149,7 @@ export class OpenRouterProvider extends OpenAIChatCompletionsProvider {
|
|
|
149
149
|
},
|
|
150
150
|
...DEFAULT_ERROR_RULES,
|
|
151
151
|
];
|
|
152
|
-
return classifyProviderError(error, rules,
|
|
152
|
+
return classifyProviderError(error, rules, this.providerName, this.modelName);
|
|
153
153
|
}
|
|
154
154
|
// ===========================================================================
|
|
155
155
|
// Optional hooks — provider-specific quirks
|
|
@@ -85,6 +85,6 @@ export class OpenAICompatibleProvider extends OpenAIChatCompletionsProvider {
|
|
|
85
85
|
},
|
|
86
86
|
...DEFAULT_ERROR_RULES,
|
|
87
87
|
];
|
|
88
|
-
return classifyProviderError(error, rules,
|
|
88
|
+
return classifyProviderError(error, rules, this.providerName, this.modelName);
|
|
89
89
|
}
|
|
90
90
|
}
|
package/dist/utils/timeout.d.ts
CHANGED
|
@@ -5,10 +5,21 @@
|
|
|
5
5
|
* Supports multiple time formats: milliseconds, seconds, minutes, hours.
|
|
6
6
|
*/
|
|
7
7
|
import type { TimeoutConfig, TimeoutResult } from "../types/index.js";
|
|
8
|
+
import { TimeoutError as BaseTimeoutError } from "./async/withTimeout.js";
|
|
8
9
|
/**
|
|
9
|
-
* Custom error class for timeout operations
|
|
10
|
+
* Custom error class for timeout operations.
|
|
11
|
+
*
|
|
12
|
+
* Extends the base {@link BaseTimeoutError} (from `./async/withTimeout.js`)
|
|
13
|
+
* rather than `Error` directly, merging what were two independent internal
|
|
14
|
+
* `TimeoutError` classes onto one prototype chain — an `instanceof` check
|
|
15
|
+
* against either module's `TimeoutError` now recognizes errors thrown by
|
|
16
|
+
* this class. Constructor signature, `.name`, and the extra
|
|
17
|
+
* `timeout`/`provider`/`operation` fields are unchanged so all 15 existing
|
|
18
|
+
* `instanceof TimeoutError` call sites keep working exactly as before;
|
|
19
|
+
* `super(message, timeout)` additionally populates the base class's
|
|
20
|
+
* `timeoutMs` field (equal to `timeout`) as a byproduct.
|
|
10
21
|
*/
|
|
11
|
-
export declare class TimeoutError extends
|
|
22
|
+
export declare class TimeoutError extends BaseTimeoutError {
|
|
12
23
|
readonly timeout: number;
|
|
13
24
|
readonly provider?: string | undefined;
|
|
14
25
|
readonly operation?: "generate" | "stream" | undefined;
|
package/dist/utils/timeout.js
CHANGED
|
@@ -4,15 +4,26 @@
|
|
|
4
4
|
* Provides flexible timeout parsing and error handling for AI operations.
|
|
5
5
|
* Supports multiple time formats: milliseconds, seconds, minutes, hours.
|
|
6
6
|
*/
|
|
7
|
+
import { TimeoutError as BaseTimeoutError } from "./async/withTimeout.js";
|
|
7
8
|
/**
|
|
8
|
-
* Custom error class for timeout operations
|
|
9
|
+
* Custom error class for timeout operations.
|
|
10
|
+
*
|
|
11
|
+
* Extends the base {@link BaseTimeoutError} (from `./async/withTimeout.js`)
|
|
12
|
+
* rather than `Error` directly, merging what were two independent internal
|
|
13
|
+
* `TimeoutError` classes onto one prototype chain — an `instanceof` check
|
|
14
|
+
* against either module's `TimeoutError` now recognizes errors thrown by
|
|
15
|
+
* this class. Constructor signature, `.name`, and the extra
|
|
16
|
+
* `timeout`/`provider`/`operation` fields are unchanged so all 15 existing
|
|
17
|
+
* `instanceof TimeoutError` call sites keep working exactly as before;
|
|
18
|
+
* `super(message, timeout)` additionally populates the base class's
|
|
19
|
+
* `timeoutMs` field (equal to `timeout`) as a byproduct.
|
|
9
20
|
*/
|
|
10
|
-
export class TimeoutError extends
|
|
21
|
+
export class TimeoutError extends BaseTimeoutError {
|
|
11
22
|
timeout;
|
|
12
23
|
provider;
|
|
13
24
|
operation;
|
|
14
25
|
constructor(message, timeout, provider, operation) {
|
|
15
|
-
super(message);
|
|
26
|
+
super(message, timeout);
|
|
16
27
|
this.timeout = timeout;
|
|
17
28
|
this.provider = provider;
|
|
18
29
|
this.operation = operation;
|