@juspay/neurolink 13.10.4 → 13.11.0
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 +7 -2
- package/dist/agent/agent.js +7 -6
- package/dist/browser/neurolink.min.js +429 -429
- package/dist/core/nativeGenerateLoop.js +241 -3
- package/dist/providers/anthropic/client.d.ts +8 -0
- package/dist/providers/anthropic/client.js +20 -0
- package/dist/providers/anthropic/loopAdapter.js +86 -41
- package/dist/providers/anthropic/threads.d.ts +43 -0
- package/dist/providers/anthropic/threads.js +200 -0
- package/dist/server/routes/claudeProxyRoutes.js +19 -1
- package/dist/types/generate.d.ts +10 -0
- package/dist/types/loopEngine.d.ts +41 -0
- package/dist/types/stream.d.ts +16 -0
- package/docs-site/static/search-index.json +1 -0
- package/package.json +8 -6
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message threads for the native Anthropic loop (beta, `message-threads-2026-08-12`).
|
|
3
|
+
*
|
|
4
|
+
* Without a thread every step of a turn resends the whole conversation. With
|
|
5
|
+
* one, the first step sends it with `thread: {type: "create"}` and each later
|
|
6
|
+
* step sends only the messages since the last response, plus the previous
|
|
7
|
+
* response id. The API keeps the conversation in memory for a few minutes and
|
|
8
|
+
* is best-effort about it, so the caller stays the source of truth: this
|
|
9
|
+
* module only decides, per step, whether the thread can be continued, and
|
|
10
|
+
* otherwise plans a `create` that sends everything again.
|
|
11
|
+
*
|
|
12
|
+
* A thread can be continued only when nothing the API fixed at creation has
|
|
13
|
+
* changed (model, tools, system, tool choice, thinking, output config and the
|
|
14
|
+
* beta set) and the messages already sent are untouched. Anything that
|
|
15
|
+
* rewrites history, such as a context reclaim, therefore starts a new thread
|
|
16
|
+
* by itself.
|
|
17
|
+
*/
|
|
18
|
+
import { createHash } from "node:crypto";
|
|
19
|
+
export const MESSAGE_THREADS_BETA = "message-threads-2026-08-12";
|
|
20
|
+
/** Stop reasons after which the API has stored the response as a continuable turn. */
|
|
21
|
+
const STORABLE_STOP_REASONS = new Set([
|
|
22
|
+
"end_turn",
|
|
23
|
+
"tool_use",
|
|
24
|
+
"stop_sequence",
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* Record how a step's response ended. The API stores a thread turn only when
|
|
28
|
+
* the response ended normally; a refusal, a cut-off or an early end is resent
|
|
29
|
+
* in full by the next step.
|
|
30
|
+
*/
|
|
31
|
+
export function settleThread(session, response) {
|
|
32
|
+
if (!session.enabled) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (response.sawTerminalEvent &&
|
|
36
|
+
response.messageId !== undefined &&
|
|
37
|
+
response.stopReason !== undefined &&
|
|
38
|
+
STORABLE_STOP_REASONS.has(response.stopReason)) {
|
|
39
|
+
session.accept(response.messageId);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
session.reset();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const sha = (value) => createHash("sha256")
|
|
46
|
+
.update(JSON.stringify(value) ?? "")
|
|
47
|
+
.digest("hex");
|
|
48
|
+
// A cache breakpoint is a request for caching, not content: the same message
|
|
49
|
+
// carries a different one on the request that first sends it and the one that
|
|
50
|
+
// replays it, so it must not decide whether a prefix is unchanged.
|
|
51
|
+
const withoutCacheControl = (value) => {
|
|
52
|
+
if (Array.isArray(value)) {
|
|
53
|
+
return value.map(withoutCacheControl);
|
|
54
|
+
}
|
|
55
|
+
if (value !== null && typeof value === "object") {
|
|
56
|
+
const out = {};
|
|
57
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
58
|
+
if (key !== "cache_control") {
|
|
59
|
+
out[key] = withoutCacheControl(entry);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
return value;
|
|
65
|
+
};
|
|
66
|
+
const FIXED_FIELDS = [
|
|
67
|
+
"model",
|
|
68
|
+
"system",
|
|
69
|
+
"tools",
|
|
70
|
+
"tool_choice",
|
|
71
|
+
"thinking",
|
|
72
|
+
"output_config",
|
|
73
|
+
"mcp_servers",
|
|
74
|
+
"context_management",
|
|
75
|
+
"container",
|
|
76
|
+
"cache_control",
|
|
77
|
+
];
|
|
78
|
+
const mergeBetas = (existing) => [
|
|
79
|
+
...new Set([...(existing ?? "").split(","), MESSAGE_THREADS_BETA]
|
|
80
|
+
.map((beta) => beta.trim())
|
|
81
|
+
.filter(Boolean)),
|
|
82
|
+
].join(",");
|
|
83
|
+
/**
|
|
84
|
+
* Start the thread state for one turn.
|
|
85
|
+
*
|
|
86
|
+
* @param betaHeader the `anthropic-beta` value the client already sends; the
|
|
87
|
+
* thread beta is added to it, identically on every request of the thread.
|
|
88
|
+
*/
|
|
89
|
+
export function createAnthropicThreadSession(betaHeader) {
|
|
90
|
+
const headers = { "anthropic-beta": mergeBetas(betaHeader) };
|
|
91
|
+
let enabled = true;
|
|
92
|
+
let previousMessageId;
|
|
93
|
+
// What the thread holds after the last accepted response: the fingerprint of
|
|
94
|
+
// the fixed fields and one hash per message the request carried. The reply
|
|
95
|
+
// the API stored after them is not hashed; it is the API's own copy.
|
|
96
|
+
let stored;
|
|
97
|
+
let pending;
|
|
98
|
+
return {
|
|
99
|
+
get enabled() {
|
|
100
|
+
return enabled;
|
|
101
|
+
},
|
|
102
|
+
plan(params) {
|
|
103
|
+
const bag = { ...params };
|
|
104
|
+
const fixed = {
|
|
105
|
+
betas: headers["anthropic-beta"],
|
|
106
|
+
};
|
|
107
|
+
for (const field of FIXED_FIELDS) {
|
|
108
|
+
fixed[field] = bag[field];
|
|
109
|
+
}
|
|
110
|
+
const fingerprint = sha(fixed);
|
|
111
|
+
const hashes = params.messages.map((message) => sha(withoutCacheControl(message)));
|
|
112
|
+
pending = { fingerprint, hashes };
|
|
113
|
+
// The stored reply sits between the messages already sent and the new ones.
|
|
114
|
+
const held = stored ? stored.hashes.length + 1 : 0;
|
|
115
|
+
const canContinue = previousMessageId !== undefined &&
|
|
116
|
+
stored !== undefined &&
|
|
117
|
+
stored.fingerprint === fingerprint &&
|
|
118
|
+
params.messages.length > held &&
|
|
119
|
+
stored.hashes.every((hash, index) => hashes[index] === hash);
|
|
120
|
+
if (canContinue && previousMessageId !== undefined) {
|
|
121
|
+
// system and tools belong to the create request; sending either on a
|
|
122
|
+
// continue, even empty, is rejected.
|
|
123
|
+
const { system: _system, tools: _tools, ...rest } = params;
|
|
124
|
+
return {
|
|
125
|
+
mode: "continue",
|
|
126
|
+
params: {
|
|
127
|
+
...rest,
|
|
128
|
+
messages: params.messages.slice(held),
|
|
129
|
+
thread: {
|
|
130
|
+
type: "continue",
|
|
131
|
+
previous_message_id: previousMessageId,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
headers,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
mode: "create",
|
|
139
|
+
params: { ...params, thread: { type: "create" } },
|
|
140
|
+
headers,
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
accept(messageId) {
|
|
144
|
+
if (pending === undefined) {
|
|
145
|
+
previousMessageId = undefined;
|
|
146
|
+
stored = undefined;
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
previousMessageId = messageId;
|
|
150
|
+
stored = pending;
|
|
151
|
+
pending = undefined;
|
|
152
|
+
},
|
|
153
|
+
reset() {
|
|
154
|
+
previousMessageId = undefined;
|
|
155
|
+
stored = undefined;
|
|
156
|
+
pending = undefined;
|
|
157
|
+
},
|
|
158
|
+
disable() {
|
|
159
|
+
enabled = false;
|
|
160
|
+
previousMessageId = undefined;
|
|
161
|
+
stored = undefined;
|
|
162
|
+
pending = undefined;
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/** The API's `error.details.error_code` for a thread request that was refused, if there is one. */
|
|
167
|
+
export function threadErrorCode(error) {
|
|
168
|
+
if (typeof error !== "object" || error === null) {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
const body = error.error;
|
|
172
|
+
const inner = typeof body === "object" && body !== null
|
|
173
|
+
? body.error
|
|
174
|
+
: undefined;
|
|
175
|
+
const details = typeof inner === "object" && inner !== null
|
|
176
|
+
? inner.details
|
|
177
|
+
: undefined;
|
|
178
|
+
const code = typeof details === "object" && details !== null
|
|
179
|
+
? details.error_code
|
|
180
|
+
: undefined;
|
|
181
|
+
return typeof code === "string" ? code : undefined;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* What to do after a thread request fails: send everything again as a new
|
|
185
|
+
* thread, send it without a thread at all, or neither (an ordinary error).
|
|
186
|
+
*/
|
|
187
|
+
export function threadRecovery(error) {
|
|
188
|
+
const code = threadErrorCode(error);
|
|
189
|
+
switch (code) {
|
|
190
|
+
case "thread_not_found":
|
|
191
|
+
case "thread_already_continued":
|
|
192
|
+
case "thread_continue_in_flight":
|
|
193
|
+
case "thread_fingerprint_mismatch":
|
|
194
|
+
return "recreate";
|
|
195
|
+
case "thread_unsupported_request":
|
|
196
|
+
return "unthreaded";
|
|
197
|
+
default:
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -2204,6 +2204,12 @@ const SNAPSHOT_STABLE_HEADERS = new Set([
|
|
|
2204
2204
|
"x-stainless-timeout",
|
|
2205
2205
|
"x-subscription-tier",
|
|
2206
2206
|
]);
|
|
2207
|
+
/**
|
|
2208
|
+
* Anthropic message threads (beta). The Anthropic provider sends this on a
|
|
2209
|
+
* request that carries a `thread` field; the proxy forwards it when a client
|
|
2210
|
+
* names it. Kept as a literal here so the proxy does not import a provider.
|
|
2211
|
+
*/
|
|
2212
|
+
const MESSAGE_THREADS_BETA = "message-threads-2026-08-12";
|
|
2207
2213
|
const NON_CLAUDE_OAUTH_BETAS = [
|
|
2208
2214
|
"oauth-2025-04-20",
|
|
2209
2215
|
"claude-code-20250219",
|
|
@@ -6957,9 +6963,15 @@ async function prepareAnthropicAccountAttempt(args) {
|
|
|
6957
6963
|
const proxyBetas = isClaudeClientRequest
|
|
6958
6964
|
? CLAUDE_CODE_OAUTH_BETAS
|
|
6959
6965
|
: NON_CLAUDE_OAUTH_BETAS;
|
|
6966
|
+
// Message threads (opt-in per call by the client) must reach the upstream
|
|
6967
|
+
// intact: a request carrying a `thread` body field is rejected without the
|
|
6968
|
+
// beta. It stays out of proxyBetas, so it is only forwarded when a client
|
|
6969
|
+
// asks for it, and a tier that lacks it is skipped without re-ranking the
|
|
6970
|
+
// pool (clientSuppliedBetaForwarded below).
|
|
6960
6971
|
const knownBetas = new Set([
|
|
6961
6972
|
...CLAUDE_CODE_OAUTH_BETAS,
|
|
6962
6973
|
...NON_CLAUDE_OAUTH_BETAS,
|
|
6974
|
+
MESSAGE_THREADS_BETA,
|
|
6963
6975
|
]);
|
|
6964
6976
|
const clientBetas = (headers["anthropic-beta"] ?? "")
|
|
6965
6977
|
.split(",")
|
|
@@ -6970,7 +6982,13 @@ async function prepareAnthropicAccountAttempt(args) {
|
|
|
6970
6982
|
// not send; everyone else is held to the proxy's own set.
|
|
6971
6983
|
const existing = new Set(genuineClaudeCode
|
|
6972
6984
|
? clientBetas
|
|
6973
|
-
: clientBetas.filter((beta) => knownBetas.has(beta)
|
|
6985
|
+
: clientBetas.filter((beta) => knownBetas.has(beta) &&
|
|
6986
|
+
// Request-scoped: a beta replayed from a captured snapshot is
|
|
6987
|
+
// not this client's ask, and a tier without it would reject it.
|
|
6988
|
+
(beta !== MESSAGE_THREADS_BETA ||
|
|
6989
|
+
(filteredHeaders["anthropic-beta"] ?? "")
|
|
6990
|
+
.split(",")
|
|
6991
|
+
.some((own) => own.trim() === beta))));
|
|
6974
6992
|
clientSuppliedBetaForwarded = [...existing].some((beta) => !proxyBetas.includes(beta));
|
|
6975
6993
|
for (const beta of proxyBetas) {
|
|
6976
6994
|
existing.add(beta);
|
package/dist/types/generate.d.ts
CHANGED
|
@@ -1916,3 +1916,13 @@ export type SingleShotResult = {
|
|
|
1916
1916
|
};
|
|
1917
1917
|
finishReason?: string;
|
|
1918
1918
|
};
|
|
1919
|
+
/** The part of a Zod issue that date revival in `validateToolInput` reads. */
|
|
1920
|
+
export type ToolDateIssue = {
|
|
1921
|
+
code?: unknown;
|
|
1922
|
+
expected?: unknown;
|
|
1923
|
+
path?: unknown;
|
|
1924
|
+
/** Zod 4: the issues of each branch of a union, with paths relative to it. */
|
|
1925
|
+
errors?: unknown;
|
|
1926
|
+
/** Zod 3: one entry per union branch, its issues carrying absolute paths. */
|
|
1927
|
+
unionErrors?: unknown;
|
|
1928
|
+
};
|
|
@@ -238,6 +238,41 @@ export type AgenticLoopAdapter<TConversation = unknown, TRaw = unknown> = {
|
|
|
238
238
|
* Anthropic has never had one, and setting it for both would change native
|
|
239
239
|
* Anthropic's behaviour under the guise of a shared refactor.
|
|
240
240
|
*/
|
|
241
|
+
/** The `thread` field of an Anthropic Messages request (message threads, beta). */
|
|
242
|
+
export type AnthropicThreadRef = {
|
|
243
|
+
type: "create";
|
|
244
|
+
} | {
|
|
245
|
+
type: "continue";
|
|
246
|
+
previous_message_id: string;
|
|
247
|
+
};
|
|
248
|
+
/** One step's request, shaped for a thread. */
|
|
249
|
+
export type AnthropicThreadPlan = {
|
|
250
|
+
/** `continue` sends only the new messages and leaves out `system` and `tools`. */
|
|
251
|
+
mode: "create" | "continue";
|
|
252
|
+
params: Anthropic.Messages.MessageCreateParams & AnthropicSamplingParams & {
|
|
253
|
+
thread: AnthropicThreadRef;
|
|
254
|
+
};
|
|
255
|
+
/** The `anthropic-beta` value for this request: the client's own plus the thread beta. */
|
|
256
|
+
headers: Record<string, string>;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* The state of one Anthropic message thread across the steps of a turn.
|
|
260
|
+
*
|
|
261
|
+
* The thread lives on the server for minutes and is best-effort, so this is a
|
|
262
|
+
* cache of a conversation the caller still owns: whenever it is unsure, the
|
|
263
|
+
* next plan is a `create` that resends everything.
|
|
264
|
+
*/
|
|
265
|
+
export type AnthropicThreadSession = {
|
|
266
|
+
/** False once the API has said it cannot thread this request. */
|
|
267
|
+
readonly enabled: boolean;
|
|
268
|
+
plan(params: Anthropic.Messages.MessageCreateParams & AnthropicSamplingParams): AnthropicThreadPlan;
|
|
269
|
+
/** The response was complete and stored: the next step may continue from it. */
|
|
270
|
+
accept(messageId: string): void;
|
|
271
|
+
/** The next plan is a `create`. */
|
|
272
|
+
reset(): void;
|
|
273
|
+
/** Stop threading for the rest of the turn. */
|
|
274
|
+
disable(): void;
|
|
275
|
+
};
|
|
241
276
|
/**
|
|
242
277
|
* Construction input for `createAnthropicLoopAdapter`, shared by direct
|
|
243
278
|
* Anthropic and Claude-on-Vertex.
|
|
@@ -267,6 +302,12 @@ export type AnthropicLoopAdapterConfig<TMessage = Anthropic.Messages.MessagePara
|
|
|
267
302
|
/** Provider name recorded on each step's generation and used to price it. */
|
|
268
303
|
provider: string;
|
|
269
304
|
maxSteps: number;
|
|
305
|
+
/**
|
|
306
|
+
* Send the turn's steps as an Anthropic message thread. Only the direct
|
|
307
|
+
* Anthropic client sets it, and only on request; without it every step
|
|
308
|
+
* resends the whole conversation, as before.
|
|
309
|
+
*/
|
|
310
|
+
threads?: AnthropicThreadSession;
|
|
270
311
|
/**
|
|
271
312
|
* Build one step's request. A closure so the per-turn work the caller
|
|
272
313
|
* already does — system prompt, tool declarations, sampling, thinking
|
package/dist/types/stream.d.ts
CHANGED
|
@@ -562,6 +562,22 @@ export type StreamOptions = {
|
|
|
562
562
|
* Also rejected up front.
|
|
563
563
|
*/
|
|
564
564
|
executionControl?: ExecutionControlOptions;
|
|
565
|
+
/**
|
|
566
|
+
* Send this turn's steps as an Anthropic message thread (beta,
|
|
567
|
+
* `message-threads-2026-08-12`): the first step sends the whole conversation
|
|
568
|
+
* and a later step only the messages since the last response, while nothing
|
|
569
|
+
* the thread fixes has changed (otherwise it starts a new thread), so the
|
|
570
|
+
* request stops growing with the turn. Off by default.
|
|
571
|
+
*
|
|
572
|
+
* Native Anthropic streaming with API-key auth only; other providers and
|
|
573
|
+
* OAuth ignore it. The server keeps a thread for minutes and may drop it, in
|
|
574
|
+
* which case the step is resent in full; a change to the tools, system
|
|
575
|
+
* prompt, tool choice or earlier messages starts a new thread. Threads are
|
|
576
|
+
* not zero-data-retention eligible, and the API has no way to delete one
|
|
577
|
+
* (it expires within an hour). It was measured to shrink the request, not to
|
|
578
|
+
* lower time to first token when prompt caching is already on.
|
|
579
|
+
*/
|
|
580
|
+
messageThreads?: boolean;
|
|
565
581
|
/** Max time with no progress before the turn ends as "stalled" (ms). Native Vertex loops only — see GenerateOptions.stallTimeoutMs. */
|
|
566
582
|
stallTimeoutMs?: number;
|
|
567
583
|
/** Remaining-time threshold that triggers the wrap-up nudge (ms). See GenerateOptions.wrapupTimeLeadMs. */
|
|
@@ -4822,6 +4822,7 @@
|
|
|
4822
4822
|
{"objectID":"7c0ca9930269015ceab0ba6b8a429bd7dbbfda29600c3f353bbef0249f0ff5fc","title":"Configuration","url":"/docs/getting-started/providers/anthropic#configuration","content":"Configuration","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"Configuration","lvl3":""}},
|
|
4823
4823
|
{"objectID":"57cf0f7394ea15937bfa56393a1810810e6ac4f8b0ad606cd7884760e89b051d","title":"CLI Usage","url":"/docs/getting-started/providers/anthropic#cli-usage","content":"CLI Usage","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"CLI Usage","lvl3":""}},
|
|
4824
4824
|
{"objectID":"363647b336363b9f2e8dae713031aec7e297f0f0fa3799cec3280131890f6226","title":"Beta Features","url":"/docs/getting-started/providers/anthropic#beta-features","content":"The Anthropic provider supports beta features via the anthropic-beta header. The following beta headers are included by default when enableBetaFeatures is true:\nclaude-code-20250219 -- Claude Code specific features\ninterleaved-thinking-2025-05-14 -- Interleaved thinking mode\nfine-grained-tool-streaming-2025-05-14 -- Fine-grained tool streaming\n\nThese correspond to the AnthropicBetaFeature enum values in src/lib/constants/enums.ts:\n\nFor OAuth mode, the beta headers are different: oauth-2025-04-20 and interleaved-thinking-2025-05-14 are sent (the claude-code-20250219 header is only included if it was present in the original request headers, as it can trigger authorization errors with OAuth tokens).","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"Beta Features","lvl3":""}},
|
|
4825
|
+
{"objectID":"e8a6ea83967bb6e1e6fe7208c5e1d1aa868e114173dca65e43938b6fddca5ae6","title":"Message threads (beta)","url":"/docs/getting-started/providers/anthropic#message-threads-beta","content":"A turn with tools makes several requests, and each one carries the whole conversation so far. With messageThreads: true the first request creates an Anthropic message thread. A later request sends only the messages since the last response, plus the previous response id, while nothing the thread fixes has changed; otherwise it sends the whole conversation as a new thread. It adds the message-threads-2026-08-12 beta header to those requests.\n\nWhat to know before turning it on:\nIt shrinks the request, it did not lower latency in a measurement. Against the Messages API, with prompt caching on in both modes, a tool turn's later requests went from about 79 KB to about 0.3 KB at 25k tokens of context, and from about 337 KB to about 0.3 KB at 110k tokens. Median time to first token was the same either way (672 vs 700 ms, and 739 vs 724 ms; one model, one network, no tools in the loop). The saving is bandwidth, not time.\nStreaming stream() turns on API-key auth only. generate(), other providers and OAuth (subscription) auth ignore the option.\nIt is best-effort and the conversation stays yours. The API keeps a thread in memory for a few minutes. If it cannot continue one (thread_not_found and similar), the same step is resent once in full as a new thread. If it cannot thread the request at all (thread_unsupported_request: HIPAA or inference-hook organisations, for example), that step and the rest of the turn go out unthreaded.\nAnything a thread fixes starts a new one. A change to the tools, the system prompt, the tool choice or the earlier messages (a context reclaim, for example) is sent as a new thread rather than a continue. A forced first-step tool choice therefore makes step 2 a new thread.\nA cut-off, refused or otherwise abnormal response is never continued from.\nRetention. Threads are not zero-data-retention eligible, there is no API to delete one, and each is deleted within an hour of its last use.","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"Message threads (beta)","lvl3":""}},
|
|
4825
4826
|
{"objectID":"b11311c624dc33cf3ddb6888c5ff085a18e0ce089b0db5cdb15bd2ebe2b70bf7","title":"Multimodal Capabilities","url":"/docs/getting-started/providers/anthropic#multimodal-capabilities","content":"Claude models with vision support can analyze images.","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"Multimodal Capabilities","lvl3":""}},
|
|
4826
4827
|
{"objectID":"b9d325e6a6e5e5934dc6e4662fa16de4b606dfc6e2184e7a41dc7e60d4d59fe8","title":"Image Analysis","url":"/docs/getting-started/providers/anthropic#image-analysis","content":"Image Analysis","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"Image Analysis","lvl3":""}},
|
|
4827
4828
|
{"objectID":"173aa07da1c648c3a005ea3cd6bcee2016d7a2fa4401ea8cdfe440615545abe3","title":"PDF Processing","url":"/docs/getting-started/providers/anthropic#pdf-processing","content":"PDF Processing","hierarchy":{"lvl0":"Getting Started","lvl1":"Anthropic Provider Guide","lvl2":"PDF Processing","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.11.0",
|
|
4
4
|
"packageManager": "pnpm@10.34.9+sha512.f49b5a8ea0fdedb44bb3c0c1d6575092a53c2950d95b7ad15df11f17974877a2de3a01c07e934e9b28ce716e51c09a94962c7306d09be2e1e4b18a8c8762fd32",
|
|
5
5
|
"description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
|
|
6
6
|
"author": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"preview": "vite preview",
|
|
42
42
|
"prepare": "git rev-parse --git-dir > /dev/null 2>&1 && husky install || echo 'Skipping husky in non-git environment'",
|
|
43
43
|
"prepack": "svelte-kit sync && svelte-package && pnpm run build:react-hooks && pnpm run build:cli && pnpm run build:browser && publint",
|
|
44
|
-
"build:react-hooks": "pnpm exec tsc --jsx react-jsx --module nodenext --moduleResolution nodenext --target esnext --esModuleInterop --skipLibCheck --strict --outDir dist --declaration false src/lib/client/reactHooks.tsx",
|
|
44
|
+
"build:react-hooks": "pnpm exec tsc --jsx react-jsx --module nodenext --moduleResolution nodenext --target esnext --esModuleInterop --skipLibCheck --strict --ignoreConfig --outDir dist --declaration false src/lib/client/reactHooks.tsx",
|
|
45
45
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit --strict",
|
|
46
46
|
"check:models": "tsx tools/check-model-liveness.ts",
|
|
47
47
|
"check:ci-scripts": "svelte-kit sync && tsc -p tsconfig.ci-scripts.json",
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"test:thinking-config": "pnpm exec tsx test/continuous-test-suite-sdk-thinking-config.ts",
|
|
169
169
|
"test:gemini-thinking-level": "pnpm exec tsx test/continuous-test-suite-gemini-thinking-level.ts",
|
|
170
170
|
"test:gemini-thinking-level-ai-studio": "pnpm exec tsx test/continuous-test-suite-gemini-thinking-level-ai-studio.ts",
|
|
171
|
+
"test:anthropic-message-threads": "pnpm exec tsx test/continuous-test-suite-anthropic-message-threads.ts",
|
|
171
172
|
"test:anthropic-toolchoice": "pnpm exec tsx test/continuous-test-suite-anthropic-toolchoice.ts",
|
|
172
173
|
"test:mcp:spans": "pnpm exec tsx test/continuous-test-suite-mcp-spans.ts",
|
|
173
174
|
"test:mcp:infra": "pnpm exec tsx test/continuous-test-suite-mcp-infra.ts",
|
|
@@ -245,6 +246,7 @@
|
|
|
245
246
|
"test:proxy": "pnpm exec tsx test/continuous-test-suite-proxy.ts",
|
|
246
247
|
"test:proxy-egress": "pnpm exec tsx test/continuous-test-suite-proxy-egress.ts",
|
|
247
248
|
"test:proxy-connect-retry": "pnpm exec tsx test/continuous-test-suite-proxy-connect-retry.ts",
|
|
249
|
+
"test:proxy-message-threads-beta": "pnpm exec tsx test/continuous-test-suite-proxy-message-threads-beta.ts",
|
|
248
250
|
"test:proxy-reliability": "node scripts/run-proxy-reliability.mjs",
|
|
249
251
|
"test:proxy-telemetry": "pnpm exec tsx test/continuous-test-suite-proxy-telemetry.ts",
|
|
250
252
|
"test:proxy-usage": "pnpm exec tsx test/continuous-test-suite-proxy-usage-2049.ts",
|
|
@@ -675,8 +677,8 @@
|
|
|
675
677
|
"@types/react": "19.2.14",
|
|
676
678
|
"@types/tar-stream": "3.1.4",
|
|
677
679
|
"@types/yargs": "17.0.35",
|
|
678
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
679
|
-
"@typescript-eslint/parser": "8.
|
|
680
|
+
"@typescript-eslint/eslint-plugin": "8.72.1",
|
|
681
|
+
"@typescript-eslint/parser": "8.72.1",
|
|
680
682
|
"@vercel/ncc": "0.38.4",
|
|
681
683
|
"concurrently": "9.2.1",
|
|
682
684
|
"conventional-changelog-conventionalcommits": "9.3.0",
|
|
@@ -691,11 +693,11 @@
|
|
|
691
693
|
"react-dom": "19.2.4",
|
|
692
694
|
"semantic-release": "25.0.3",
|
|
693
695
|
"svelte": "5.55.7",
|
|
694
|
-
"svelte-check": "4.
|
|
696
|
+
"svelte-check": "4.7.8",
|
|
695
697
|
"tsx": "4.21.0",
|
|
696
698
|
"typedoc": "0.28.18",
|
|
697
699
|
"typedoc-plugin-markdown": "4.11.0",
|
|
698
|
-
"typescript": "
|
|
700
|
+
"typescript": "6.0.3",
|
|
699
701
|
"vite": "8.3.5",
|
|
700
702
|
"vitest": "4.1.12"
|
|
701
703
|
},
|