@juspay/neurolink 12.35.4 → 12.36.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 +3 -3
- package/README.md +10 -10
- package/dist/browser/neurolink.min.js +381 -381
- package/dist/cli/commands/setup.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/neurolink.d.ts +1 -1
- package/dist/neurolink.js +2 -2
- package/dist/providers/openaiCompatCatalog.d.ts +2 -2
- package/dist/providers/openaiCompatCatalog.js +2 -2
- package/dist/proxy/codexOutboundFallback.d.ts +35 -0
- package/dist/proxy/codexOutboundFallback.js +515 -0
- package/dist/proxy/otelLogSink.d.ts +2 -2
- package/dist/proxy/otelLogSink.js +44 -4
- package/dist/proxy/otlpLogTransport.js +25 -2
- package/dist/proxy/requestLogger.js +20 -1
- package/dist/routing/modelCatalog.d.ts +1 -1
- package/dist/routing/modelCatalog.js +1 -1
- package/dist/types/codex.d.ts +137 -1
- package/dist/utils/modelChoices.d.ts +5 -4
- package/dist/utils/modelChoices.js +11 -10
- package/dist/utils/providerHealth.d.ts +1 -1
- package/dist/utils/providerHealth.js +1 -1
- package/docs-site/static/search-index.json +151 -151
- package/package.json +1 -1
|
@@ -1,15 +1,52 @@
|
|
|
1
1
|
/* eslint-disable no-console -- This proxy-only sink replaces console methods with OTLP emission. */
|
|
2
2
|
import { inspect } from "node:util";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
4
5
|
import { getProxyRequestTraceContext, proxyLogContext, } from "./proxyTraceContext.js";
|
|
5
6
|
import { setImmediate as yieldToRequests } from "node:timers/promises";
|
|
6
|
-
import { SeverityNumber } from "@opentelemetry/api-logs";
|
|
7
|
-
import { ExportResultCode } from "@opentelemetry/core";
|
|
8
7
|
import { createProxyOtlpLogTransport, getProxyOtlpRetryAfter, } from "./otlpLogTransport.js";
|
|
9
|
-
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
10
|
-
import { BatchLogRecordProcessor, LoggerProvider, } from "@opentelemetry/sdk-logs";
|
|
11
8
|
import { sanitizeForLog } from "../utils/logSanitize.js";
|
|
12
9
|
import { splitUtf8StringByBytes } from "./bodyCaptureProcessing.js";
|
|
10
|
+
/**
|
|
11
|
+
* @opentelemetry/sdk-logs, resources, api-logs and core are loaded
|
|
12
|
+
* synchronously via require() on first actual use, not via a top-level
|
|
13
|
+
* import — so merely requiring this module (reachable eagerly from
|
|
14
|
+
* dist/server/index.js via codexProxyRoutes.ts/claudeProxyRoutes.ts) no
|
|
15
|
+
* longer pulls in four heavy OTel packages for the overwhelming majority
|
|
16
|
+
* of callers who never set NEUROLINK_PROXY_LOG_SINK=otel. All four ship
|
|
17
|
+
* plain CommonJS builds, so require() works on any Node >=22.0.0 — no
|
|
18
|
+
* experimental flag, unlike require(esm) of a local ES module (which only
|
|
19
|
+
* works unflagged from Node 22.12). otlpLogTransport.js stays a normal
|
|
20
|
+
* static import for exactly that reason; it lazily requires its own two
|
|
21
|
+
* npm dependencies (@opentelemetry/core, otlp-transformer) internally.
|
|
22
|
+
* Everything here stays fully synchronous — construction is still one
|
|
23
|
+
* synchronous call, exactly as before — only the *import* is deferred, not
|
|
24
|
+
* the initialization semantics. Do not convert this to a dynamic
|
|
25
|
+
* `import()`: that would make initializeProxyOtelLogs() asynchronous and
|
|
26
|
+
* break every caller (both production code and the tests below) that
|
|
27
|
+
* relies on the queues/provider existing synchronously the moment it
|
|
28
|
+
* returns.
|
|
29
|
+
*/
|
|
30
|
+
const require = createRequire(import.meta.url);
|
|
31
|
+
let SeverityNumber;
|
|
32
|
+
let ExportResultCode;
|
|
33
|
+
let resourceFromAttributes;
|
|
34
|
+
let BatchLogRecordProcessor;
|
|
35
|
+
let LoggerProvider;
|
|
36
|
+
let otelDepsLoaded = false;
|
|
37
|
+
function loadOtelDeps() {
|
|
38
|
+
if (otelDepsLoaded) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
({ SeverityNumber } = require("@opentelemetry/api-logs"));
|
|
42
|
+
({ ExportResultCode } = require("@opentelemetry/core"));
|
|
43
|
+
({ resourceFromAttributes } = require("@opentelemetry/resources"));
|
|
44
|
+
({
|
|
45
|
+
BatchLogRecordProcessor,
|
|
46
|
+
LoggerProvider,
|
|
47
|
+
} = require("@opentelemetry/sdk-logs"));
|
|
48
|
+
otelDepsLoaded = true;
|
|
49
|
+
}
|
|
13
50
|
let provider;
|
|
14
51
|
let restoreConsole;
|
|
15
52
|
const queues = [];
|
|
@@ -569,6 +606,9 @@ export function initializeProxyOtelLogs(role = "worker") {
|
|
|
569
606
|
throw new Error("Proxy OTLP logs require HTTPS for non-loopback collectors");
|
|
570
607
|
}
|
|
571
608
|
}
|
|
609
|
+
// Validation above must run — and be able to throw — before this: a
|
|
610
|
+
// misconfigured endpoint must fail without ever loading the OTel SDK.
|
|
611
|
+
loadOtelDeps();
|
|
572
612
|
const metadata = createTrackedProcessor(endpoint, 2048, "metadata", 8 * 1024 * 1024);
|
|
573
613
|
const bodies = createTrackedProcessor(bodyEndpoint, 256, "bodies", 40 * 1024 * 1024);
|
|
574
614
|
const diagnostics = createTrackedProcessor(endpoint, 512, "diagnostics", 2 * 1024 * 1024);
|
|
@@ -10,8 +10,30 @@ import { Agent as HttpsAgent, request as httpsRequest } from "node:https";
|
|
|
10
10
|
import { setTimeout as delay } from "node:timers/promises";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
import { gzip } from "node:zlib";
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import { createRequire } from "node:module";
|
|
14
|
+
/**
|
|
15
|
+
* @opentelemetry/core and @opentelemetry/otlp-transformer are loaded via
|
|
16
|
+
* require() on first actual use (this file itself stays a normal static
|
|
17
|
+
* import, since it is genuinely CommonJS-safe to require() these two —
|
|
18
|
+
* unlike a local ESM file, which would need Node's newer require(esm)
|
|
19
|
+
* support and break on Node <22.12). Both packages ship plain CJS builds.
|
|
20
|
+
*/
|
|
21
|
+
const require = createRequire(import.meta.url);
|
|
22
|
+
let ExportResultCode;
|
|
23
|
+
let parseKeyPairsIntoRecord;
|
|
24
|
+
let JsonLogsSerializer;
|
|
25
|
+
let transportDepsLoaded = false;
|
|
26
|
+
function loadTransportDeps() {
|
|
27
|
+
if (transportDepsLoaded) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
({
|
|
31
|
+
ExportResultCode,
|
|
32
|
+
parseKeyPairsIntoRecord,
|
|
33
|
+
} = require("@opentelemetry/core"));
|
|
34
|
+
({ JsonLogsSerializer } = require("@opentelemetry/otlp-transformer"));
|
|
35
|
+
transportDepsLoaded = true;
|
|
36
|
+
}
|
|
15
37
|
const gzipAsync = promisify(gzip);
|
|
16
38
|
const MAX_RESPONSE_BYTES = 64 * 1024;
|
|
17
39
|
const MAX_EXPORT_ATTEMPTS = 5;
|
|
@@ -151,6 +173,7 @@ function validateAcknowledgement(bytes) {
|
|
|
151
173
|
}
|
|
152
174
|
/** Both proxy queues use this transport; success is not backend persistence. */
|
|
153
175
|
export function createProxyOtlpLogTransport(endpoint, timeoutMillis) {
|
|
176
|
+
loadTransportDeps();
|
|
154
177
|
let url;
|
|
155
178
|
try {
|
|
156
179
|
url = new URL(endpoint);
|
|
@@ -20,7 +20,24 @@ import { captureProxyBody, getBodyCaptureWorkerSnapshot, PROXY_BODY_CAPTURE_DEAD
|
|
|
20
20
|
import { prepareProxyBodyForLogging as prepareRedactedBody, redactProxyHeadersForLogging as redactHeaders, splitUtf8StringByBytes, } from "./bodyCaptureProcessing.js";
|
|
21
21
|
import { isBorrowedRequest } from "./shareContext.js";
|
|
22
22
|
import { OtelBridge } from "../observability/otelBridge.js";
|
|
23
|
-
import {
|
|
23
|
+
import { createRequire } from "node:module";
|
|
24
|
+
/**
|
|
25
|
+
* Loaded via require() on first actual use rather than a top-level import,
|
|
26
|
+
* so requiring this module (reachable eagerly from dist/server/index.js)
|
|
27
|
+
* doesn't pull in @opentelemetry/api-logs for callers who never emit an
|
|
28
|
+
* OTLP log record. Both use sites below only run once resolveLoggerProvider()
|
|
29
|
+
* has already resolved a real provider, so OTel logging is already active.
|
|
30
|
+
*/
|
|
31
|
+
const otelRequire = createRequire(import.meta.url);
|
|
32
|
+
let SeverityNumber;
|
|
33
|
+
let severityNumberLoaded = false;
|
|
34
|
+
function loadSeverityNumber() {
|
|
35
|
+
if (severityNumberLoaded) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
({ SeverityNumber } = otelRequire("@opentelemetry/api-logs"));
|
|
39
|
+
severityNumberLoaded = true;
|
|
40
|
+
}
|
|
24
41
|
import { configureProxyLifecycleLogger } from "./proxyLifecycle.js";
|
|
25
42
|
import { notifyProxyFinalLog, notifyProxyAttemptLog, getProxyRequestAccounting, } from "./proxyActivity.js";
|
|
26
43
|
import { withTimeout } from "../utils/async/withTimeout.js";
|
|
@@ -388,6 +405,7 @@ function emitOtlpLogRecord(entry) {
|
|
|
388
405
|
if (!provider) {
|
|
389
406
|
return;
|
|
390
407
|
}
|
|
408
|
+
loadSeverityNumber();
|
|
391
409
|
const otelLogger = provider.getLogger("neurolink-proxy", "1.0.0");
|
|
392
410
|
// A streaming response can fail after sending HTTP 200. Indexed fields
|
|
393
411
|
// and severity must agree with the final semantic outcome in the body.
|
|
@@ -568,6 +586,7 @@ function emitOtlpBodyLogRecord(entry, stored) {
|
|
|
568
586
|
if (!provider || stored.redactedBody === undefined) {
|
|
569
587
|
return undefined;
|
|
570
588
|
}
|
|
589
|
+
loadSeverityNumber();
|
|
571
590
|
const otelLogger = provider.getLogger("neurolink-proxy-bodies", "1.0.0");
|
|
572
591
|
const captureId = entry.captureId ?? randomUUID();
|
|
573
592
|
const emit = (chunk, chunkIndex, totalChunks) => {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* routing read none of it beyond cost and quality. `maxContextTokens` in
|
|
10
10
|
* particular was never read anywhere.
|
|
11
11
|
*
|
|
12
|
-
* The registry covers 7 of the
|
|
12
|
+
* The registry covers 7 of the registered providers, so the catalogue is
|
|
13
13
|
* an addition to a declared pool, never a replacement: a host routing over
|
|
14
14
|
* LiteLLM, OpenRouter or a self-hosted model still declares those by hand,
|
|
15
15
|
* and `enrichCandidate` ranks declared and catalogue members on one scale.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* routing read none of it beyond cost and quality. `maxContextTokens` in
|
|
10
10
|
* particular was never read anywhere.
|
|
11
11
|
*
|
|
12
|
-
* The registry covers 7 of the
|
|
12
|
+
* The registry covers 7 of the registered providers, so the catalogue is
|
|
13
13
|
* an addition to a declared pool, never a replacement: a host routing over
|
|
14
14
|
* LiteLLM, OpenRouter or a self-hosted model still declares those by hand,
|
|
15
15
|
* and `enrichCandidate` ranks declared and catalogue members on one scale.
|
package/dist/types/codex.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* stored through the same AccountQuota shape as Anthropic — its primary window
|
|
12
12
|
* maps onto the session fields and its secondary window onto the weekly fields.
|
|
13
13
|
*/
|
|
14
|
-
import type { AccountCoolingReason, AccountQuota, InternalResult } from "./proxy.js";
|
|
14
|
+
import type { AccountCoolingReason, AccountQuota, ClaudeContentBlock, InternalResult } from "./proxy.js";
|
|
15
15
|
/** Token block inside `~/.codex/auth.json`. */
|
|
16
16
|
export type CodexAuthFileTokens = {
|
|
17
17
|
id_token?: string;
|
|
@@ -194,3 +194,139 @@ export type CodexFallbackStream = {
|
|
|
194
194
|
frames: AsyncGenerator<string, CodexFallbackResult>;
|
|
195
195
|
cancel: (reason?: unknown) => Promise<void>;
|
|
196
196
|
};
|
|
197
|
+
/** Role a native Codex `input` message item can carry. */
|
|
198
|
+
export type CodexNativeRole = "developer" | "user" | "assistant";
|
|
199
|
+
/** A plain message item in a native Codex request's `input` array. */
|
|
200
|
+
export type CodexNativeMessageInputItem = {
|
|
201
|
+
type: "message";
|
|
202
|
+
id?: string;
|
|
203
|
+
role: CodexNativeRole;
|
|
204
|
+
content: CodexContentPart[];
|
|
205
|
+
};
|
|
206
|
+
/** A tool declaration backed by a JSON Schema, dispatched as a function call. */
|
|
207
|
+
export type CodexNativeFunctionToolDeclaration = {
|
|
208
|
+
type: "function";
|
|
209
|
+
name: string;
|
|
210
|
+
description?: string;
|
|
211
|
+
strict: boolean;
|
|
212
|
+
parameters: Record<string, unknown>;
|
|
213
|
+
};
|
|
214
|
+
/** Grammar constraining a custom tool's argument text. */
|
|
215
|
+
export type CodexNativeCustomToolFormat = {
|
|
216
|
+
type: "grammar";
|
|
217
|
+
syntax: "lark" | "regex";
|
|
218
|
+
definition: string;
|
|
219
|
+
};
|
|
220
|
+
/** A tool declaration whose arguments are grammar-constrained free text. */
|
|
221
|
+
export type CodexNativeCustomToolDeclaration = {
|
|
222
|
+
type: "custom";
|
|
223
|
+
name: string;
|
|
224
|
+
description?: string;
|
|
225
|
+
format: CodexNativeCustomToolFormat;
|
|
226
|
+
};
|
|
227
|
+
/** A single tool declaration, discriminated by its own `type` field. */
|
|
228
|
+
export type CodexNativeToolDeclaration = CodexNativeFunctionToolDeclaration | CodexNativeCustomToolDeclaration;
|
|
229
|
+
/** A named group of tool declarations inside one `additional_tools` item. */
|
|
230
|
+
export type CodexNativeToolNamespace = {
|
|
231
|
+
type: "namespace";
|
|
232
|
+
name: string;
|
|
233
|
+
description: string;
|
|
234
|
+
tools: CodexNativeToolDeclaration[];
|
|
235
|
+
};
|
|
236
|
+
/** The `input` item carrying every tool declaration for a native Codex request. */
|
|
237
|
+
export type CodexNativeAdditionalToolsInputItem = {
|
|
238
|
+
type: "additional_tools";
|
|
239
|
+
id?: string;
|
|
240
|
+
role: "developer";
|
|
241
|
+
tools: CodexNativeToolNamespace[];
|
|
242
|
+
};
|
|
243
|
+
/** A model-emitted tool call replayed in a native Codex request's history. */
|
|
244
|
+
export type CodexNativeFunctionCallInputItem = {
|
|
245
|
+
type: "function_call";
|
|
246
|
+
call_id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
arguments: string;
|
|
249
|
+
};
|
|
250
|
+
/** A client-supplied tool result replayed in a native Codex request's history. */
|
|
251
|
+
export type CodexNativeFunctionCallOutputInputItem = {
|
|
252
|
+
type: "function_call_output";
|
|
253
|
+
call_id: string;
|
|
254
|
+
output: string;
|
|
255
|
+
};
|
|
256
|
+
/** A call to a grammar-constrained (`type:"custom"`) tool, replayed in history. */
|
|
257
|
+
export type CodexNativeCustomToolCallInputItem = {
|
|
258
|
+
type: "custom_tool_call";
|
|
259
|
+
id?: string;
|
|
260
|
+
call_id: string;
|
|
261
|
+
name: string;
|
|
262
|
+
input: string;
|
|
263
|
+
};
|
|
264
|
+
/** A client-supplied result for a `custom_tool_call`, replayed in history. */
|
|
265
|
+
export type CodexNativeCustomToolCallOutputInputItem = {
|
|
266
|
+
type: "custom_tool_call_output";
|
|
267
|
+
call_id: string;
|
|
268
|
+
output: string;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* A reasoning item the client echoes back with `store:false`. Its content is
|
|
272
|
+
* opaque (`encrypted_content` is readable only by the OpenAI backend), so its
|
|
273
|
+
* shape is deliberately loose beyond the discriminator.
|
|
274
|
+
*/
|
|
275
|
+
export type CodexNativeReasoningInputItem = {
|
|
276
|
+
type: "reasoning";
|
|
277
|
+
id?: string;
|
|
278
|
+
encrypted_content?: string | null;
|
|
279
|
+
summary?: unknown[];
|
|
280
|
+
};
|
|
281
|
+
/** A single item in a native Codex request's `input` array. */
|
|
282
|
+
export type CodexNativeInputItem = CodexNativeMessageInputItem | CodexNativeAdditionalToolsInputItem | CodexNativeFunctionCallInputItem | CodexNativeFunctionCallOutputInputItem | CodexNativeCustomToolCallInputItem | CodexNativeCustomToolCallOutputInputItem | CodexNativeReasoningInputItem;
|
|
283
|
+
/** How a native Codex request constrains which tool the model may call. */
|
|
284
|
+
export type CodexNativeToolChoice = "auto" | "required" | "none" | {
|
|
285
|
+
type: "function";
|
|
286
|
+
name: string;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* A native Codex Responses request, as sent by the real Codex CLI.
|
|
290
|
+
*
|
|
291
|
+
* No top-level `session_id`/`thread_id` — real traffic carries neither at
|
|
292
|
+
* top level, only inside `client_metadata`, which the existing
|
|
293
|
+
* `Record<string, unknown>` field already covers.
|
|
294
|
+
*/
|
|
295
|
+
export type CodexNativeRequest = {
|
|
296
|
+
model: string;
|
|
297
|
+
input: CodexNativeInputItem[];
|
|
298
|
+
stream: boolean;
|
|
299
|
+
store: boolean;
|
|
300
|
+
tool_choice?: CodexNativeToolChoice;
|
|
301
|
+
parallel_tool_calls?: boolean;
|
|
302
|
+
reasoning?: {
|
|
303
|
+
effort: CodexReasoningEffort;
|
|
304
|
+
context?: string;
|
|
305
|
+
};
|
|
306
|
+
include?: string[];
|
|
307
|
+
text?: {
|
|
308
|
+
verbosity?: string;
|
|
309
|
+
};
|
|
310
|
+
prompt_cache_key?: string;
|
|
311
|
+
client_metadata?: Record<string, unknown>;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* A `parseCodexNativeRequest`/`translateCodexRequestToClaude` failure. Never thrown.
|
|
315
|
+
* `UNTRANSLATABLE_REQUEST` is a request Codex itself accepts but Anthropic would
|
|
316
|
+
* reject, as opposed to one that is invalid on the Codex wire.
|
|
317
|
+
*/
|
|
318
|
+
export type CodexTranslationError = {
|
|
319
|
+
code: "MALFORMED_REQUEST";
|
|
320
|
+
message: string;
|
|
321
|
+
} | {
|
|
322
|
+
code: "SUSPECTED_PARTIAL_HISTORY";
|
|
323
|
+
message: string;
|
|
324
|
+
} | {
|
|
325
|
+
code: "UNTRANSLATABLE_REQUEST";
|
|
326
|
+
message: string;
|
|
327
|
+
};
|
|
328
|
+
/** One coalesced run of same-role content while flattening a native Codex `input` array. */
|
|
329
|
+
export type CodexOutboundMessageGroup = {
|
|
330
|
+
role: "user" | "assistant";
|
|
331
|
+
blocks: ClaudeContentBlock[];
|
|
332
|
+
};
|
|
@@ -7,10 +7,11 @@ import type { CatalogProviderName, ModelChoice } from "../types/index.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Default models per provider (first choice/recommended).
|
|
9
9
|
*
|
|
10
|
-
* Covers every provider EXCEPT the
|
|
11
|
-
* models come from `models.default`
|
|
12
|
-
* `getDefaultModel()` below. (
|
|
13
|
-
* a hand entry here at all; `getDefaultModel()` now
|
|
10
|
+
* Covers every provider EXCEPT the JSON-catalog providers (see
|
|
11
|
+
* `CatalogProviderName`) — those default models come from `models.default`
|
|
12
|
+
* in the catalog JSON, read directly by `getDefaultModel()` below. (cerebras,
|
|
13
|
+
* sambanova — never had a hand entry here at all; `getDefaultModel()` now
|
|
14
|
+
* resolves them too.)
|
|
14
15
|
*
|
|
15
16
|
* AUTO is also excluded — it never had an entry here either (matches
|
|
16
17
|
* pre-existing behavior: `getDefaultModel(AUTO)` returns `undefined`).
|
|
@@ -36,9 +36,8 @@ function catalogTopModels(entry) {
|
|
|
36
36
|
* Top models per provider with descriptions for CLI prompts
|
|
37
37
|
* These are curated lists of the most commonly used/recommended models
|
|
38
38
|
*
|
|
39
|
-
* Covers every provider EXCEPT the
|
|
40
|
-
*
|
|
41
|
-
* sambanova, together-ai, xai) — their entries are derived from
|
|
39
|
+
* Covers every provider EXCEPT the JSON-catalog providers (see
|
|
40
|
+
* `CatalogProviderName`) — their entries are derived from
|
|
42
41
|
* `models.catalog[*].description` by `catalogTopModels()` and merged in at
|
|
43
42
|
* the accessor-function level below, never hand-duplicated here.
|
|
44
43
|
*/
|
|
@@ -393,10 +392,11 @@ const TOP_MODELS_CONFIG = {
|
|
|
393
392
|
/**
|
|
394
393
|
* Default models per provider (first choice/recommended).
|
|
395
394
|
*
|
|
396
|
-
* Covers every provider EXCEPT the
|
|
397
|
-
* models come from `models.default`
|
|
398
|
-
* `getDefaultModel()` below. (
|
|
399
|
-
* a hand entry here at all; `getDefaultModel()` now
|
|
395
|
+
* Covers every provider EXCEPT the JSON-catalog providers (see
|
|
396
|
+
* `CatalogProviderName`) — those default models come from `models.default`
|
|
397
|
+
* in the catalog JSON, read directly by `getDefaultModel()` below. (cerebras,
|
|
398
|
+
* sambanova — never had a hand entry here at all; `getDefaultModel()` now
|
|
399
|
+
* resolves them too.)
|
|
400
400
|
*
|
|
401
401
|
* AUTO is also excluded — it never had an entry here either (matches
|
|
402
402
|
* pre-existing behavior: `getDefaultModel(AUTO)` returns `undefined`).
|
|
@@ -431,9 +431,10 @@ export const DEFAULT_MODELS = {
|
|
|
431
431
|
/**
|
|
432
432
|
* Model enum mappings for getAllModels.
|
|
433
433
|
*
|
|
434
|
-
* Covers every provider EXCEPT the
|
|
435
|
-
*
|
|
436
|
-
*
|
|
434
|
+
* Covers every provider EXCEPT the JSON-catalog providers (see
|
|
435
|
+
* `CatalogProviderName`) — those model lists come from
|
|
436
|
+
* `Object.keys(models.catalog)` in the catalog JSON, read directly by
|
|
437
|
+
* `getAllModels()` below.
|
|
437
438
|
*/
|
|
438
439
|
const MODEL_ENUMS = {
|
|
439
440
|
[AIProviderName.OPENAI]: OpenAIModels,
|
|
@@ -92,7 +92,7 @@ export declare class ProviderHealthChecker {
|
|
|
92
92
|
* zero-config local proxy. Their real requirement is validated by
|
|
93
93
|
* checkProviderSpecificConfig()'s dedicated per-provider checks instead.
|
|
94
94
|
* Naively deriving [apiKey, ...extraRequired] from the descriptor for
|
|
95
|
-
* these three (as for the other
|
|
95
|
+
* these three (as for the other providers) would make
|
|
96
96
|
* checkEnvironmentConfiguration() push a false "missing environment
|
|
97
97
|
* variables" issue — and therefore isHealthy=false — for legitimate
|
|
98
98
|
* fallback-based Vertex auth, AWS_PROFILE/IAM-role Bedrock auth, and
|
|
@@ -449,7 +449,7 @@ export class ProviderHealthChecker {
|
|
|
449
449
|
* zero-config local proxy. Their real requirement is validated by
|
|
450
450
|
* checkProviderSpecificConfig()'s dedicated per-provider checks instead.
|
|
451
451
|
* Naively deriving [apiKey, ...extraRequired] from the descriptor for
|
|
452
|
-
* these three (as for the other
|
|
452
|
+
* these three (as for the other providers) would make
|
|
453
453
|
* checkEnvironmentConfiguration() push a false "missing environment
|
|
454
454
|
* variables" issue — and therefore isHealthy=false — for legitimate
|
|
455
455
|
* fallback-based Vertex auth, AWS_PROFILE/IAM-role Bedrock auth, and
|