@juspay/neurolink 9.69.1 → 9.69.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 +8 -0
- package/dist/browser/neurolink.min.js +353 -338
- package/dist/client/aiSdkAdapter.d.ts +4 -3
- package/dist/client/aiSdkAdapter.js +4 -3
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.js +2 -1
- package/dist/lib/client/aiSdkAdapter.d.ts +4 -3
- package/dist/lib/client/aiSdkAdapter.js +4 -3
- package/dist/lib/client/index.d.ts +2 -1
- package/dist/lib/client/index.js +2 -1
- package/dist/lib/providers/anthropic.d.ts +5 -3
- package/dist/lib/providers/anthropic.js +842 -162
- package/dist/lib/providers/googleVertex.js +15 -1
- package/dist/lib/utils/noOutputSentinel.d.ts +1 -1
- package/dist/lib/utils/noOutputSentinel.js +1 -1
- package/dist/providers/anthropic.d.ts +5 -3
- package/dist/providers/anthropic.js +842 -162
- package/dist/providers/googleVertex.js +15 -1
- package/dist/utils/noOutputSentinel.d.ts +1 -1
- package/dist/utils/noOutputSentinel.js +1 -1
- package/package.json +2 -1
- package/dist/lib/providers/anthropicBaseProvider.d.ts +0 -23
- package/dist/lib/providers/anthropicBaseProvider.js +0 -213
- package/dist/providers/anthropicBaseProvider.d.ts +0 -23
- package/dist/providers/anthropicBaseProvider.js +0 -212
|
@@ -2036,7 +2036,21 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
2036
2036
|
async createAnthropicVertexClient(timeoutMs) {
|
|
2037
2037
|
const mod = await getAnthropicVertexModule();
|
|
2038
2038
|
const settings = await createVertexAnthropicSettings(this.location, timeoutMs);
|
|
2039
|
-
|
|
2039
|
+
const client = new mod.AnthropicVertex(settings);
|
|
2040
|
+
// The vertex SDK eagerly starts Google ADC resolution in its constructor
|
|
2041
|
+
// (`this._authClientPromise = this._auth.getClient()`) and only awaits it
|
|
2042
|
+
// per-request in `prepareOptions()`. A client that is constructed but never
|
|
2043
|
+
// used — or built with misconfigured credentials — would otherwise leak
|
|
2044
|
+
// that rejection as a process-level `unhandledRejection`. Attaching a
|
|
2045
|
+
// handler here marks the promise as handled (so Node no longer reports it);
|
|
2046
|
+
// it does not consume the rejection — the per-request `await` in
|
|
2047
|
+
// `prepareOptions()` is a separate continuation and still surfaces auth
|
|
2048
|
+
// errors to callers. `void` flags the returned promise as deliberately
|
|
2049
|
+
// ignored (codebase convention for fire-and-forget).
|
|
2050
|
+
void client._authClientPromise?.catch(() => {
|
|
2051
|
+
// Intentionally ignored — see above.
|
|
2052
|
+
});
|
|
2053
|
+
return client;
|
|
2040
2054
|
}
|
|
2041
2055
|
/**
|
|
2042
2056
|
* Execute stream using native @anthropic-ai/vertex-sdk for Claude models on Vertex AI
|
|
@@ -44,7 +44,7 @@ underlyingError?: unknown): Promise<{
|
|
|
44
44
|
* observation with the enriched status message. Without this, only
|
|
45
45
|
* `StreamHandler`-based providers produced the rich telemetry; the
|
|
46
46
|
* provider-specific paths (openAI, openaiCompatible, litellm,
|
|
47
|
-
* huggingFace, openRouter,
|
|
47
|
+
* huggingFace, openRouter, anthropic) yielded the sentinel
|
|
48
48
|
* to direct stream consumers but Pipeline B saw nothing.
|
|
49
49
|
*
|
|
50
50
|
* Stamps three attributes:
|
|
@@ -135,7 +135,7 @@ underlyingError) {
|
|
|
135
135
|
* observation with the enriched status message. Without this, only
|
|
136
136
|
* `StreamHandler`-based providers produced the rich telemetry; the
|
|
137
137
|
* provider-specific paths (openAI, openaiCompatible, litellm,
|
|
138
|
-
* huggingFace, openRouter,
|
|
138
|
+
* huggingFace, openRouter, anthropic) yielded the sentinel
|
|
139
139
|
* to direct stream consumers but Pipeline B saw nothing.
|
|
140
140
|
*
|
|
141
141
|
* Stamps three attributes:
|
|
@@ -21,7 +21,7 @@ declare const ANTHROPIC_BETA_HEADERS: {
|
|
|
21
21
|
* Enhanced with OAuth support, subscription tiers, and beta headers for Claude Code integration.
|
|
22
22
|
*/
|
|
23
23
|
export declare class AnthropicProvider extends BaseProvider {
|
|
24
|
-
private
|
|
24
|
+
private client;
|
|
25
25
|
private readonly authMethod;
|
|
26
26
|
private readonly subscriptionTier;
|
|
27
27
|
private readonly enableBetaFeatures;
|
|
@@ -129,7 +129,10 @@ export declare class AnthropicProvider extends BaseProvider {
|
|
|
129
129
|
getProviderName(): AIProviderName;
|
|
130
130
|
getDefaultModel(): string;
|
|
131
131
|
/**
|
|
132
|
-
* Returns
|
|
132
|
+
* Returns a V3-shaped delegating model whose `doGenerate` drives the
|
|
133
|
+
* official Anthropic Messages API directly. BaseProvider's `generate()`
|
|
134
|
+
* path (and its middleware wrapping) keeps working unchanged; the
|
|
135
|
+
* streaming path bypasses this entirely via `executeStream`.
|
|
133
136
|
*/
|
|
134
137
|
getAISDKModel(): LanguageModel;
|
|
135
138
|
protected formatProviderError(error: unknown): Error;
|
|
@@ -144,4 +147,3 @@ export declare class AnthropicProvider extends BaseProvider {
|
|
|
144
147
|
}
|
|
145
148
|
export { getModelCapabilities, getRecommendedModelForTier, isModelAvailableForTier, ModelAccessError, } from "../models/anthropicModels.js";
|
|
146
149
|
export { ANTHROPIC_BETA_HEADERS };
|
|
147
|
-
export default AnthropicProvider;
|