@wildo-ai/external-connectors-models 1.1.10 → 1.1.12
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/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +140 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js +203 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/oauth2.enums.d.ts.map +1 -1
- package/dist/esm/core/oauth2.enums.js.map +1 -1
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts +4 -2
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.js +10 -4
- package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +9 -42
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +31 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +64 -3
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js +23 -2
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts +150 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js +182 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +41 -9
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +40 -14
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.d.ts +157 -0
- package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.js +134 -0
- package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts +85 -0
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.js +46 -2
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.js +4 -0
- package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +86 -10
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +146 -7
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.d.ts +14 -1
- package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.js +6 -0
- package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -1
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.d.ts +254 -0
- package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.js +480 -0
- package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts +7 -2
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +482 -7
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +348 -0
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +165 -8
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js +243 -20
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -1
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.d.ts +52 -0
- package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.js +132 -0
- package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.d.ts +111 -0
- package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.d.ts.map +1 -0
- package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.js +203 -0
- package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.js.map +1 -0
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts +6 -0
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts.map +1 -1
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js +13 -7
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js.map +1 -1
- package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.d.ts +50 -0
- package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.d.ts.map +1 -0
- package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.js +30 -0
- package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.js.map +1 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +1165 -11
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +1217 -9
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.d.ts +73 -0
- package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.js +82 -0
- package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +79 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.js +93 -0
- package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts +133 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts.map +1 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.js +61 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/esm/.native.tsbuildinfo +0 -1
|
@@ -348,6 +348,46 @@ export var LLMProvider_ReasoningEffort;
|
|
|
348
348
|
LLMProvider_ReasoningEffort["HIGH"] = "high";
|
|
349
349
|
LLMProvider_ReasoningEffort["XHIGH"] = "xhigh";
|
|
350
350
|
})(LLMProvider_ReasoningEffort || (LLMProvider_ReasoningEffort = {}));
|
|
351
|
+
/**
|
|
352
|
+
* Input tokens a call to a model whose vendor documents no limits may send (#2750): the bound a conversation is held to
|
|
353
|
+
* when its agent's model has no {@link LLM_ModelContextLimits} (a model the catalog lists without them, a model a registry
|
|
354
|
+
* provider declares, an agent that is not an LLM-arm agent).
|
|
355
|
+
*
|
|
356
|
+
* Deliberately conservative, because a bound that is too large is no bound: 32,000 is below the documented input ceiling
|
|
357
|
+
* of every model the catalog lists with limits except the two legacy OpenAI ids that carry their own (GPT-4, 8,192 shared;
|
|
358
|
+
* GPT-3.5 Turbo, 16,385 shared), and holds a few dozen conversational turns. Too small costs older turns of a long
|
|
359
|
+
* conversation, which the turn then does not see; documenting the model's limits lifts it.
|
|
360
|
+
*/
|
|
361
|
+
export const LLM_UNDOCUMENTED_MODEL_INPUT_TOKEN_CEILING = 32_000;
|
|
362
|
+
/** Checked 2026-11-09 against each model's page under https://developers.openai.com/api/docs/models/<id>. */
|
|
363
|
+
const OPENAI_LIMITS_CHECKED_ON = "2026-11-09";
|
|
364
|
+
const openAiModelPage = (id) => `https://developers.openai.com/api/docs/models/${id}`;
|
|
365
|
+
const openAiLimits = (id, contextWindowTokens, maxOutputTokens, maxInputTokens) => ({
|
|
366
|
+
contextWindowTokens,
|
|
367
|
+
...(maxInputTokens === undefined ? {} : { maxInputTokens }),
|
|
368
|
+
maxOutputTokens,
|
|
369
|
+
documentedAt: openAiModelPage(id),
|
|
370
|
+
checkedOn: OPENAI_LIMITS_CHECKED_ON,
|
|
371
|
+
});
|
|
372
|
+
/**
|
|
373
|
+
* Checked 2026-11-09 against each model's page under https://platform.claude.com/docs/en/models/<slug>/overview, and
|
|
374
|
+
* https://platform.claude.com/docs/en/build-with-claude/context-windows, which states that for every 1M-window model 1M
|
|
375
|
+
* "is the default: you don't need a beta header", and that other models, Claude Sonnet 4.5 included, have 200k.
|
|
376
|
+
*/
|
|
377
|
+
const ANTHROPIC_LIMITS_CHECKED_ON = "2026-11-09";
|
|
378
|
+
const anthropicLimits = (slug, contextWindowTokens, maxOutputTokens) => ({
|
|
379
|
+
contextWindowTokens,
|
|
380
|
+
maxOutputTokens,
|
|
381
|
+
documentedAt: `https://platform.claude.com/docs/en/models/${slug}/overview`,
|
|
382
|
+
checkedOn: ANTHROPIC_LIMITS_CHECKED_ON,
|
|
383
|
+
});
|
|
384
|
+
/** Checked 2026-11-09 against each model's page under https://aistudio.google.com/docs/models/<id> (input and output limits). */
|
|
385
|
+
const googleLimits = (id, maxInputTokens, maxOutputTokens) => ({
|
|
386
|
+
maxInputTokens,
|
|
387
|
+
maxOutputTokens,
|
|
388
|
+
documentedAt: `https://aistudio.google.com/docs/models/${id}`,
|
|
389
|
+
checkedOn: "2026-11-09",
|
|
390
|
+
});
|
|
351
391
|
/**
|
|
352
392
|
* THE model catalog — the single per-model fact table.
|
|
353
393
|
*
|
|
@@ -382,6 +422,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
382
422
|
// Live: `minimal` → 400 (the published docs claim it exists — they are wrong).
|
|
383
423
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
384
424
|
rejectsExplicitTemperature: true,
|
|
425
|
+
contextLimits: openAiLimits("gpt-5.6-sol", 1_050_000, 128_000, 922_000),
|
|
385
426
|
},
|
|
386
427
|
[LLM_Model.OPEN_AI_GPT_5_6_TERRA]: {
|
|
387
428
|
providerRef: "openai",
|
|
@@ -396,6 +437,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
396
437
|
thinkingCapability: LLM_Model_Thinking_Capability.OPTIONAL,
|
|
397
438
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
398
439
|
rejectsExplicitTemperature: true,
|
|
440
|
+
contextLimits: openAiLimits("gpt-5.6-terra", 1_050_000, 128_000, 922_000),
|
|
399
441
|
},
|
|
400
442
|
[LLM_Model.OPEN_AI_GPT_5_6_LUNA]: {
|
|
401
443
|
providerRef: "openai",
|
|
@@ -406,31 +448,34 @@ export const LLM_MODEL_CATALOG = {
|
|
|
406
448
|
thinkingCapability: LLM_Model_Thinking_Capability.OPTIONAL,
|
|
407
449
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
408
450
|
rejectsExplicitTemperature: true,
|
|
451
|
+
contextLimits: openAiLimits("gpt-5.6-luna", 1_050_000, 128_000, 922_000),
|
|
409
452
|
},
|
|
410
453
|
[LLM_Model.OPEN_AI_GPT_5_2_PRO]: {
|
|
411
454
|
providerRef: "openai",
|
|
412
455
|
availability: LLM_Model_Availability.PRODUCTION,
|
|
413
456
|
probedOn: "2026-07-16",
|
|
414
457
|
applicabilities: [LLM_Model_Applicability.DEEP_JUDGMENT],
|
|
458
|
+
contextLimits: openAiLimits("gpt-5.2-pro", 400_000, 128_000),
|
|
415
459
|
},
|
|
416
460
|
[LLM_Model.OPEN_AI_GPT_5_2]: {
|
|
417
461
|
providerRef: "openai",
|
|
418
462
|
availability: LLM_Model_Availability.PRODUCTION,
|
|
419
463
|
probedOn: "2026-07-16",
|
|
420
464
|
applicabilities: [],
|
|
465
|
+
contextLimits: openAiLimits("gpt-5.2", 400_000, 128_000),
|
|
421
466
|
},
|
|
422
|
-
[LLM_Model.OPEN_AI_GPT_5_1]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
423
|
-
[LLM_Model.OPEN_AI_GPT_5]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
424
|
-
[LLM_Model.OPEN_AI_GPT_5_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
425
|
-
[LLM_Model.OPEN_AI_GPT_4O]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
426
|
-
[LLM_Model.OPEN_AI_GPT_4O_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
427
|
-
[LLM_Model.OPEN_AI_GPT_4_TURBO]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
428
|
-
[LLM_Model.OPEN_AI_GPT_4]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
429
|
-
[LLM_Model.OPEN_AI_GPT_3_5_TURBO]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
430
|
-
[LLM_Model.OPEN_AI_O1]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
431
|
-
[LLM_Model.OPEN_AI_O1_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
432
|
-
[LLM_Model.OPEN_AI_O3_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
433
|
-
[LLM_Model.OPEN_AI_O4_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [] },
|
|
467
|
+
[LLM_Model.OPEN_AI_GPT_5_1]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-5.1", 400_000, 128_000) },
|
|
468
|
+
[LLM_Model.OPEN_AI_GPT_5]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-5", 400_000, 128_000, 272_000) },
|
|
469
|
+
[LLM_Model.OPEN_AI_GPT_5_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-5-mini", 400_000, 128_000, 272_000) },
|
|
470
|
+
[LLM_Model.OPEN_AI_GPT_4O]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-4o", 128_000, 16_384) },
|
|
471
|
+
[LLM_Model.OPEN_AI_GPT_4O_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-4o-mini", 128_000, 16_384) },
|
|
472
|
+
[LLM_Model.OPEN_AI_GPT_4_TURBO]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-4-turbo", 128_000, 4_096) },
|
|
473
|
+
[LLM_Model.OPEN_AI_GPT_4]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-4", 8_192, 8_192) },
|
|
474
|
+
[LLM_Model.OPEN_AI_GPT_3_5_TURBO]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("gpt-3.5-turbo", 16_385, 4_096) },
|
|
475
|
+
[LLM_Model.OPEN_AI_O1]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("o1", 200_000, 100_000) },
|
|
476
|
+
[LLM_Model.OPEN_AI_O1_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("o1-mini", 128_000, 65_536) },
|
|
477
|
+
[LLM_Model.OPEN_AI_O3_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("o3-mini", 200_000, 100_000) },
|
|
478
|
+
[LLM_Model.OPEN_AI_O4_MINI]: { providerRef: "openai", availability: LLM_Model_Availability.PRODUCTION, probedOn: "2026-07-16", applicabilities: [], contextLimits: openAiLimits("o4-mini", 200_000, 100_000) },
|
|
434
479
|
// ---------------------------------------------------------------
|
|
435
480
|
// Anthropic — ids verified LIVE against `GET /v1/models` (2026-07-16).
|
|
436
481
|
//
|
|
@@ -462,6 +507,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
462
507
|
thinkingCapability: LLM_Model_Thinking_Capability.ALWAYS,
|
|
463
508
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
464
509
|
rejectsExplicitTemperature: true,
|
|
510
|
+
contextLimits: anthropicLimits("fable-5", 1_000_000, 128_000),
|
|
465
511
|
},
|
|
466
512
|
[LLM_Model.CLAUDE_OPUS_5_5]: {
|
|
467
513
|
providerRef: "anthropic",
|
|
@@ -489,6 +535,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
489
535
|
thinkingCapability: LLM_Model_Thinking_Capability.ALWAYS,
|
|
490
536
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
491
537
|
rejectsExplicitTemperature: true,
|
|
538
|
+
contextLimits: anthropicLimits("opus-5-5", 1_000_000, 128_000),
|
|
492
539
|
},
|
|
493
540
|
[LLM_Model.CLAUDE_OPUS_5]: {
|
|
494
541
|
providerRef: "anthropic",
|
|
@@ -514,6 +561,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
514
561
|
thinkingCapability: LLM_Model_Thinking_Capability.OPTIONAL,
|
|
515
562
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
516
563
|
rejectsExplicitTemperature: true,
|
|
564
|
+
contextLimits: anthropicLimits("opus-5", 1_000_000, 128_000),
|
|
517
565
|
},
|
|
518
566
|
[LLM_Model.CLAUDE_SONNET_5]: {
|
|
519
567
|
providerRef: "anthropic",
|
|
@@ -532,6 +580,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
532
580
|
thinkingCapability: LLM_Model_Thinking_Capability.OPTIONAL,
|
|
533
581
|
unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
|
|
534
582
|
rejectsExplicitTemperature: true,
|
|
583
|
+
contextLimits: anthropicLimits("sonnet-5", 1_000_000, 128_000),
|
|
535
584
|
},
|
|
536
585
|
[LLM_Model.CLAUDE_OPUS_4_8]: {
|
|
537
586
|
providerRef: "anthropic",
|
|
@@ -539,6 +588,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
539
588
|
probedOn: "2026-07-16",
|
|
540
589
|
applicabilities: [LLM_Model_Applicability.WORKSPACE_CODING_AGENT],
|
|
541
590
|
ioCapabilities: [LLM_Model_IO_Capability.TOOL_USE, LLM_Model_IO_Capability.CODE_GENERATION],
|
|
591
|
+
contextLimits: anthropicLimits("opus-4-8", 1_000_000, 128_000),
|
|
542
592
|
},
|
|
543
593
|
[LLM_Model.CLAUDE_SONNET_4_5]: {
|
|
544
594
|
providerRef: "anthropic",
|
|
@@ -546,6 +596,7 @@ export const LLM_MODEL_CATALOG = {
|
|
|
546
596
|
probedOn: "2026-07-16",
|
|
547
597
|
applicabilities: [LLM_Model_Applicability.WORKSPACE_CODING_AGENT],
|
|
548
598
|
ioCapabilities: [LLM_Model_IO_Capability.TOOL_USE, LLM_Model_IO_Capability.CODE_GENERATION],
|
|
599
|
+
contextLimits: anthropicLimits("sonnet-4-5", 200_000, 64_000),
|
|
549
600
|
},
|
|
550
601
|
[LLM_Model.CLAUDE_HAIKU_4_5]: {
|
|
551
602
|
providerRef: "anthropic",
|
|
@@ -553,16 +604,24 @@ export const LLM_MODEL_CATALOG = {
|
|
|
553
604
|
probedOn: "2026-07-16",
|
|
554
605
|
applicabilities: [LLM_Model_Applicability.HIGH_VOLUME_MECHANICAL],
|
|
555
606
|
ioCapabilities: [LLM_Model_IO_Capability.STRUCTURED_OUTPUTS],
|
|
607
|
+
contextLimits: anthropicLimits("haiku-4-5", 200_000, 64_000),
|
|
556
608
|
},
|
|
557
609
|
// ---------------------------------------------------------------
|
|
558
610
|
// Google / Mistral / Perplexity / xAI — NEVER live-verified by this
|
|
559
611
|
// repository. `availability` is therefore omitted and no row is
|
|
560
612
|
// auto-selectable. Probe an id and fill its row before preferring it.
|
|
613
|
+
//
|
|
614
|
+
// `contextLimits` (#2750) only where the vendor's page states them, read
|
|
615
|
+
// 2026-11-09: Gemini 2.5 Pro and Flash. Google's model list no longer names
|
|
616
|
+
// the other Gemini ids (shut down or never listed), Mistral's `-latest`
|
|
617
|
+
// aliases move between models and its pages name no alias target, and xAI's
|
|
618
|
+
// and Perplexity's current pages name none of these ids. They take the
|
|
619
|
+
// framework floor (`LLM_UNDOCUMENTED_MODEL_INPUT_TOKEN_CEILING`).
|
|
561
620
|
// ---------------------------------------------------------------
|
|
562
621
|
[LLM_Model.GOOGLE_GEMINI_3_DEEP_THINK]: { providerRef: "google", applicabilities: [] },
|
|
563
622
|
[LLM_Model.GOOGLE_GEMINI_3_PRO]: { providerRef: "google", applicabilities: [] },
|
|
564
|
-
[LLM_Model.GOOGLE_GEMINI_2_5_PRO]: { providerRef: "google", applicabilities: [] },
|
|
565
|
-
[LLM_Model.GOOGLE_GEMINI_2_5_FLASH]: { providerRef: "google", applicabilities: [] },
|
|
623
|
+
[LLM_Model.GOOGLE_GEMINI_2_5_PRO]: { providerRef: "google", applicabilities: [], contextLimits: googleLimits("gemini-2.5-pro", 1_048_576, 65_536) },
|
|
624
|
+
[LLM_Model.GOOGLE_GEMINI_2_5_FLASH]: { providerRef: "google", applicabilities: [], contextLimits: googleLimits("gemini-2.5-flash", 1_048_576, 65_536) },
|
|
566
625
|
[LLM_Model.GOOGLE_GEMINI_2_0_FLASH]: { providerRef: "google", applicabilities: [] },
|
|
567
626
|
[LLM_Model.GOOGLE_GEMINI_1_5_PRO]: { providerRef: "google", applicabilities: [] },
|
|
568
627
|
[LLM_Model.GOOGLE_GEMINI_1_5_FLASH]: { providerRef: "google", applicabilities: [] },
|
|
@@ -582,6 +641,48 @@ export const LLM_MODEL_CATALOG = {
|
|
|
582
641
|
[LLM_Model.GROK_2_VISION]: { providerRef: "grok", applicabilities: [] },
|
|
583
642
|
[LLM_Model.GROK_2]: { providerRef: "grok", applicabilities: [] },
|
|
584
643
|
};
|
|
644
|
+
/**
|
|
645
|
+
* Whether `model` is a row of the engine's catalog (#2750): its facts, limits included, come from the catalog, and a
|
|
646
|
+
* provider's declaration is never asked. One predicate, so the ceiling and the caller that looks up a declaration agree.
|
|
647
|
+
*/
|
|
648
|
+
export const isLLMCatalogModel = (model, catalog = LLM_MODEL_CATALOG) => Object.hasOwn(catalog, model);
|
|
649
|
+
/** Where a model's input ceiling ({@link modelInputTokenCeiling}) came from (#2750). */
|
|
650
|
+
export var LLM_InputCeilingSource;
|
|
651
|
+
(function (LLM_InputCeilingSource) {
|
|
652
|
+
/** The model's catalog row carries the limits its vendor documents. */
|
|
653
|
+
LLM_InputCeilingSource["DOCUMENTED"] = "documented";
|
|
654
|
+
/** The model has no documented limits, so {@link LLM_UNDOCUMENTED_MODEL_INPUT_TOKEN_CEILING} applies. */
|
|
655
|
+
LLM_InputCeilingSource["FRAMEWORK_FLOOR"] = "framework_floor";
|
|
656
|
+
})(LLM_InputCeilingSource || (LLM_InputCeilingSource = {}));
|
|
657
|
+
/**
|
|
658
|
+
* How many tokens of input one call to `model` may send (#2750): the one reader of {@link LLM_ModelContextLimits}, so
|
|
659
|
+
* every bound the framework places on what it sends a model agrees about what the model holds.
|
|
660
|
+
*
|
|
661
|
+
* For a window input and output SHARE, the response's room is kept back first: the agent's configured `maxTokens`, or the
|
|
662
|
+
* vendor's maximum output when the agent configures none, but never more than half the window, so a model whose maximum
|
|
663
|
+
* output equals its window (GPT-4: 8,192 and 8,192) still takes some input. A stated input cap then binds on its own
|
|
664
|
+
* (OpenAI's GPT-5: 400,000 shared, 272,000 input, which is exactly 400,000 less its 128,000 output). A model with an input
|
|
665
|
+
* limit and no shared window (Gemini) takes its input limit. Keeping the full maximum output back on a model that would
|
|
666
|
+
* accept less (Anthropic accepts input plus `max_tokens` over the window on 4.5 and later models and stops generation at
|
|
667
|
+
* the window instead) is deliberate: a response cut off by the window is a worse failure than older turns left out.
|
|
668
|
+
*
|
|
669
|
+
* A model the catalog knows without limits, or does not know and whose provider declares none, gets
|
|
670
|
+
* {@link LLM_UNDOCUMENTED_MODEL_INPUT_TOKEN_CEILING}.
|
|
671
|
+
*/
|
|
672
|
+
export const modelInputTokenCeiling = (model, options = {}, catalog = LLM_MODEL_CATALOG) => {
|
|
673
|
+
const entry = isLLMCatalogModel(model, catalog) ? catalog[model] : undefined;
|
|
674
|
+
const limits = entry ? entry.contextLimits : options.declaredLimits;
|
|
675
|
+
if (limits === undefined || (limits.contextWindowTokens === undefined && limits.maxInputTokens === undefined)) {
|
|
676
|
+
return { inputTokens: LLM_UNDOCUMENTED_MODEL_INPUT_TOKEN_CEILING, source: LLM_InputCeilingSource.FRAMEWORK_FLOOR };
|
|
677
|
+
}
|
|
678
|
+
const configured = options.configuredMaxOutputTokens;
|
|
679
|
+
const wantedOutput = configured !== undefined && Number.isFinite(configured) && configured > 0 ? configured : limits.maxOutputTokens;
|
|
680
|
+
const fromWindow = limits.contextWindowTokens === undefined
|
|
681
|
+
? Number.POSITIVE_INFINITY
|
|
682
|
+
: limits.contextWindowTokens - Math.min(wantedOutput, Math.floor(limits.contextWindowTokens / 2));
|
|
683
|
+
const inputTokens = Math.min(limits.maxInputTokens ?? Number.POSITIVE_INFINITY, fromWindow);
|
|
684
|
+
return { inputTokens, source: LLM_InputCeilingSource.DOCUMENTED };
|
|
685
|
+
};
|
|
585
686
|
/**
|
|
586
687
|
* Availability states a model may be auto-RESOLVED in. `DEPRECATED` and
|
|
587
688
|
* `DISCONTINUED` are deliberately absent: a retired id stays nameable as an
|
|
@@ -648,6 +749,81 @@ export const LLM_MODEL_APPLICABILITY_PREFERENCE = {
|
|
|
648
749
|
const LLM_MODEL_APPLICABILITY_REQUIRED_IO = {
|
|
649
750
|
[LLM_Model_Applicability.VISUAL_JUDGMENT]: [LLM_Model_IO_Capability.MULTIMODAL_VISION],
|
|
650
751
|
};
|
|
752
|
+
const isDeclarationRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
753
|
+
const isNonEmptyDeclarationString = (value) => typeof value === "string" && value.trim().length > 0;
|
|
754
|
+
const listsOnlyMembersOf = (value, members) => Array.isArray(value) && value.every((member) => members.has(member));
|
|
755
|
+
/**
|
|
756
|
+
* Why a provider's declared chat models ({@link LLM_ModelDeclaration}) cannot be used, or `undefined` (#2516). Absent is
|
|
757
|
+
* fine: an engine provider has none.
|
|
758
|
+
*
|
|
759
|
+
* A registry provider's module is loaded at runtime, so nothing here compiled its `models`; this is the check that holds
|
|
760
|
+
* them to their shape before resolution reads them. Every vocabulary is checked against its enum, because an unknown
|
|
761
|
+
* applicability would simply never match, and an unknown IO capability would read as evidence it is not.
|
|
762
|
+
*/
|
|
763
|
+
export const describeLLMModelDeclarationsDefect = (models) => {
|
|
764
|
+
if (models === undefined)
|
|
765
|
+
return undefined;
|
|
766
|
+
if (!Array.isArray(models))
|
|
767
|
+
return "are not a list";
|
|
768
|
+
const applicabilities = new Set(Object.values(LLM_Model_Applicability));
|
|
769
|
+
const ioCapabilities = new Set(Object.values(LLM_Model_IO_Capability));
|
|
770
|
+
const thinking = new Set(Object.values(LLM_Model_Thinking_Capability));
|
|
771
|
+
const efforts = new Set(Object.values(LLMProvider_ReasoningEffort));
|
|
772
|
+
const seen = new Set();
|
|
773
|
+
for (const [index, declaration] of models.entries()) {
|
|
774
|
+
if (!isDeclarationRecord(declaration) || !isNonEmptyDeclarationString(declaration.model))
|
|
775
|
+
return `have no \`model\` at position ${index}`;
|
|
776
|
+
const model = declaration.model;
|
|
777
|
+
if (seen.has(model))
|
|
778
|
+
return `declare "${model}" twice`;
|
|
779
|
+
seen.add(model);
|
|
780
|
+
if (!listsOnlyMembersOf(declaration.applicabilities, applicabilities))
|
|
781
|
+
return `give "${model}" unknown \`applicabilities\``;
|
|
782
|
+
if (declaration.applicabilities.includes(LLM_Model_Applicability.WORKSPACE_CODING_AGENT)) {
|
|
783
|
+
return `declare "${model}" for workspace coding, which is served over the Agent Client Protocol and never through a chat model`;
|
|
784
|
+
}
|
|
785
|
+
if (declaration.ioCapabilities !== undefined && !listsOnlyMembersOf(declaration.ioCapabilities, ioCapabilities))
|
|
786
|
+
return `give "${model}" unknown \`ioCapabilities\``;
|
|
787
|
+
if (declaration.thinkingCapability !== undefined && !thinking.has(declaration.thinkingCapability))
|
|
788
|
+
return `give "${model}" an unknown \`thinkingCapability\``;
|
|
789
|
+
if (declaration.unsupportedReasoningEfforts !== undefined && !listsOnlyMembersOf(declaration.unsupportedReasoningEfforts, efforts)) {
|
|
790
|
+
return `give "${model}" unknown \`unsupportedReasoningEfforts\``;
|
|
791
|
+
}
|
|
792
|
+
const limitsDefect = declaration.contextLimits === undefined ? undefined : describeContextLimitsDefect(declaration.contextLimits);
|
|
793
|
+
if (limitsDefect !== undefined)
|
|
794
|
+
return `give "${model}" \`contextLimits\` that ${limitsDefect}`;
|
|
795
|
+
}
|
|
796
|
+
return undefined;
|
|
797
|
+
};
|
|
798
|
+
const isPositiveTokenCount = (value) => typeof value === "number" && Number.isSafeInteger(value) && value > 0;
|
|
799
|
+
/**
|
|
800
|
+
* Why declared {@link LLM_ModelContextLimits} cannot be used, or `undefined` (#2750): the shape the catalog test holds every
|
|
801
|
+
* catalog row to, checked at runtime because a registry provider's declaration is not compiled with the engine.
|
|
802
|
+
*/
|
|
803
|
+
const describeContextLimitsDefect = (limits) => {
|
|
804
|
+
if (!isDeclarationRecord(limits))
|
|
805
|
+
return "are not an object";
|
|
806
|
+
if (limits.contextWindowTokens !== undefined && !isPositiveTokenCount(limits.contextWindowTokens))
|
|
807
|
+
return "state a `contextWindowTokens` that is not a positive whole number";
|
|
808
|
+
if (limits.maxInputTokens !== undefined && !isPositiveTokenCount(limits.maxInputTokens))
|
|
809
|
+
return "state a `maxInputTokens` that is not a positive whole number";
|
|
810
|
+
if (limits.contextWindowTokens === undefined && limits.maxInputTokens === undefined)
|
|
811
|
+
return "state neither `contextWindowTokens` nor `maxInputTokens`";
|
|
812
|
+
if (!isPositiveTokenCount(limits.maxOutputTokens))
|
|
813
|
+
return "state no positive whole `maxOutputTokens`";
|
|
814
|
+
if (!isNonEmptyDeclarationString(limits.documentedAt) || !/^https:\/\//u.test(limits.documentedAt))
|
|
815
|
+
return "name no `documentedAt` page (an https URL)";
|
|
816
|
+
if (typeof limits.checkedOn !== "string" || !/^\d{4}-\d{2}-\d{2}$/u.test(limits.checkedOn) || Number.isNaN(Date.parse(limits.checkedOn))) {
|
|
817
|
+
return "name no `checkedOn` date (YYYY-MM-DD)";
|
|
818
|
+
}
|
|
819
|
+
return undefined;
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* Whether the engine's catalog knows this provider, which decides where its model facts come from (#2516): catalog rows
|
|
823
|
+
* for an engine provider, the provider's own `models` declaration otherwise. One predicate, so the resolver and the agent
|
|
824
|
+
* registration that reads declarations cannot disagree about which side a provider is on.
|
|
825
|
+
*/
|
|
826
|
+
export const isLLMCatalogProvider = (providerRef, catalog = LLM_MODEL_CATALOG) => Object.values(catalog).some((entry) => entry.providerRef === providerRef);
|
|
651
827
|
/** Why {@link resolveModelForApplicability} could not answer — carried into a named CONFIGURATION error. */
|
|
652
828
|
export var LLM_ModelResolutionFailure;
|
|
653
829
|
(function (LLM_ModelResolutionFailure) {
|
|
@@ -657,6 +833,11 @@ export var LLM_ModelResolutionFailure;
|
|
|
657
833
|
LLM_ModelResolutionFailure["NO_RESOLVABLE_AVAILABILITY"] = "no_resolvable_availability";
|
|
658
834
|
/** Candidates exist and are available, but none evidences the required IO capability. */
|
|
659
835
|
LLM_ModelResolutionFailure["REQUIRED_IO_CAPABILITY_UNEVIDENCED"] = "required_io_capability_unevidenced";
|
|
836
|
+
/**
|
|
837
|
+
* An engine provider (one the catalog knows) also declares models. Its models are catalog rows; a declaration beside
|
|
838
|
+
* them would be a second, unchecked source of the same facts, so it is refused rather than merged.
|
|
839
|
+
*/
|
|
840
|
+
LLM_ModelResolutionFailure["CATALOG_PROVIDER_DECLARES_MODELS"] = "catalog_provider_declares_models";
|
|
660
841
|
})(LLM_ModelResolutionFailure || (LLM_ModelResolutionFailure = {}));
|
|
661
842
|
/**
|
|
662
843
|
* Resolve an applicability to ONE concrete model id for a given provider.
|
|
@@ -667,6 +848,13 @@ export var LLM_ModelResolutionFailure;
|
|
|
667
848
|
* this layer exists to remove — the author asked for a KIND of model, and
|
|
668
849
|
* quietly handing them a different kind is worse than refusing.
|
|
669
850
|
*
|
|
851
|
+
* Two sources, decided by whether the catalog knows the provider (as document extraction decides, #2021):
|
|
852
|
+
* - an ENGINE provider resolves through {@link LLM_MODEL_APPLICABILITY_PREFERENCE} and its catalog rows, every gate
|
|
853
|
+
* below applying, and is refused if it also declares models;
|
|
854
|
+
* - any other provider resolves from its own `declaredModels`, in declared order: the first model declaring the
|
|
855
|
+
* applicability and evidencing the required IO capability. A provider that declares none fails with the same
|
|
856
|
+
* named failure, naming what it considered.
|
|
857
|
+
*
|
|
670
858
|
* Note this function answers the semantic question only. Whether the resolved
|
|
671
859
|
* model is reachable over the agent's TRANSPORT (a profile that
|
|
672
860
|
* declares it) is a separate gate owned by the backend, because the transport
|
|
@@ -680,9 +868,26 @@ export var LLM_ModelResolutionFailure;
|
|
|
680
868
|
* nothing.
|
|
681
869
|
*/
|
|
682
870
|
export const resolveModelForApplicability = (input, catalog = LLM_MODEL_CATALOG) => {
|
|
871
|
+
const requiredIo = LLM_MODEL_APPLICABILITY_REQUIRED_IO[input.applicability] ?? [];
|
|
872
|
+
const declared = input.declaredModels ?? [];
|
|
873
|
+
const catalogKnowsProvider = isLLMCatalogProvider(input.providerRef, catalog);
|
|
874
|
+
if (catalogKnowsProvider && declared.length > 0) {
|
|
875
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.CATALOG_PROVIDER_DECLARES_MODELS, consideredModels: declared.map((entry) => entry.model) };
|
|
876
|
+
}
|
|
877
|
+
if (!catalogKnowsProvider) {
|
|
878
|
+
const applicable = declared.filter((entry) => entry.applicabilities.includes(input.applicability));
|
|
879
|
+
if (applicable.length === 0) {
|
|
880
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.NO_CANDIDATE_FOR_PROVIDER, consideredModels: declared.map((entry) => entry.model) };
|
|
881
|
+
}
|
|
882
|
+
const capable = applicable.filter((entry) => requiredIo.every((capability) => (entry.ioCapabilities ?? []).includes(capability)));
|
|
883
|
+
if (capable.length === 0) {
|
|
884
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.REQUIRED_IO_CAPABILITY_UNEVIDENCED, consideredModels: applicable.map((entry) => entry.model) };
|
|
885
|
+
}
|
|
886
|
+
const { model, ...facts } = capable[0];
|
|
887
|
+
return { resolved: true, model, facts, fromOverride: false };
|
|
888
|
+
}
|
|
683
889
|
const override = input.preferenceOverride?.[input.applicability];
|
|
684
890
|
const candidates = override ?? LLM_MODEL_APPLICABILITY_PREFERENCE[input.applicability];
|
|
685
|
-
const requiredIo = LLM_MODEL_APPLICABILITY_REQUIRED_IO[input.applicability] ?? [];
|
|
686
891
|
const forProvider = candidates.filter((model) => {
|
|
687
892
|
const entry = catalog[model];
|
|
688
893
|
return entry.providerRef === input.providerRef && entry.applicabilities.includes(input.applicability);
|
|
@@ -705,7 +910,18 @@ export const resolveModelForApplicability = (input, catalog = LLM_MODEL_CATALOG)
|
|
|
705
910
|
return { resolved: false, failure: LLM_ModelResolutionFailure.REQUIRED_IO_CAPABILITY_UNEVIDENCED, consideredModels: available };
|
|
706
911
|
}
|
|
707
912
|
const model = capable[0];
|
|
708
|
-
|
|
913
|
+
const entry = catalog[model];
|
|
914
|
+
return {
|
|
915
|
+
resolved: true,
|
|
916
|
+
model,
|
|
917
|
+
facts: {
|
|
918
|
+
applicabilities: entry.applicabilities,
|
|
919
|
+
...(entry.ioCapabilities === undefined ? {} : { ioCapabilities: entry.ioCapabilities }),
|
|
920
|
+
...(entry.thinkingCapability === undefined ? {} : { thinkingCapability: entry.thinkingCapability }),
|
|
921
|
+
...(entry.unsupportedReasoningEfforts === undefined ? {} : { unsupportedReasoningEfforts: entry.unsupportedReasoningEfforts }),
|
|
922
|
+
},
|
|
923
|
+
fromOverride: override !== undefined,
|
|
924
|
+
};
|
|
709
925
|
};
|
|
710
926
|
/**
|
|
711
927
|
* Model → thinking capability, DERIVED from {@link LLM_MODEL_CATALOG}.
|
|
@@ -754,13 +970,15 @@ export const getModelThinkingCapability = (model) => LLM_MODEL_THINKING_CAPABILI
|
|
|
754
970
|
*
|
|
755
971
|
* @param model The configured model id (free-form; unknown ids pass).
|
|
756
972
|
* @param effort The configured effort; omit/undefined always passes.
|
|
973
|
+
* @param declared For a model a registry provider declares (#2516), its own thinking facts; they replace the catalog's,
|
|
974
|
+
* which knows nothing of it. Absent facts fail open, exactly as for an unprobed catalog row.
|
|
757
975
|
* @returns A violation message, or `null` if valid/unjudgeable.
|
|
758
976
|
*/
|
|
759
|
-
export const validateReasoningEffortForModel = (model, effort) => {
|
|
977
|
+
export const validateReasoningEffortForModel = (model, effort, declared) => {
|
|
760
978
|
/** @wildo_source:part:end saas.external-providers.llm.model-configuration */
|
|
761
979
|
if (effort === undefined)
|
|
762
980
|
return null;
|
|
763
|
-
const capability = getModelThinkingCapability(model);
|
|
981
|
+
const capability = declared !== undefined ? declared.thinkingCapability : getModelThinkingCapability(model);
|
|
764
982
|
if (capability === undefined)
|
|
765
983
|
return null;
|
|
766
984
|
if (capability === LLM_Model_Thinking_Capability.NONE) {
|
|
@@ -769,7 +987,7 @@ export const validateReasoningEffortForModel = (model, effort) => {
|
|
|
769
987
|
if (capability === LLM_Model_Thinking_Capability.ALWAYS && effort === LLMProvider_ReasoningEffort.NONE) {
|
|
770
988
|
return `Model "${model}" always reasons — its thinking cannot be disabled, so reasoningEffort "none" is rejected by the provider. Use "low" for the cheapest reasoning, or omit reasoningEffort for the model default.`;
|
|
771
989
|
}
|
|
772
|
-
const unsupported = LLM_MODEL_UNSUPPORTED_REASONING_EFFORTS[model];
|
|
990
|
+
const unsupported = declared !== undefined ? declared.unsupportedReasoningEfforts : LLM_MODEL_UNSUPPORTED_REASONING_EFFORTS[model];
|
|
773
991
|
if (unsupported?.includes(effort)) {
|
|
774
992
|
const hint = effort === LLMProvider_ReasoningEffort.PROVIDER_DEFAULT
|
|
775
993
|
? 'Omit reasoningEffort entirely to get the model default.'
|
|
@@ -1315,7 +1533,12 @@ export const LLMProvider_GenerateStructuredInputSchema = z.object({
|
|
|
1315
1533
|
includeRejectedAnswer: z.boolean().optional(),
|
|
1316
1534
|
});
|
|
1317
1535
|
export const LLMProvider_GenerateStructuredOutputSchema = z.object({
|
|
1318
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* The generated object. Absent when the provider produced none (#3504): a refused or missing answer is answered
|
|
1538
|
+
* with no object, and `rejectedAnswer` beside it when the input asked for it. The agent-call trace persists the
|
|
1539
|
+
* output as JSON, where that absence is what is written.
|
|
1540
|
+
*/
|
|
1541
|
+
object: z.unknown().optional(),
|
|
1319
1542
|
/** The rejected answer's text, present only when the input set `includeRejectedAnswer` and no object was produced. */
|
|
1320
1543
|
rejectedAnswer: z.string().optional(),
|
|
1321
1544
|
});
|