@bitkyc08/opencodex 2.92.0 → 2.93.0-preview.20261027
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/bin/ocx.mjs +10 -5
- package/gui/dist/assets/App-CJZoq-uF.js +58 -0
- package/gui/dist/assets/{Tray-BSsxznDm.js → Tray-BWQPcgZn.js} +1 -1
- package/gui/dist/assets/index-DRe8Hhfz.css +1 -0
- package/gui/dist/assets/{index-BlFE_VB_.js → index-Xfct8owH.js} +12 -12
- package/gui/dist/assets/{quota-summary-BRlbXgw0.js → quota-summary-DxToX1rV.js} +1 -1
- package/gui/dist/index.html +2 -2
- package/package.json +5 -5
- package/src/adapters/anthropic.ts +28 -5
- package/src/adapters/coding-agent/batch-dispatcher.ts +122 -0
- package/src/adapters/coding-agent/profile.ts +54 -16
- package/src/adapters/coding-agent/turn.ts +30 -2
- package/src/adapters/command-code.ts +114 -7
- package/src/adapters/cursor/native-exec-fs.ts +11 -9
- package/src/adapters/devin/live-models.ts +4 -0
- package/src/adapters/google-wire-compiler.ts +1 -2
- package/src/adapters/kiro/reasoning.ts +2 -0
- package/src/adapters/kiro-refusal.ts +6 -1
- package/src/adapters/kiro-wire.ts +1 -1
- package/src/adapters/openai-chat/messages.ts +8 -2
- package/src/adapters/openai-chat/passthrough.ts +35 -14
- package/src/adapters/openai-chat/reasoning-replay.ts +27 -16
- package/src/adapters/openai-chat/reasoning-wire.ts +117 -8
- package/src/adapters/openai-chat/required-tool-result.ts +64 -0
- package/src/adapters/openai-chat.ts +7 -8
- package/src/adapters/openai-responses/passthrough.ts +7 -4
- package/src/adapters/openai-responses/reasoning.ts +13 -0
- package/src/adapters/openai-responses/request-strips.ts +1 -1
- package/src/adapters/qoder/adapter.ts +129 -8
- package/src/adapters/qoder/scaffold-guard.ts +5 -0
- package/src/adapters/reasoning-controls.ts +16 -0
- package/src/adapters/tool-call-id.ts +1 -3
- package/src/bridge/errors.ts +27 -0
- package/src/bridge.ts +1 -1
- package/src/chat/inbound.ts +4 -1
- package/src/chat/outbound.ts +9 -2
- package/src/chat/reasoning-details.ts +28 -5
- package/src/claude/desktop-first-party.ts +54 -4
- package/src/claude/desktop-picker.ts +11 -8
- package/src/claude/first-party-settings.ts +3 -1
- package/src/claude/inbound.ts +2 -1
- package/src/claude/intercept/local-ca.ts +2 -1
- package/src/claude/intercept/picker-ca-cleanup.ts +4 -2
- package/src/claude/intercept/picker-ca-startup.ts +3 -1
- package/src/claude/intercept/picker-models.ts +6 -3
- package/src/claude/intercept/picker-runtime.ts +3 -2
- package/src/claude/intercept/runtime.ts +6 -3
- package/src/claude/model-info.ts +31 -8
- package/src/cli/account-api.ts +11 -0
- package/src/cli/capabilities-agents-routing.ts +2 -2
- package/src/cli/capabilities-base.ts +7 -1
- package/src/cli/capabilities-observe-system.ts +10 -0
- package/src/cli/claude-desktop.ts +9 -8
- package/src/cli/claude.ts +3 -2
- package/src/cli/codex-shim-autorestore.ts +9 -0
- package/src/cli/combo-result.ts +7 -0
- package/src/cli/combo.ts +18 -0
- package/src/cli/cross-home-owner.ts +13 -1
- package/src/cli/dispatch.ts +25 -6
- package/src/cli/ensure-desired-integrations.ts +8 -6
- package/src/cli/export-command.ts +4 -1
- package/src/cli/help.ts +2 -1
- package/src/cli/index.ts +45 -45
- package/src/cli/integration-plan-dto.ts +4 -0
- package/src/cli/opencode.ts +20 -9
- package/src/cli/registry.ts +6 -4
- package/src/cli/root.ts +9 -0
- package/src/cli/status.ts +59 -1
- package/src/cli/stop-restore.ts +113 -0
- package/src/cli/sync-expectation.ts +60 -0
- package/src/cli/uninstall-integrations.ts +41 -7
- package/src/client/connect.ts +40 -3
- package/src/client/link-home.ts +10 -1
- package/src/client/machine-api.ts +3 -1
- package/src/client/sync-expectation.ts +118 -0
- package/src/clients/config-export/agent-clients.ts +96 -0
- package/src/clients/config-export/contracts.ts +25 -7
- package/src/clients/config-export/qoder.ts +38 -23
- package/src/clients/config-export/reasoning-metadata.ts +55 -8
- package/src/clients/config-export.ts +12 -0
- package/src/clients/lazycodex.ts +7 -2
- package/src/clients/reasoning-controls.ts +49 -0
- package/src/codex/auth-api/account-identity.ts +14 -0
- package/src/codex/auth-api/account-list.ts +29 -2
- package/src/codex/auth-api/http.ts +13 -0
- package/src/codex/auth-api/main-account-probe.ts +2 -2
- package/src/codex/auth-api/pool-mode-gate.ts +16 -3
- package/src/codex/auth-api/pool-quota-probe.ts +15 -0
- package/src/codex/auth-context.ts +15 -12
- package/src/codex/catalog/build-entries.ts +22 -0
- package/src/codex/catalog/configured-tiers.ts +70 -0
- package/src/codex/catalog/effort.ts +44 -10
- package/src/codex/catalog/gather-capture.ts +1 -0
- package/src/codex/catalog/heal-observation.ts +155 -13
- package/src/codex/catalog/metadata.ts +6 -0
- package/src/codex/catalog/model-hints.ts +60 -11
- package/src/codex/catalog/model-visibility.ts +3 -2
- package/src/codex/catalog/native-models.ts +18 -3
- package/src/codex/catalog/parsing.ts +10 -8
- package/src/codex/catalog/pinned-models.ts +2 -1
- package/src/codex/catalog/provider-models.ts +4 -5
- package/src/codex/catalog/retained-sync.ts +2 -1
- package/src/codex/catalog/routed-gather.ts +19 -20
- package/src/codex/catalog/write-audit.ts +3 -2
- package/src/codex/catalog-self-heal.ts +43 -23
- package/src/codex/collision-identity.ts +30 -5
- package/src/codex/convergence.ts +4 -3
- package/src/codex/data/roster-pinned-models.json +177 -1
- package/src/codex/desired-state.ts +6 -1
- package/src/codex/desktop-compatibility/installed-build.ts +88 -12
- package/src/codex/desktop-compatibility/runtime.ts +29 -5
- package/src/codex/desktop-compatibility/usage-controller.ts +2 -0
- package/src/codex/desktop-compatibility/windows-certificate-trust.ts +46 -12
- package/src/codex/inject/config-toml.ts +0 -18
- package/src/codex/inject/plan.ts +18 -3
- package/src/codex/inject/remove.ts +6 -2
- package/src/codex/inject.ts +1 -1
- package/src/codex/journal.ts +61 -1
- package/src/codex/model-entitlements.ts +1 -1
- package/src/codex/native-main-owner.ts +27 -1
- package/src/codex/native-profile-store.ts +2 -1
- package/src/codex/pool-credit-policy.ts +35 -1
- package/src/codex/quota-types.ts +3 -0
- package/src/codex/quota.ts +24 -4
- package/src/codex/role-auto-assign.ts +6 -2
- package/src/codex/subagent-defaults.ts +49 -4
- package/src/combos/failover.ts +17 -2
- package/src/combos/jev-decision-contract.ts +22 -1
- package/src/combos/jev-service-exchange.ts +3 -1
- package/src/combos/jev.ts +95 -9
- package/src/combos/resolve.ts +45 -1
- package/src/combos/types.ts +24 -0
- package/src/config/load-degrade.ts +5 -0
- package/src/config/paths.ts +19 -3
- package/src/config/pending-teardown.ts +22 -1
- package/src/config/provider-validation.ts +15 -4
- package/src/config/removed-opencode-free.ts +11 -0
- package/src/config/schema/leaf-validators.ts +5 -0
- package/src/generated/compatibility-version.json +314 -230
- package/src/generated/model-metadata.ts +5 -5
- package/src/images/loop.ts +16 -2
- package/src/integrations/catalog-refresh.ts +1 -1
- package/src/integrations/hermes-profiles.ts +251 -0
- package/src/integrations/merge.ts +8 -0
- package/src/integrations/mutation-plan.ts +19 -4
- package/src/integrations/registry.ts +5 -0
- package/src/integrations/state.ts +36 -1
- package/src/integrations/writer.ts +18 -4
- package/src/lib/bun-path-runtime.mjs +2 -1
- package/src/lib/errors.ts +62 -0
- package/src/lib/eventstream-decoder.ts +81 -37
- package/src/lib/opaque-proxy-tunnel.ts +32 -8
- package/src/lib/pinned-http.ts +35 -2
- package/src/lib/process-control.ts +13 -1
- package/src/lib/socks5-fetch.ts +59 -64
- package/src/lib/socks5-upload-waiter.ts +50 -0
- package/src/lib/sse-decoder.ts +7 -2
- package/src/lib/state-store-sweeper.ts +40 -14
- package/src/lib/windows-native-principal-worker.ts +14 -0
- package/src/lib/windows-native-principal.ts +188 -0
- package/src/lib/windows-secret-acl.ts +39 -3
- package/src/lib/windows-user-principal.ts +62 -18
- package/src/link/ssh-config.ts +35 -3
- package/src/providers/account-quota-disk.ts +12 -4
- package/src/providers/codebuddy-models.ts +6 -0
- package/src/providers/codex-capacity.ts +3 -1
- package/src/providers/derive.ts +28 -0
- package/src/providers/kiro-models.ts +3 -0
- package/src/providers/mimo-thinking.ts +12 -0
- package/src/providers/model-rename-fields.ts +1 -0
- package/src/providers/model-rename-migration.ts +10 -0
- package/src/providers/openai-sidecar-credit.ts +2 -2
- package/src/providers/reasoning-capabilities.ts +76 -0
- package/src/providers/registry/entries-core.ts +14 -12
- package/src/providers/registry/entries-extended.ts +63 -20
- package/src/providers/registry/model-ids.ts +2 -0
- package/src/providers/registry/model-seeds.ts +93 -28
- package/src/providers/registry/types.ts +10 -1
- package/src/providers/resolved-model-policy.ts +26 -6
- package/src/providers/routed-config.ts +9 -1
- package/src/providers/stale-model-roster-migration.ts +44 -7
- package/src/remote-control/workspace-pi-runtime.ts +11 -6
- package/src/responses/compaction-summary.ts +45 -0
- package/src/responses/muse-tool-name-alias.ts +1 -2
- package/src/responses/parser.ts +3 -2
- package/src/responses/schema.ts +1 -0
- package/src/responses/thought-signature-replay.ts +10 -2
- package/src/routing/capability.ts +8 -2
- package/src/routing/history/ingest.ts +28 -3
- package/src/server/auth-cors.ts +3 -2
- package/src/server/chat-completions.ts +7 -0
- package/src/server/chat-native-eligibility.ts +7 -0
- package/src/server/chat-native-reasoning.ts +14 -4
- package/src/server/direct-local-http.ts +5 -2
- package/src/server/effort-policy.ts +5 -1
- package/src/server/index/live-sideband.ts +18 -15
- package/src/server/index/serve-options.ts +5 -4
- package/src/server/management/agent-settings-routes.ts +27 -15
- package/src/server/management/combo-routes.ts +4 -0
- package/src/server/management/config-routes.ts +2 -2
- package/src/server/management/decision-discovery.ts +12 -2
- package/src/server/management/hermes-profile-routes.ts +156 -0
- package/src/server/management/integration-routes.ts +85 -24
- package/src/server/management/model-routes.ts +2 -2
- package/src/server/management/model-row-export-metadata.ts +25 -6
- package/src/server/management/model-rows.ts +15 -20
- package/src/server/management/native-integration-routes.ts +11 -8
- package/src/server/management/route-registry.ts +4 -0
- package/src/server/management-api.ts +5 -0
- package/src/server/models-capabilities.ts +21 -3
- package/src/server/responses/adapter-delivery.ts +11 -1
- package/src/server/responses/adapter-dispatch.ts +2 -2
- package/src/server/responses/codex-ws-exchange.ts +39 -9
- package/src/server/responses/codex-ws-session.ts +38 -4
- package/src/server/responses/codex-ws-wire.ts +6 -1
- package/src/server/responses/combo-required-tool-contract.ts +103 -0
- package/src/server/responses/combo-stream-preflight.ts +8 -1
- package/src/server/responses/compact.ts +4 -3
- package/src/server/responses/context-overflow.ts +8 -1
- package/src/server/responses/core-combo-failure.ts +10 -0
- package/src/server/responses/core-combo.ts +23 -15
- package/src/server/responses/core-lifetime.ts +3 -0
- package/src/server/responses/core-normalize.ts +11 -1
- package/src/server/responses/core-options.ts +2 -0
- package/src/server/responses/main-hard-lock-routing.ts +60 -44
- package/src/server/responses/passthrough-delivery.ts +40 -2
- package/src/server/responses/policy-fallback.ts +6 -1
- package/src/server/responses/request-compression.ts +12 -7
- package/src/server/responses/request-prepare.ts +22 -2
- package/src/server/responses/request-sidecar-auth.ts +2 -0
- package/src/server/responses/response-effects.ts +22 -10
- package/src/server/responses/sidecar-execution.ts +11 -3
- package/src/server/stop-teardown.ts +36 -1
- package/src/server/ws-bridge.ts +1 -1
- package/src/service/desktop-supervision.d.mts +7 -4
- package/src/service/desktop-supervision.mjs +90 -13
- package/src/service/ownership-mutation-lease.mjs +21 -7
- package/src/types/config.ts +8 -2
- package/src/types/provider.ts +20 -6
- package/src/types/request.ts +10 -0
- package/src/types.ts +1 -0
- package/src/update/bind-probe.ts +29 -0
- package/src/update/job.ts +10 -29
- package/src/update/npm-install-job.ps1 +173 -0
- package/src/update/npm-install.mjs +70 -0
- package/src/update/stop-contract.d.mts +1 -0
- package/src/update/stop-contract.mjs +14 -0
- package/src/update/stop-decision.d.mts +1 -1
- package/src/update/stop-decision.mjs +13 -3
- package/src/update/teardown-handover.ts +166 -0
- package/src/update/transactional-install.d.mts +14 -3
- package/src/update/transactional-install.mjs +33 -7
- package/src/usage/expected-prices.ts +64 -31
- package/src/usage/timeline.ts +19 -9
- package/src/vision/eligibility.ts +15 -5
- package/src/vision/plan.ts +2 -2
- package/src/web-search/loop.ts +16 -2
- package/gui/dist/assets/App-sUf_8afJ.js +0 -58
- package/gui/dist/assets/index-DPeB9HpV.css +0 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
MOONSHOT_INTL_BASE_URL,
|
|
10
10
|
} from "../base-url-choices";
|
|
11
11
|
import { COMMAND_CODE_MODEL_REASONING_EFFORTS } from "../command-code-efforts";
|
|
12
|
+
import { MIMO_THINKING_CAPABILITIES, MIMO_THINKING_MODELS } from "../mimo-thinking";
|
|
12
13
|
import {
|
|
13
14
|
CODEBUDDY_CN_MODELS,
|
|
14
15
|
CODEBUDDY_CN_MODEL_CONTEXT_WINDOWS,
|
|
@@ -38,7 +39,7 @@ import {
|
|
|
38
39
|
MINIMAX_MODEL_INPUT_MODALITIES,
|
|
39
40
|
MINIMAX_M3_REASONING_EFFORTS,
|
|
40
41
|
MINIMAX_M3_REASONING_EFFORT_MAP,
|
|
41
|
-
|
|
42
|
+
MINIMAX_M31_FLASH,
|
|
42
43
|
MINIMAX_M31_REASONING_EFFORTS,
|
|
43
44
|
MINIMAX_M31_DEFAULT_REASONING_EFFORT,
|
|
44
45
|
MINIMAX_REASONING_SPLIT_MODELS,
|
|
@@ -86,6 +87,8 @@ import {
|
|
|
86
87
|
KIMI_CODING_DEFAULT_REASONING_EFFORTS,
|
|
87
88
|
KIMI_CODING_REASONING_EFFORT_MAPS,
|
|
88
89
|
KIMI_API_REASONING_EFFORTS,
|
|
90
|
+
KIMI_API_DEFAULT_REASONING_EFFORTS,
|
|
91
|
+
KIMI_API_REASONING_EFFORT_MAPS,
|
|
89
92
|
KIMI_LOCKED_PARAMETER_MODELS,
|
|
90
93
|
KIMI_AUTO_TOOL_CHOICE_ONLY_MODELS,
|
|
91
94
|
KIMI_API_MODEL_CONTEXT_WINDOWS,
|
|
@@ -108,6 +111,10 @@ import {
|
|
|
108
111
|
OPPER_MODEL_CONTEXT_WINDOWS,
|
|
109
112
|
OPPER_MODEL_MAX_OUTPUT_TOKENS,
|
|
110
113
|
OPPER_MODEL_INPUT_MODALITIES,
|
|
114
|
+
AISTUPIDLEVEL_ROUTING_MODES,
|
|
115
|
+
AISTUPIDLEVEL_MODEL_CONTEXT_WINDOWS,
|
|
116
|
+
AISTUPIDLEVEL_MODEL_MAX_OUTPUT_TOKENS,
|
|
117
|
+
AISTUPIDLEVEL_MODEL_INPUT_MODALITIES,
|
|
111
118
|
STEPFUN_MODELS,
|
|
112
119
|
STEPFUN_MODEL_CONTEXT_WINDOWS,
|
|
113
120
|
STEPFUN_MODEL_INPUT_MODALITIES,
|
|
@@ -478,6 +485,8 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
478
485
|
modelInputModalities: KIMI_API_MODEL_INPUT_MODALITIES,
|
|
479
486
|
noReasoningModels: KIMI_API_NO_REASONING_MODELS,
|
|
480
487
|
modelReasoningEfforts: KIMI_API_REASONING_EFFORTS,
|
|
488
|
+
modelDefaultReasoningEfforts: KIMI_API_DEFAULT_REASONING_EFFORTS,
|
|
489
|
+
modelReasoningEffortMap: KIMI_API_REASONING_EFFORT_MAPS,
|
|
481
490
|
noTemperatureModels: KIMI_API_MODELS,
|
|
482
491
|
noTopPModels: KIMI_API_MODELS,
|
|
483
492
|
noPenaltyModels: KIMI_API_MODELS,
|
|
@@ -1040,18 +1049,18 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1040
1049
|
},
|
|
1041
1050
|
{
|
|
1042
1051
|
id: "minimax", label: "MiniMax — Coding Plan", baseUrl: "https://api.minimax.io/v1", adapter: "openai-chat", authKind: "key",
|
|
1043
|
-
dashboardUrl: "https://platform.minimax.io", defaultModel:
|
|
1052
|
+
dashboardUrl: "https://platform.minimax.io", defaultModel: MINIMAX_M31_FLASH, models: MINIMAX_MODELS,
|
|
1044
1053
|
modelContextWindows: MINIMAX_MODEL_CONTEXT_WINDOWS,
|
|
1045
1054
|
modelInputModalities: MINIMAX_MODEL_INPUT_MODALITIES,
|
|
1046
|
-
modelReasoningEfforts: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORTS, [
|
|
1047
|
-
modelDefaultReasoningEfforts: { "MiniMax-M3": "medium", [
|
|
1055
|
+
modelReasoningEfforts: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORTS, [MINIMAX_M31_FLASH]: MINIMAX_M31_REASONING_EFFORTS },
|
|
1056
|
+
modelDefaultReasoningEfforts: { "MiniMax-M3": "medium", [MINIMAX_M31_FLASH]: MINIMAX_M31_DEFAULT_REASONING_EFFORT },
|
|
1048
1057
|
modelReasoningEffortMap: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORT_MAP },
|
|
1049
1058
|
preserveReasoningContentModels: MINIMAX_MODELS,
|
|
1050
1059
|
// MiniMax-M3 low effort maps to thinking disabled, so a legitimate tool
|
|
1051
1060
|
// round can carry no reasoning at all; only replay real recorded text,
|
|
1052
1061
|
// never a fabricated placeholder (chatgpt-codex-connector P2 on #1205).
|
|
1053
1062
|
requiresReasoningPlaceholderModels: [],
|
|
1054
|
-
// M3.1-Flash
|
|
1063
|
+
// M3.1-Flash ignores reasoning_split and always answers with reasoning_content,
|
|
1055
1064
|
// so it stays off the split/details lists and replays as a reasoning_content string.
|
|
1056
1065
|
reasoningSplitModels: MINIMAX_REASONING_SPLIT_MODELS,
|
|
1057
1066
|
// With reasoning_split the upstream returns thinking as a structured
|
|
@@ -1066,11 +1075,11 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1066
1075
|
},
|
|
1067
1076
|
{
|
|
1068
1077
|
id: "minimax-cn", label: "MiniMax — Coding Plan (CN)", baseUrl: "https://api.minimaxi.com/v1", adapter: "openai-chat", authKind: "key",
|
|
1069
|
-
dashboardUrl: "https://platform.minimaxi.com", defaultModel:
|
|
1078
|
+
dashboardUrl: "https://platform.minimaxi.com", defaultModel: MINIMAX_M31_FLASH, models: MINIMAX_MODELS,
|
|
1070
1079
|
modelContextWindows: MINIMAX_MODEL_CONTEXT_WINDOWS,
|
|
1071
1080
|
modelInputModalities: MINIMAX_MODEL_INPUT_MODALITIES,
|
|
1072
|
-
modelReasoningEfforts: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORTS, [
|
|
1073
|
-
modelDefaultReasoningEfforts: { "MiniMax-M3": "medium", [
|
|
1081
|
+
modelReasoningEfforts: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORTS, [MINIMAX_M31_FLASH]: MINIMAX_M31_REASONING_EFFORTS },
|
|
1082
|
+
modelDefaultReasoningEfforts: { "MiniMax-M3": "medium", [MINIMAX_M31_FLASH]: MINIMAX_M31_DEFAULT_REASONING_EFFORT },
|
|
1074
1083
|
modelReasoningEffortMap: { "MiniMax-M3": MINIMAX_M3_REASONING_EFFORT_MAP },
|
|
1075
1084
|
preserveReasoningContentModels: MINIMAX_MODELS,
|
|
1076
1085
|
requiresReasoningPlaceholderModels: [],
|
|
@@ -1237,10 +1246,11 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1237
1246
|
liveModels: true,
|
|
1238
1247
|
preserveCustomDestination: true,
|
|
1239
1248
|
defaultModel: "gpt-5.6-terra",
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1249
|
+
// 261027 preemptive: GPT-6.1 Terra (OpenAI API limits; TokenLab listing unverified).
|
|
1250
|
+
models: ["gpt-5.6-terra", "gpt-6.1-terra"],
|
|
1251
|
+
modelContextWindows: { "gpt-5.6-terra": 1_050_000, "gpt-6.1-terra": 1_050_000 },
|
|
1252
|
+
modelMaxOutputTokens: { "gpt-5.6-terra": 128_000, "gpt-6.1-terra": 128_000 },
|
|
1253
|
+
modelInputModalities: { "gpt-5.6-terra": ["text", "image"], "gpt-6.1-terra": ["text", "image"] },
|
|
1244
1254
|
// Per-model wires from `tokenlab.accepted_request_formats` (GET /v1/models/{id}, 2026-09-30).
|
|
1245
1255
|
// The provider stays on Chat, the released and end-to-end verified path, and every model
|
|
1246
1256
|
// accepts it. Models that also declare Responses use it for Codex (Responses inbound) only,
|
|
@@ -1249,7 +1259,8 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1249
1259
|
// gemini-3.8-flash declares Chat + Gemini native and stays on Chat. No delivery-policy
|
|
1250
1260
|
// header is sent: the API key's own policy stays authoritative.
|
|
1251
1261
|
modelWireDefaults: Object.fromEntries([
|
|
1252
|
-
|
|
1262
|
+
// 261027 preemptive: GPT-6.1 Terra (mirrors TokenLab's GPT-6.1 Sol wire).
|
|
1263
|
+
"gpt-6-astra", "gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-sol", "gpt-6-luna", "grok-4.7",
|
|
1253
1264
|
"deepseek-v4.1-flash", "deepseek-v4-pro", "kimi-k3", "glm-5.3",
|
|
1254
1265
|
].map(id => [id, { wire: "openai-responses", inbound: ["responses"] }])),
|
|
1255
1266
|
modelDiscovery: {
|
|
@@ -1280,18 +1291,46 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1280
1291
|
dashboardUrl: "https://modelflare.dev",
|
|
1281
1292
|
preserveCustomDestination: true,
|
|
1282
1293
|
defaultModel: "glm-5.3-flash",
|
|
1283
|
-
|
|
1284
|
-
|
|
1294
|
+
// 261027 preemptive: GPT-6.1 Terra (mirrors Modelflare's GPT-6.1 Sol seed; provider listing unverified).
|
|
1295
|
+
models: ["glm-5.3-flash", "claude-sonnet-5-5", "gpt-6.1-sol", "gpt-6.1-terra", "deepseek-v4-flash"],
|
|
1296
|
+
note: "OpenAI-compatible relay for Claude, GPT, GLM and DeepSeek chat models. The original four seeded models were verified with chat, streaming and tool calls; GPT-6.1 Terra is a preemptive seed pending provider verification. deepseek-v4.1-flash is listed upstream but currently answers 503 and is left out. An ordinary key only reaches its own routing group's models; a Smart key reaches the verified seeded models. Image and video models are not served through this Chat preset. Upstream latency varies widely (a few seconds to about 30 s) with occasional transient 503s.",
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
// AI Stupid Level Smart Router, operated by S.C. Studio Platforms S.R.L. Contract checked
|
|
1300
|
+
// 2026-10-26: https://aistupidlevel.info/router/docs and https://aistupidlevel.info/terms#router.
|
|
1301
|
+
// The router calls the model it picks with the provider keys saved on the user's own ASL
|
|
1302
|
+
// account, so each provider bills the user directly; ASL resells no model access. GET /v1/models
|
|
1303
|
+
// answers 401 without a valid key, so the default discovery URL doubles as key validation. The
|
|
1304
|
+
// router's /v1/messages is a plain Anthropic passthrough with no routing, so every inbound,
|
|
1305
|
+
// Claude Code included, stays on Chat. The env reference derived from the id is
|
|
1306
|
+
// ${AISTUPIDLEVEL_API_KEY}.
|
|
1307
|
+
id: "aistupidlevel",
|
|
1308
|
+
label: "AI Stupid Level",
|
|
1309
|
+
adapter: "openai-chat",
|
|
1310
|
+
baseUrl: "https://aistupidlevel.info/v1",
|
|
1311
|
+
authKind: "key",
|
|
1312
|
+
dashboardUrl: "https://aistupidlevel.info/router/keys",
|
|
1313
|
+
liveModels: true,
|
|
1314
|
+
preserveCustomDestination: true,
|
|
1315
|
+
defaultModel: "auto-coding",
|
|
1316
|
+
models: AISTUPIDLEVEL_ROUTING_MODES,
|
|
1317
|
+
modelContextWindows: AISTUPIDLEVEL_MODEL_CONTEXT_WINDOWS,
|
|
1318
|
+
modelMaxOutputTokens: AISTUPIDLEVEL_MODEL_MAX_OUTPUT_TOKENS,
|
|
1319
|
+
modelInputModalities: AISTUPIDLEVEL_MODEL_INPUT_MODALITIES,
|
|
1320
|
+
// Text only for every id, including the pinned models live discovery adds: the router
|
|
1321
|
+
// answers an image, audio or file part with 400 `unsupported_content`.
|
|
1322
|
+
inputModalities: ["text"],
|
|
1323
|
+
note: "Smart Router that sends each request to a model chosen from AI Stupid Level's benchmarks, using the provider keys saved on your AI Stupid Level account (OpenAI, Anthropic, Google, DeepSeek, Kimi, GLM), so each provider bills you directly with no markup. Routing modes: auto-coding (the default), auto-tooling, auto-reasoning, auto-best, plus value and speed modes. A real model id from the live list, such as claude-opus-5-5, pins one model. The X-AISM-Model response header names the model that answered. Text only.",
|
|
1285
1324
|
},
|
|
1286
1325
|
// Xiaomi retires mimo-v2.5 and mimo-v2.5-pro on 2026-10-21 with no redirect
|
|
1287
1326
|
// (https://mimo.mi.com/docs/en-US/updates/deprecate), so the first-party presets default to V2.6.
|
|
1288
1327
|
// Saved defaults are not rewritten; V2.5 stays listed until it stops answering.
|
|
1289
1328
|
// Both first-party presets read the xiaomi metadata bundle for window, output, modalities and price.
|
|
1290
|
-
{ id: "xiaomi", label: "Xiaomi MiMo", baseUrl: "https://api.xiaomimimo.com/anthropic", adapter: "anthropic", authKind: "key", dashboardUrl: "https://xiaomimimo.com", defaultModel: "mimo-v2.6-pro", models: ["mimo-v2.6-pro", "mimo-v2.6-flash", "mimo-v2.6-pro-ultraspeed", "mimo-v2.5-pro", "mimo-v2.5"], jawcodeBundle: "xiaomi" },
|
|
1329
|
+
{ id: "xiaomi", label: "Xiaomi MiMo", baseUrl: "https://api.xiaomimimo.com/anthropic", adapter: "anthropic", authKind: "key", dashboardUrl: "https://xiaomimimo.com", defaultModel: "mimo-v2.6-pro", models: ["mimo-v2.6-pro", "mimo-v2.6-flash", "mimo-v2.6-pro-ultraspeed", "mimo-v2.5-pro", "mimo-v2.5"], jawcodeBundle: "xiaomi", modelCapabilities: MIMO_THINKING_CAPABILITIES, thinkingToggleModels: [...MIMO_THINKING_MODELS] },
|
|
1291
1330
|
// Xiaomi's public OpenAI-compatible endpoint is a distinct transport from both the Anthropic
|
|
1292
1331
|
// preset above and the paid token-plan host below. Keep a separate fixed-destination contract
|
|
1293
|
-
// so existing custom providers are never retargeted
|
|
1294
|
-
//
|
|
1332
|
+
// so existing custom providers are never retargeted. V2.6 uses the documented thinking
|
|
1333
|
+
// toggle; older models retain the reasoning ladder validated in #1483.
|
|
1295
1334
|
{
|
|
1296
1335
|
id: "xiaomi-mimo",
|
|
1297
1336
|
label: "Xiaomi MiMo (OpenAI Chat)",
|
|
@@ -1301,11 +1340,13 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1301
1340
|
dashboardUrl: "https://platform.xiaomimimo.com/console/balance",
|
|
1302
1341
|
defaultModel: "mimo-v2.6-flash",
|
|
1303
1342
|
models: ["mimo-v2.6-flash", "mimo-v2.6-pro", "mimo-v2.6-pro-ultraspeed", "mimo-v2.5"],
|
|
1343
|
+
modelCapabilities: MIMO_THINKING_CAPABILITIES,
|
|
1344
|
+
thinkingToggleModels: [...MIMO_THINKING_MODELS],
|
|
1304
1345
|
jawcodeBundle: "xiaomi",
|
|
1305
1346
|
reasoningEfforts: ["low", "medium", "high"],
|
|
1306
1347
|
reasoningEffortMap: { xhigh: "high", max: "high", ultra: "high" },
|
|
1307
1348
|
preserveCustomDestination: true,
|
|
1308
|
-
note: "Official Xiaomi MiMo OpenAI-compatible Chat endpoint.
|
|
1349
|
+
note: "Official Xiaomi MiMo OpenAI-compatible Chat endpoint. V2.6 thinking is on/off: none disables it; high is the client-compatible on value, not a distinct reasoning strength. Older models retain their existing effort contract.",
|
|
1309
1350
|
},
|
|
1310
1351
|
{ id: "kilo", label: "Kilo", baseUrl: "https://api.kilo.ai/api/gateway", adapter: "openai-chat", authKind: "key", dashboardUrl: "https://kilo.ai" },
|
|
1311
1352
|
{
|
|
@@ -1414,7 +1455,7 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1414
1455
|
featured: false,
|
|
1415
1456
|
dashboardUrl: "https://github.com/settings/copilot",
|
|
1416
1457
|
liveModels: true,
|
|
1417
|
-
models: ["gpt-4o", "gpt-4.1", "gpt-4.1-mini", "claude-sonnet-4", "gemini-2.5-pro", "gpt-5-mini", "gpt-5.3-codex", "gpt-5.4", "gpt-5.4-mini", "gpt-5.5", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna"],
|
|
1458
|
+
models: ["gpt-4o", "gpt-4.1", "gpt-4.1-mini", "claude-sonnet-4", "gemini-2.5-pro", "gpt-5-mini", "gpt-5.3-codex", "gpt-5.4", "gpt-5.4-mini", "gpt-5.5", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-sol", "gpt-6-luna"],
|
|
1418
1459
|
defaultModel: "gpt-4o",
|
|
1419
1460
|
// Copilot fronts a mixed-wire catalog: these models reject /chat/completions for
|
|
1420
1461
|
// real Codex-agent traffic (function tools + reasoning), so every inbound wire
|
|
@@ -1436,6 +1477,8 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1436
1477
|
"gpt-6-luna": "openai-responses",
|
|
1437
1478
|
// GPT-6.1 Sol: GA in Copilot 2026-09-29 (github.blog changelog); rides Responses like GPT-6 Sol.
|
|
1438
1479
|
"gpt-6.1-sol": "openai-responses",
|
|
1480
|
+
// GPT-6.1 Terra: GA in Copilot 2026-10-26; rides Responses like GPT-6.1 Sol.
|
|
1481
|
+
"gpt-6.1-terra": "openai-responses",
|
|
1439
1482
|
"grok-4.5": "openai-responses",
|
|
1440
1483
|
"grok-4.6": "openai-responses",
|
|
1441
1484
|
"mai-code-1.1-flash": "openai-responses",
|
|
@@ -99,6 +99,8 @@ export const REGISTRY_FIELD_MODEL_ID_ROLES = {
|
|
|
99
99
|
modelContextWindows: RECORD_KEYS,
|
|
100
100
|
modelDisplayNames: RECORD_KEYS,
|
|
101
101
|
modelInputModalities: RECORD_KEYS,
|
|
102
|
+
inputModalities: NONE,
|
|
103
|
+
modelCapabilities: RECORD_KEYS,
|
|
102
104
|
defaultMaxOutputTokens: NONE,
|
|
103
105
|
modelMaxOutputTokens: RECORD_KEYS,
|
|
104
106
|
reasoningEfforts: NONE,
|
|
@@ -155,30 +155,33 @@ export const ZAI_GLM_5X_REASONING_EFFORTS: Record<string, string[]> = {
|
|
|
155
155
|
};
|
|
156
156
|
// 260710 MiniMax models and context windows: Tier-2 evidence in
|
|
157
157
|
// devlog/_plan/260710_provider_hardening/002_research_cn.md.
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
// 261021 MiniMax-M3.1-Flash: current global/CN text route, 1M context, thinking always on
|
|
159
|
+
// (effort none or thinking disabled answers 400), omitted effort = max. It returns thinking as
|
|
160
|
+
// reasoning_content and ignores reasoning_split. The live /v1/models roster may omit it.
|
|
161
|
+
export const MINIMAX_M31_FLASH = "MiniMax-M3.1-Flash";
|
|
162
|
+
/** The preview id MiniMax retired when M3.1-Flash went GA (2026-10-19); see MODEL_RENAMES. */
|
|
163
|
+
export const MINIMAX_M31_FLASH_PREVIEW_RETIRED = "MiniMax-M3.1-Flash-Preview";
|
|
164
|
+
/** MiniMax's published M3.1-Flash output ceiling (512K). */
|
|
165
|
+
export const MINIMAX_M31_FLASH_MAX_OUTPUT_TOKENS = 524_288;
|
|
163
166
|
export const MINIMAX_MODELS = [
|
|
164
|
-
|
|
167
|
+
MINIMAX_M31_FLASH,
|
|
165
168
|
"MiniMax-M3",
|
|
166
169
|
"MiniMax-M2.7", "MiniMax-M2.7-highspeed",
|
|
167
170
|
"MiniMax-M2.5", "MiniMax-M2.5-highspeed",
|
|
168
171
|
"MiniMax-M2.1", "MiniMax-M2.1-highspeed",
|
|
169
172
|
"MiniMax-M2",
|
|
170
173
|
];
|
|
171
|
-
/** The eight-id roster every MiniMax preset seeded
|
|
172
|
-
export const MINIMAX_MODELS_BEFORE_M31 = MINIMAX_MODELS.filter(id => id !==
|
|
174
|
+
/** The eight-id roster every MiniMax preset seeded before Flash landed. */
|
|
175
|
+
export const MINIMAX_MODELS_BEFORE_M31 = MINIMAX_MODELS.filter(id => id !== MINIMAX_M31_FLASH);
|
|
173
176
|
/** Models that honour reasoning_split and answer with structured reasoning_details. */
|
|
174
177
|
export const MINIMAX_REASONING_SPLIT_MODELS = MINIMAX_MODELS_BEFORE_M31;
|
|
175
178
|
export const MINIMAX_MODEL_CONTEXT_WINDOWS: Record<string, number> = Object.fromEntries(
|
|
176
|
-
MINIMAX_MODELS.map(id => [id, id === "MiniMax-M3" || id ===
|
|
179
|
+
MINIMAX_MODELS.map(id => [id, id === "MiniMax-M3" || id === MINIMAX_M31_FLASH ? 1_000_000 : 204_800]),
|
|
177
180
|
);
|
|
178
181
|
/** MiniMax's OpenAI-compatible M3 endpoints accept image_url; keep video off Codex's input enum. */
|
|
179
182
|
export const MINIMAX_MODEL_INPUT_MODALITIES: Record<string, string[]> = {
|
|
180
183
|
"MiniMax-M3": ["text", "image"],
|
|
181
|
-
[
|
|
184
|
+
[MINIMAX_M31_FLASH]: ["text", "image"],
|
|
182
185
|
};
|
|
183
186
|
export const MINIMAX_M3_REASONING_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
|
|
184
187
|
/** Identity efforts on the wire; no map, so none omits the field instead of disabling thinking. */
|
|
@@ -219,7 +222,8 @@ export const OPENAI_API_GPT56_REASONING_EFFORTS = ["low", "medium", "high", "xhi
|
|
|
219
222
|
* 1,050,000 context, 922,000 max input, 128,000 max output, efforts low..max
|
|
220
223
|
* (https://developers.openai.com/api/docs/models/gpt-6.1-sol, checked 2026-09-30).
|
|
221
224
|
*/
|
|
222
|
-
|
|
225
|
+
// GPT-6.1 Terra (2026-10-26): same API limits; its none..max ladder is set per model.
|
|
226
|
+
export const OPENAI_GPT6_MODELS = ["gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-sol", "gpt-6-luna"];
|
|
223
227
|
/*
|
|
224
228
|
* Meta Model API (https://api.meta.ai/v1) — published ladder, deliberately NOT the
|
|
225
229
|
* house set. dev.meta.ai/docs/reasoning lists "none", "minimal", "low", "medium",
|
|
@@ -327,6 +331,8 @@ export const OPENROUTER_GPT56_CONTEXT_WINDOWS = {
|
|
|
327
331
|
"openai/gpt-6-luna": OPENROUTER_GPT56_CONTEXT_WINDOW,
|
|
328
332
|
// Live /api/v1/models on 2026-09-30: context_length 1,050,000, max_completion_tokens 128,000.
|
|
329
333
|
"openai/gpt-6.1-sol": OPENROUTER_GPT56_CONTEXT_WINDOW,
|
|
334
|
+
// OpenRouter listing checked 2026-10-27: context_length 1,050,000.
|
|
335
|
+
"openai/gpt-6.1-terra": OPENROUTER_GPT56_CONTEXT_WINDOW,
|
|
330
336
|
};
|
|
331
337
|
|
|
332
338
|
/**
|
|
@@ -377,8 +383,8 @@ export const OPENCODE_GO_THINKING_BUDGET_MODELS = ["qwen3.5-plus", "qwen3.6-plus
|
|
|
377
383
|
/*
|
|
378
384
|
* DeepSeek moved the whole V4 name set on 2026-09-10. V4.1-Flash ships as deepseek-flash
|
|
379
385
|
* on the first-party API; deepseek-v4-flash and the vision preview retire as models but
|
|
380
|
-
* keep routing there as compatibility aliases
|
|
381
|
-
*
|
|
386
|
+
* keep routing there as compatibility aliases. V4 Pro remains available: the planned
|
|
387
|
+
* retirement was withdrawn. Evidence: https://api-docs.deepseek.com/updates/ (2026-10-23).
|
|
382
388
|
*
|
|
383
389
|
* The spelling differs by who serves it, so one shared list cannot express it: the
|
|
384
390
|
* first-party API answers to deepseek-flash, while the Zen gateway exposes the route as
|
|
@@ -388,15 +394,10 @@ export const OPENCODE_GO_THINKING_BUDGET_MODELS = ["qwen3.5-plus", "qwen3.6-plus
|
|
|
388
394
|
*/
|
|
389
395
|
export const DEEPSEEK_V4_LEGACY_MODELS = ["deepseek-v4-flash"];
|
|
390
396
|
/*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* row here would advertise a Pro context window and Pro pricing for a route that serves
|
|
394
|
-
* Flash. The retirement is followed through every roster in this file, including the
|
|
395
|
-
* vendor-hosted ones; providers that discover their models live are handled by
|
|
396
|
-
* `ROUTED_MODEL_COMPATIBILITY_EXCLUSIONS` because deleting a row there removes the
|
|
397
|
-
* model's capabilities rather than the model.
|
|
397
|
+
* The official API continues serving V4 Pro after September 14 with unchanged billing.
|
|
398
|
+
* Gateway availability is independent; restoring the native set does not change gateway rosters.
|
|
398
399
|
*/
|
|
399
|
-
export const DEEPSEEK_NATIVE_THINKING_MODELS = ["deepseek-flash", "deepseek-v4-flash"];
|
|
400
|
+
export const DEEPSEEK_NATIVE_THINKING_MODELS = ["deepseek-flash", "deepseek-v4-flash", "deepseek-v4-pro"];
|
|
400
401
|
export const DEEPSEEK_GATEWAY_THINKING_MODELS = ["deepseek-v4.1-flash", "deepseek-v4-flash"];
|
|
401
402
|
/*
|
|
402
403
|
* DeepSeek's legacy vision preview id (released 2026-08-21). First-party probes
|
|
@@ -753,6 +754,12 @@ export const ALIBABA_TOKEN_PLAN_PRESERVE_REASONING = [
|
|
|
753
754
|
export const KIMI_K3_STANDARD_CONTEXT_WINDOW = 262_144;
|
|
754
755
|
export const KIMI_K3_1M_CONTEXT_WINDOW = 1_048_576;
|
|
755
756
|
export const KIMI_CODING_K3_MODELS = ["k3", "k3[1m]", "k3-256k"];
|
|
757
|
+
// 261024 Kimi K3.1 Pro: live GET /coding/v1/models now also lists k3.1-pro and
|
|
758
|
+
// k3.1-pro-highspeed, both advertising context_length 1048576 (flat 1M, no entitlement
|
|
759
|
+
// alias). Both run thinking-only: the endpoint rejects thinking-disabled requests with
|
|
760
|
+
// HTTP 400, and an absent effort defaults to max — the same low/high/max ladder as k3.
|
|
761
|
+
// Evidence: https://www.kimi.com/code/docs/en/kimi-code/models.html
|
|
762
|
+
export const KIMI_CODING_K31_MODELS = ["k3.1-pro", "k3.1-pro-highspeed"];
|
|
756
763
|
// 260921 Kimi K2.8: `kimi-for-coding` is the stable subscription alias Moonshot re-points
|
|
757
764
|
// at each coding release. Live GET /coding/v1/models lists only kimi-for-coding[-highspeed],
|
|
758
765
|
// k3, k3-256k — the k2.x ids are retired from the subscription endpoint. Since K2.8 Preview
|
|
@@ -761,10 +768,27 @@ export const KIMI_CODING_K3_MODELS = ["k3", "k3[1m]", "k3-256k"];
|
|
|
761
768
|
// with "model token limit: 1048576" beyond that.
|
|
762
769
|
// Evidence: https://www.kimi.com/code/docs/en/kimi-code/models.html
|
|
763
770
|
export const KIMI_CODING_K28_MODELS = ["kimi-for-coding"];
|
|
764
|
-
export const KIMI_CODING_LIVE_MODELS = [...KIMI_CODING_K3_MODELS, ...KIMI_CODING_K28_MODELS];
|
|
771
|
+
export const KIMI_CODING_LIVE_MODELS = [...KIMI_CODING_K3_MODELS, ...KIMI_CODING_K31_MODELS, ...KIMI_CODING_K28_MODELS];
|
|
765
772
|
export const KIMI_CODING_ADJUSTABLE_THINKING_MODELS = [...KIMI_CODING_LIVE_MODELS];
|
|
766
773
|
export const KIMI_LEGACY_API_MODELS = ["kimi-k2.7-code", "kimi-k2.7-code-highspeed", "kimi-k2.6", "kimi-k2.5"];
|
|
767
|
-
|
|
774
|
+
// 261025 Kimi K3.1 Pro on the Moonshot API (#7653): the platform model list names kimi-k3.1-pro
|
|
775
|
+
// and kimi-k3.1-pro-highspeed (same model, 2-3x speed) on both the International and China
|
|
776
|
+
// platforms. Every K3-series model has a 1,048,576-token window, and both ids share kimi-k3's
|
|
777
|
+
// parameter constraints: thinking is always on, top-level reasoning_effort takes low/high/max
|
|
778
|
+
// (default max), temperature/top_p/n/penalties are fixed, tool_choice "required" is supported.
|
|
779
|
+
// Verified 2026-10-25 against official docs only:
|
|
780
|
+
// Evidence: https://platform.kimi.ai/docs/models.md
|
|
781
|
+
// https://platform.kimi.ai/docs/guide/kimi-k3-1-pro-quickstart.md
|
|
782
|
+
// https://platform.kimi.ai/docs/api/models-overview.md
|
|
783
|
+
// https://platform.kimi.ai/docs/pricing/chat.md
|
|
784
|
+
// https://platform.kimi.com/docs/models.md (China)
|
|
785
|
+
export const KIMI_API_K31_MODELS = ["kimi-k3.1-pro", "kimi-k3.1-pro-highspeed"];
|
|
786
|
+
export const KIMI_API_K3_SERIES_MODELS = ["kimi-k3", ...KIMI_API_K31_MODELS];
|
|
787
|
+
export const KIMI_API_MODELS = [...KIMI_API_K3_SERIES_MODELS, ...KIMI_LEGACY_API_MODELS];
|
|
788
|
+
// The moonshot roster saved by installs between the K3 seed (260717) and K3.1 Pro. A literal on
|
|
789
|
+
// purpose: stale-model-roster-migration refreshes only rows still identical to it, and a later
|
|
790
|
+
// K2 retirement must not change what that refresh matches.
|
|
791
|
+
export const KIMI_API_MODELS_BEFORE_K31 = ["kimi-k3", "kimi-k2.7-code", "kimi-k2.7-code-highspeed", "kimi-k2.6", "kimi-k2.5"];
|
|
768
792
|
// Every kimi coding preset record - picker, context windows, locked-parameter lists -
|
|
769
793
|
// derives from the live ids only. seeding a retired id in a metadata list would re-arm
|
|
770
794
|
// the model-rename migration on every boot (#5066): the list holds the retired id but
|
|
@@ -773,7 +797,7 @@ export const KIMI_API_MODELS = ["kimi-k3", ...KIMI_LEGACY_API_MODELS];
|
|
|
773
797
|
// repairs saved rows still naming them.
|
|
774
798
|
export const KIMI_THINKING_MODELS = KIMI_CODING_LIVE_MODELS;
|
|
775
799
|
export const KIMI_CODING_NO_REASONING_MODELS = KIMI_CODING_LIVE_MODELS.filter(id => !KIMI_CODING_ADJUSTABLE_THINKING_MODELS.includes(id));
|
|
776
|
-
export const KIMI_API_NO_REASONING_MODELS = KIMI_API_MODELS.filter(id => id
|
|
800
|
+
export const KIMI_API_NO_REASONING_MODELS = KIMI_API_MODELS.filter(id => !KIMI_API_K3_SERIES_MODELS.includes(id));
|
|
777
801
|
export const KIMI_CODING_K3_REASONING_EFFORTS = ["low", "high", "max"];
|
|
778
802
|
export const KIMI_CODING_K3_REASONING_EFFORT_MAP: Record<string, string> = {
|
|
779
803
|
none: "none",
|
|
@@ -792,15 +816,33 @@ export const KIMI_CODING_DEFAULT_REASONING_EFFORTS = Object.fromEntries(
|
|
|
792
816
|
export const KIMI_CODING_REASONING_EFFORT_MAPS = Object.fromEntries(
|
|
793
817
|
KIMI_CODING_ADJUSTABLE_THINKING_MODELS.map(id => [id, KIMI_CODING_K3_REASONING_EFFORT_MAP]),
|
|
794
818
|
);
|
|
819
|
+
// kimi-k3 keeps its launch-time max-only list; K3.1 Pro gets the documented low/high/max ladder.
|
|
795
820
|
export const KIMI_API_REASONING_EFFORTS = Object.fromEntries(
|
|
796
|
-
KIMI_API_MODELS.map(id => [
|
|
821
|
+
KIMI_API_MODELS.map(id => [
|
|
822
|
+
id,
|
|
823
|
+
KIMI_API_K31_MODELS.includes(id) ? KIMI_CODING_K3_REASONING_EFFORTS : id === "kimi-k3" ? ["max"] : [],
|
|
824
|
+
]),
|
|
825
|
+
);
|
|
826
|
+
export const KIMI_API_DEFAULT_REASONING_EFFORTS = Object.fromEntries(KIMI_API_K31_MODELS.map(id => [id, "max"]));
|
|
827
|
+
// K3.1 Pro cannot disable thinking and documents only low/high/max, so an explicit "none" omits
|
|
828
|
+
// reasoning_effort (upstream default max) rather than sending an undocumented value. The value is
|
|
829
|
+
// REASONING_EFFORT_OMIT_SENTINEL (src/reasoning-effort.ts); the registry does not import the
|
|
830
|
+
// request-path module, and provider-registry-parity asserts the two stay equal.
|
|
831
|
+
export const KIMI_API_K31_REASONING_EFFORT_MAP: Record<string, string> = {
|
|
832
|
+
...KIMI_CODING_K3_REASONING_EFFORT_MAP,
|
|
833
|
+
none: "__omit__",
|
|
834
|
+
};
|
|
835
|
+
export const KIMI_API_REASONING_EFFORT_MAPS = Object.fromEntries(
|
|
836
|
+
KIMI_API_K31_MODELS.map(id => [id, KIMI_API_K31_REASONING_EFFORT_MAP]),
|
|
797
837
|
);
|
|
798
838
|
export const KIMI_LOCKED_PARAMETER_MODELS = KIMI_CODING_LIVE_MODELS;
|
|
799
839
|
export const KIMI_AUTO_TOOL_CHOICE_ONLY_MODELS = ["kimi-for-coding"];
|
|
800
840
|
export const KIMI_API_MODEL_CONTEXT_WINDOWS: Record<string, number> = Object.fromEntries(
|
|
801
|
-
KIMI_API_MODELS.map(id => [id, id
|
|
841
|
+
KIMI_API_MODELS.map(id => [id, KIMI_API_K3_SERIES_MODELS.includes(id) ? KIMI_K3_1M_CONTEXT_WINDOW : 262_144]),
|
|
842
|
+
);
|
|
843
|
+
export const KIMI_API_MODEL_INPUT_MODALITIES: Record<string, string[]> = Object.fromEntries(
|
|
844
|
+
KIMI_API_K3_SERIES_MODELS.map(id => [id, ["text", "image"]]),
|
|
802
845
|
);
|
|
803
|
-
export const KIMI_API_MODEL_INPUT_MODALITIES = { "kimi-k3": ["text", "image"] };
|
|
804
846
|
|
|
805
847
|
// 260715 NVIDIA NIM kimi family (issue #126): documented served ids on integrate
|
|
806
848
|
// chat/completions per docs.api.nvidia.com/nim/reference/llm-apis; live /v1/models
|
|
@@ -884,7 +926,7 @@ export const NVIDIA_NIM_NO_VISION_MODELS = [
|
|
|
884
926
|
"poolside/laguna-xs-2.1", "z-ai/glm-5.3", "z-ai/glm-5.2",
|
|
885
927
|
];
|
|
886
928
|
export const KIMI_CODING_MODEL_CONTEXT_WINDOWS: Record<string, number> = Object.fromEntries(
|
|
887
|
-
KIMI_CODING_LIVE_MODELS.map(id => [id, (id === "k3[1m]" || KIMI_CODING_K28_MODELS.includes(id)) ? KIMI_K3_1M_CONTEXT_WINDOW : KIMI_K3_STANDARD_CONTEXT_WINDOW]),
|
|
929
|
+
KIMI_CODING_LIVE_MODELS.map(id => [id, (id === "k3[1m]" || KIMI_CODING_K31_MODELS.includes(id) || KIMI_CODING_K28_MODELS.includes(id)) ? KIMI_K3_1M_CONTEXT_WINDOW : KIMI_K3_STANDARD_CONTEXT_WINDOW]),
|
|
888
930
|
);
|
|
889
931
|
export const KIMI_CODING_MODEL_INPUT_MODALITIES = Object.fromEntries(
|
|
890
932
|
KIMI_CODING_ADJUSTABLE_THINKING_MODELS.map(id => [id, ["text", "image"]]),
|
|
@@ -948,6 +990,8 @@ export const DIGITALOCEAN_CHAT_COMPLETION_MODELS = [
|
|
|
948
990
|
"arcee-trinity-large-thinking",
|
|
949
991
|
"openai-gpt-5.6-sol",
|
|
950
992
|
"openai-gpt-5.6-terra",
|
|
993
|
+
// 261027 preemptive: GPT-6.1 Terra (mirrors the GPT-6 Sol seed; provider listing unverified).
|
|
994
|
+
"openai-gpt-6.1-terra",
|
|
951
995
|
"openai-gpt-5.6-luna",
|
|
952
996
|
// 260923 preemptive: GPT-6 Sol/Luna ahead of DigitalOcean's model list.
|
|
953
997
|
"openai-gpt-6-sol",
|
|
@@ -1165,6 +1209,27 @@ export const OPPER_MODEL_INPUT_MODALITIES: Record<string, string[]> = Object.fro
|
|
|
1165
1209
|
OPPER_MODELS.map(id => [id, OPPER_TEXT_ONLY_MODELS.includes(id) ? ["text"] : ["text", "image"]]),
|
|
1166
1210
|
);
|
|
1167
1211
|
|
|
1212
|
+
// AI Stupid Level routing modes, as listed by the authenticated GET /v1/models on 2026-10-26
|
|
1213
|
+
// (https://aistupidlevel.info/router/docs#strategies). Each mode picks a model per request, so it
|
|
1214
|
+
// declares conservative limits that hold for any pick: a 262,144-token window (the pool's smallest,
|
|
1215
|
+
// Kimi K2.7 Code's, when first checked on 2026-10-23) and 64,000 output tokens.
|
|
1216
|
+
// The router is text only (image, audio and file parts are a 400 `unsupported_content`), so images
|
|
1217
|
+
// for a mode go through the vision sidecar. Pinned model ids arrive through live discovery.
|
|
1218
|
+
export const AISTUPIDLEVEL_ROUTING_MODES = [
|
|
1219
|
+
"auto-coding", "auto-tooling", "auto-reasoning", "auto-best", "auto", "auto-task",
|
|
1220
|
+
"auto-value", "auto-value-coding", "auto-value-tooling", "auto-value-reasoning",
|
|
1221
|
+
"auto-fastest-quality", "auto-consistent", "auto-cheapest", "auto-fastest", "auto-split",
|
|
1222
|
+
];
|
|
1223
|
+
export const AISTUPIDLEVEL_MODEL_CONTEXT_WINDOWS: Record<string, number> = Object.fromEntries(
|
|
1224
|
+
AISTUPIDLEVEL_ROUTING_MODES.map(id => [id, 262_144]),
|
|
1225
|
+
);
|
|
1226
|
+
export const AISTUPIDLEVEL_MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = Object.fromEntries(
|
|
1227
|
+
AISTUPIDLEVEL_ROUTING_MODES.map(id => [id, 64_000]),
|
|
1228
|
+
);
|
|
1229
|
+
export const AISTUPIDLEVEL_MODEL_INPUT_MODALITIES: Record<string, string[]> = Object.fromEntries(
|
|
1230
|
+
AISTUPIDLEVEL_ROUTING_MODES.map(id => [id, ["text"]]),
|
|
1231
|
+
);
|
|
1232
|
+
|
|
1168
1233
|
export const STEPFUN_MODELS = [
|
|
1169
1234
|
"step-5-preview",
|
|
1170
1235
|
"step-3.5-flash",
|
|
@@ -318,6 +318,15 @@ export interface ProviderRegistryEntry {
|
|
|
318
318
|
*/
|
|
319
319
|
modelDisplayNames?: Record<string, string>;
|
|
320
320
|
modelInputModalities?: Record<string, string[]>;
|
|
321
|
+
/**
|
|
322
|
+
* Provider-wide input modalities for every model `modelInputModalities` does not enumerate,
|
|
323
|
+
* including ids that arrive from live discovery. Declare it where the limit belongs to the
|
|
324
|
+
* provider's API rather than to one model; a per-model entry still wins over it. Registry-only
|
|
325
|
+
* and runtime-only: never seeded or enriched into saved config, and applied only while a provider
|
|
326
|
+
* points at this entry's destination (routed provider, vision eligibility).
|
|
327
|
+
*/
|
|
328
|
+
inputModalities?: string[];
|
|
329
|
+
modelCapabilities?: OcxProviderConfig["modelCapabilities"];
|
|
321
330
|
defaultMaxOutputTokens?: number;
|
|
322
331
|
modelMaxOutputTokens?: Record<string, number>;
|
|
323
332
|
reasoningEfforts?: string[];
|
|
@@ -396,7 +405,7 @@ export type ProviderConfigSeed = Pick<
|
|
|
396
405
|
"anthropicOAuthInstance" |
|
|
397
406
|
"adapter" | "baseUrl" | "apiKeyTransport" | "responsesPath" | "chatCompletionsPath" | "authMode" | "keyOptional" | "freeTier" | "modelSuffixBracketStrip" | "defaultModel" | "models"
|
|
398
407
|
| "liveModels" | "contextWindow" | "modelContextWindows" | "modelInputModalities"
|
|
399
|
-
| "modelDisplayNames"
|
|
408
|
+
| "modelDisplayNames" | "modelCapabilities"
|
|
400
409
|
| "modelMaxInputTokens" | "defaultMaxOutputTokens" | "modelMaxOutputTokens"
|
|
401
410
|
| "reasoningEfforts" | "modelReasoningEfforts" | "modelDefaultReasoningEfforts" | "reasoningEffortMap" | "modelReasoningEffortMap" | "reasoningWireFormat"
|
|
402
411
|
| "noVisionModels" | "noReasoningModels" | "noTemperatureModels" | "noTopPModels" | "noStopModels" | "noPenaltyModels"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ModelCapabilities, OcxProviderConfig } from "../types";
|
|
2
|
-
import {
|
|
1
|
+
import type { ModelCapabilities, OcxProviderConfig, ReasoningCapabilities } from "../types";
|
|
2
|
+
import { declaredModelCapabilities, mergeReasoningModelCapabilities, reasoningCapabilitiesFromConfig, REASONING_CAPABILITY_FIELDS } from "./reasoning-capabilities";
|
|
3
|
+
import { MODEL_ADAPTER_OVERRIDE_ALLOWED, modelInList, pinnedWireAdapter } from "../types";
|
|
3
4
|
import { isCanonicalOpenAiForwardProvider } from "./openai-tiers";
|
|
4
5
|
import { resolveProviderAuthTransport } from "./fastwire";
|
|
5
6
|
import { fastSwitchOff } from "./fast-opt-in";
|
|
@@ -48,7 +49,7 @@ export type ResolvedProviderStaticPolicy = Readonly<Partial<StaticProviderPolicy
|
|
|
48
49
|
adapter: string;
|
|
49
50
|
baseUrl: string;
|
|
50
51
|
}>;
|
|
51
|
-
export interface ResolvedPerModelStaticPolicy {
|
|
52
|
+
export interface ResolvedPerModelStaticPolicy extends Readonly<ReasoningCapabilities> {
|
|
52
53
|
readonly adapter: string;
|
|
53
54
|
readonly contextWindow?: number;
|
|
54
55
|
readonly inputModalities?: readonly string[];
|
|
@@ -215,9 +216,11 @@ export function resolveModelPolicy(input: ResolveModelPolicyInput): ResolvedMode
|
|
|
215
216
|
putMergedMap("modelSupportsReasoningSummaries", entry?.modelSupportsReasoningSummaries, provider.modelSupportsReasoningSummaries);
|
|
216
217
|
putMergedMap("modelSupportsVerbosity", entry?.modelSupportsVerbosity, provider.modelSupportsVerbosity);
|
|
217
218
|
for (const key of [
|
|
218
|
-
"
|
|
219
|
+
"modelAutoCompactTokenLimits", "modelSuppressSyntheticMax",
|
|
219
220
|
"modelReasoningSummaryDelivery", "codexToolMode", "modelAdapters",
|
|
220
221
|
] as const) putScalar(key, undefined);
|
|
222
|
+
put("modelCapabilities", mergeReasoningModelCapabilities(entry?.modelCapabilities, provider.modelCapabilities),
|
|
223
|
+
provider.modelCapabilities !== undefined ? "operator-capability" : entry?.modelCapabilities !== undefined ? "registry" : "unknown");
|
|
221
224
|
for (const key of ["modelContextWindows", "modelMaxInputTokens"] as const) {
|
|
222
225
|
const [value, source] = input.providerName === "openai-apikey"
|
|
223
226
|
? positiveCapMap(entry?.[key], provider[key])
|
|
@@ -325,7 +328,16 @@ export function resolveModelPolicy(input: ResolveModelPolicyInput): ResolvedMode
|
|
|
325
328
|
: exactMaxInputTokens;
|
|
326
329
|
const exactMaxOutputTokens = modelValue(providerPolicy.modelMaxOutputTokens);
|
|
327
330
|
const modelMaxOutputTokens = exactMaxOutputTokens ?? providerPolicy.defaultMaxOutputTokens;
|
|
328
|
-
const
|
|
331
|
+
const reasoningCapabilities = reasoningCapabilitiesFromConfig({
|
|
332
|
+
...providerPolicy,
|
|
333
|
+
adapter: providerPolicy.adapter ?? provider.adapter,
|
|
334
|
+
baseUrl: providerPolicy.baseUrl ?? provider.baseUrl,
|
|
335
|
+
...(input.modelCapabilities ? { modelCapabilities: mergeReasoningModelCapabilities(
|
|
336
|
+
providerPolicy.modelCapabilities, { [input.modelId]: input.modelCapabilities },
|
|
337
|
+
) } : {}),
|
|
338
|
+
}, input.modelId);
|
|
339
|
+
const modelReasoningEfforts = reasoningCapabilities.supportsReasoningEffort === false ? []
|
|
340
|
+
: modelValue(providerPolicy.modelReasoningEfforts) ?? providerPolicy.reasoningEfforts;
|
|
329
341
|
const modelSupportsReasoningSummaries = modelValue(providerPolicy.modelSupportsReasoningSummaries)
|
|
330
342
|
?? (modelValue(providerPolicy.modelReasoningSummaryDelivery) !== undefined ? true : undefined);
|
|
331
343
|
const modelSupportsVerbosity = modelValue(providerPolicy.modelSupportsVerbosity) ?? providerPolicy.supportsVerbosity;
|
|
@@ -334,6 +346,7 @@ export function resolveModelPolicy(input: ResolveModelPolicyInput): ResolvedMode
|
|
|
334
346
|
: modelValue(providerPolicy.modelSupportsServiceTier) ?? providerPolicy.supportsServiceTier;
|
|
335
347
|
const model: ResolvedPerModelStaticPolicy = {
|
|
336
348
|
adapter,
|
|
349
|
+
...reasoningCapabilities,
|
|
337
350
|
...(modelContextWindow !== undefined ? { contextWindow: modelContextWindow } : {}),
|
|
338
351
|
...(capabilityModalities ?? modelValue(providerPolicy.modelInputModalities) !== undefined
|
|
339
352
|
? { inputModalities: capabilityModalities ?? modelValue(providerPolicy.modelInputModalities) }
|
|
@@ -341,7 +354,7 @@ export function resolveModelPolicy(input: ResolveModelPolicyInput): ResolvedMode
|
|
|
341
354
|
...(modelMaxInputTokens !== undefined ? { maxInputTokens: modelMaxInputTokens } : {}),
|
|
342
355
|
...(modelMaxOutputTokens !== undefined ? { maxOutputTokens: modelMaxOutputTokens } : {}),
|
|
343
356
|
...(modelReasoningEfforts !== undefined ? { reasoningEfforts: modelReasoningEfforts } : {}),
|
|
344
|
-
...(modelValue(providerPolicy.modelDefaultReasoningEfforts) !== undefined ? { defaultReasoningEffort: modelValue(providerPolicy.modelDefaultReasoningEfforts) } : {}),
|
|
357
|
+
...(reasoningCapabilities.supportsReasoningEffort !== false && modelValue(providerPolicy.modelDefaultReasoningEfforts) !== undefined ? { defaultReasoningEffort: modelValue(providerPolicy.modelDefaultReasoningEfforts) } : {}),
|
|
345
358
|
...(modelSupportsReasoningSummaries !== undefined ? { supportsReasoningSummaries: modelSupportsReasoningSummaries } : {}),
|
|
346
359
|
...(modelSupportsVerbosity !== undefined ? { supportsVerbosity: modelSupportsVerbosity } : {}),
|
|
347
360
|
...(modelSupportsServiceTier !== undefined ? { supportsServiceTier: modelSupportsServiceTier } : {}),
|
|
@@ -359,6 +372,13 @@ export function resolveModelPolicy(input: ResolveModelPolicyInput): ResolvedMode
|
|
|
359
372
|
const modelProvenance: Partial<Record<keyof ResolvedPerModelStaticPolicy, StaticPolicySource>> = {
|
|
360
373
|
adapter: adapterSource,
|
|
361
374
|
};
|
|
375
|
+
for (const field of REASONING_CAPABILITY_FIELDS) {
|
|
376
|
+
modelProvenance[field] = reasoningCapabilities[field] === undefined ? "unknown"
|
|
377
|
+
: modelInList(provider.noReasoningModels, input.modelId) ? "operator"
|
|
378
|
+
: modelInList(entry?.noReasoningModels, input.modelId) ? "registry"
|
|
379
|
+
: input.modelCapabilities?.[field] !== undefined || declaredModelCapabilities(provider.modelCapabilities, input.modelId)?.[field] !== undefined
|
|
380
|
+
? "operator-capability" : declaredModelCapabilities(entry?.modelCapabilities, input.modelId)?.[field] !== undefined ? "registry" : "operator";
|
|
381
|
+
}
|
|
362
382
|
modelProvenance.contextWindow = modelOrProviderSource(provider.modelContextWindows, entry?.modelContextWindows, provider.contextWindow, entry?.contextWindow);
|
|
363
383
|
if (modelProvenance.contextWindow === "unknown" && familyContextWindow !== undefined) {
|
|
364
384
|
modelProvenance.contextWindow = anthropicFamilyContextWindow(provider.modelContextWindows, input.modelId) !== undefined
|
|
@@ -13,7 +13,7 @@ import { captureProviderApiKeySelection } from "./api-key-selection-capture";
|
|
|
13
13
|
import { assertProviderDestinationAllowed } from "../lib/destination-policy";
|
|
14
14
|
import { redactSecretString, redactUrlForLog } from "../lib/redact";
|
|
15
15
|
import { PROVIDER_REGISTRY, registryEntryForProviderDestination } from "./registry";
|
|
16
|
-
import { applyDirectReasoningEffortContracts, hasLegacyClinePassReasoningEfforts } from "./derive";
|
|
16
|
+
import { applyDirectReasoningEffortContracts, hasLegacyClinePassReasoningEfforts, registryInputModalitiesForDestination } from "./derive";
|
|
17
17
|
import { cloneFastWire } from "./fastwire";
|
|
18
18
|
import { fastSwitchOff } from "./fast-opt-in";
|
|
19
19
|
import {
|
|
@@ -122,8 +122,11 @@ export function routedProviderConfig(providerName: string, provider: OcxProvider
|
|
|
122
122
|
// the reasoning item the upstream answers 400 to. Destination matching refuses templated and
|
|
123
123
|
// overridable base URLs, so this cannot follow a retargeted row, and an explicit value wins.
|
|
124
124
|
const destination = registryEntryForProviderDestination(provider);
|
|
125
|
+
const inputModalities = provider.inputModalities === undefined
|
|
126
|
+
? registryInputModalitiesForDestination(providerName, provider) : undefined;
|
|
125
127
|
return {
|
|
126
128
|
...provider,
|
|
129
|
+
...(inputModalities ? { inputModalities } : {}),
|
|
127
130
|
apiKey: usableResolvedApiKey(provider.apiKey),
|
|
128
131
|
...(destination?.modelDefaultReasoningEfforts ? {
|
|
129
132
|
modelDefaultReasoningEfforts: mapFill(destination.modelDefaultReasoningEfforts, provider.modelDefaultReasoningEfforts)[0],
|
|
@@ -298,6 +301,11 @@ export function routedProviderConfig(providerName: string, provider: OcxProvider
|
|
|
298
301
|
...(provider.project === undefined && registryEntry.project !== undefined ? { project: registryEntry.project } : {}),
|
|
299
302
|
...(provider.location === undefined && registryEntry.location !== undefined ? { location: registryEntry.location } : {}),
|
|
300
303
|
...(provider.contextWindow === undefined && registryEntry.contextWindow !== undefined ? { contextWindow: registryEntry.contextWindow } : {}),
|
|
304
|
+
// The request path never calls enrichProviderFromRegistry(), so a row saved before the
|
|
305
|
+
// registry declared a provider-wide modality must inherit it here to reach the vision gate.
|
|
306
|
+
...(provider.inputModalities === undefined && registryEntry.inputModalities !== undefined
|
|
307
|
+
? { inputModalities: [...registryEntry.inputModalities] }
|
|
308
|
+
: {}),
|
|
301
309
|
...((provider.reasoningEfforts === undefined || hasLegacyClinePassReasoningEfforts(providerName, provider))
|
|
302
310
|
&& registryEntry.reasoningEfforts !== undefined
|
|
303
311
|
? { reasoningEfforts: [...registryEntry.reasoningEfforts] }
|