@bitkyc08/opencodex 2.100.6 → 2.100.7-preview.20261120.1
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/gui/dist/assets/App-Te21Q-Fv.js +65 -0
- package/gui/dist/assets/App-hklyKJR5.css +1 -0
- package/gui/dist/assets/{Tray-CVqm4S4W.js → Tray-Bto-DJ6b.js} +1 -1
- package/gui/dist/assets/brand-mark-CCRs3Ywg.js +1 -0
- package/gui/dist/assets/index-B85uU8rK.css +2 -0
- package/gui/dist/assets/index-Befqr0m8.js +138 -0
- package/gui/dist/assets/{segment-thumb-features-COdzmORE.js → segment-thumb-features-CKFf9DaQ.js} +1 -1
- package/gui/dist/classic/assets/App-BPkhxI3i.js +64 -0
- package/gui/dist/classic/assets/App-DSivR528.css +1 -0
- package/gui/dist/classic/assets/{Tray-BDlcOLDK.js → Tray-CSRN8p3a.js} +1 -1
- package/gui/dist/classic/assets/index-BHM1aTF8.js +138 -0
- package/gui/dist/classic/assets/usage-companion-chart-DC8ve7g8.js +1 -0
- package/gui/dist/classic/index.html +1 -1
- package/gui/dist/index.html +2 -2
- package/package.json +2 -2
- package/src/adapters/coding-agent/process-tree.ts +30 -0
- package/src/adapters/coding-agent/profile.ts +1 -1
- package/src/adapters/coding-agent/turn.ts +2 -9
- package/src/adapters/command-code-decision-guard.ts +25 -0
- package/src/adapters/cursor/catalog.ts +14 -0
- package/src/adapters/cursor/effort-map.ts +3 -0
- package/src/adapters/google-usage.ts +28 -0
- package/src/adapters/google.ts +9 -26
- package/src/adapters/qoder/adapter.ts +197 -13
- package/src/adapters/registry.ts +13 -0
- package/src/adapters/step-cli/adapter.ts +401 -0
- package/src/adapters/step-cli/constants.ts +11 -0
- package/src/adapters/step-cli/conversation.ts +159 -0
- package/src/adapters/step-cli/env.ts +49 -0
- package/src/adapters/step-cli/errors.ts +76 -0
- package/src/adapters/step-cli/events.ts +227 -0
- package/src/adapters/step-cli/profiles.ts +134 -0
- package/src/adapters/step-cli/projection.ts +242 -0
- package/src/adapters/step-cli/registry.ts +181 -0
- package/src/adapters/step-cli/session-pool.ts +225 -0
- package/src/adapters/step-cli/session.ts +842 -0
- package/src/adapters/step-cli/stdio-frames.ts +330 -0
- package/src/adapters/step-cli/tool-bridge.ts +92 -0
- package/src/cli/claude.ts +5 -2
- package/src/client/link-management-relay.ts +11 -0
- package/src/client/machine-listener.ts +6 -2
- package/src/codex/account-label.ts +1 -1
- package/src/codex/catalog/gather-capture.ts +2 -1
- package/src/codex/catalog/metadata.ts +48 -2
- package/src/codex/catalog/model-hints.ts +19 -5
- package/src/codex/catalog/model-visibility.ts +4 -7
- package/src/codex/catalog/native-ultrafast.ts +8 -6
- package/src/generated/compatibility-version.json +137 -61
- package/src/generated/model-metadata.ts +1 -1
- package/src/lib/client-error-body.ts +2 -0
- package/src/lib/messages-error-body.ts +3 -1
- package/src/lib/optional-shutdown-hooks.ts +55 -5
- package/src/lib/process-control.ts +3 -2
- package/src/lib/shutdown-budget.ts +5 -0
- package/src/link/remote-platform.ts +24 -9
- package/src/link/ssh-argv.ts +8 -2
- package/src/link/ssh-runner.ts +15 -2
- package/src/oauth/m365-copilot-web-session.ts +28 -4
- package/src/protocols/dto.ts +24 -12
- package/src/protocols/settings.ts +20 -16
- package/src/protocols/shadow.ts +2 -3
- package/src/protocols/trace.ts +24 -2
- package/src/providers/command-code-decision-models.ts +65 -0
- package/src/providers/quota.ts +4 -4
- package/src/providers/registry/entries-core.ts +18 -7
- package/src/providers/registry/entries-extended.ts +41 -0
- package/src/providers/registry/model-seeds.ts +42 -0
- package/src/providers/resolved-model-policy-merge.ts +8 -0
- package/src/providers/resolved-model-policy.ts +185 -165
- package/src/providers/slug-codec.ts +5 -0
- package/src/server/chat-native-eligibility.ts +5 -0
- package/src/server/credential-recovery-attempt.ts +2 -2
- package/src/server/gemini-inbound.ts +15 -11
- package/src/server/gemini-native-catalog.ts +27 -2
- package/src/server/gemini-native-wire.ts +71 -6
- package/src/server/gemini-native.ts +129 -34
- package/src/server/index/gemini-routes.ts +6 -1
- package/src/server/lifecycle.ts +2 -1
- package/src/server/management/agent-settings-routes.ts +26 -28
- package/src/server/management/api-access.ts +5 -3
- package/src/server/management/protocol-routes.ts +3 -1
- package/src/server/management/protocol-settings-patch.ts +25 -10
- package/src/server/management/shared.ts +20 -5
- package/src/server/messages-native-eligibility.ts +4 -0
- package/src/server/messages-native-tool-guard.ts +18 -5
- package/src/server/request-log-generation-window.ts +7 -2
- package/src/server/responses/command-code-decision-refusal.ts +24 -0
- package/src/server/responses/compact.ts +2 -2
- package/src/server/responses/core-combo.ts +18 -3
- package/src/server/responses/core-pipeline.ts +6 -0
- package/src/server/responses/sidecar-execution.ts +10 -7
- package/src/types/config.ts +2 -0
- package/src/usage/expected-prices.ts +17 -0
- package/src/usage/telemetry-contract.ts +3 -0
- package/gui/dist/assets/App-BI8LQ7Qk.css +0 -1
- package/gui/dist/assets/App-CsZ1Gr7S.js +0 -60
- package/gui/dist/assets/brand-mark-BebhnAtV.js +0 -1
- package/gui/dist/assets/index-BtwVlpeQ.css +0 -2
- package/gui/dist/assets/index-CEeMegqE.js +0 -138
- package/gui/dist/classic/assets/App-BJgUWNJ8.js +0 -59
- package/gui/dist/classic/assets/App-CoiVLRW3.css +0 -1
- package/gui/dist/classic/assets/index-B9Jgli_W.js +0 -138
- package/gui/dist/classic/assets/usage-companion-chart-vbzDcND0.js +0 -1
package/src/providers/quota.ts
CHANGED
|
@@ -123,12 +123,12 @@ async function maybeFetchProviderQuota(
|
|
|
123
123
|
try {
|
|
124
124
|
if (provider.adapter === "claude-cli") return await fetchClaudeCliObservedQuota(name, forceRefresh);
|
|
125
125
|
if (isBuiltInChatGptForwardProvider(name, provider)) {
|
|
126
|
-
return fetchChatGptForwardQuota(config, name, provider, forceRefresh, prefetchedCodexSnapshot);
|
|
126
|
+
return await fetchChatGptForwardQuota(config, name, provider, forceRefresh, prefetchedCodexSnapshot);
|
|
127
127
|
}
|
|
128
128
|
if (provider.authMode === "oauth" && explicitAccountReader(name)) return await fetchExplicitCurrentQuota(name, provider, config);
|
|
129
|
-
if (provider.authMode === "oauth" && configuredAnthropicInstance(config, name)) return fetchAnthropicQuota(name, config);
|
|
129
|
+
if (provider.authMode === "oauth" && configuredAnthropicInstance(config, name)) return await fetchAnthropicQuota(name, config);
|
|
130
130
|
if (provider.authMode === "oauth" && name === ANTIGRAVITY_OAUTH_STORE_KEY) return await fetchAntigravityQuota(name, { ...provider });
|
|
131
|
-
if (provider.authMode === "oauth" && name === "kiro") return fetchKiroQuota(name);
|
|
131
|
+
if (provider.authMode === "oauth" && name === "kiro") return await fetchKiroQuota(name);
|
|
132
132
|
// meta-muse: a device-logged-in account can be probed at the key endpoint; an
|
|
133
133
|
// imported or pasted one cannot, and falls back to its last in-band observation.
|
|
134
134
|
// The probe is tried first and its failure is never fatal to the row.
|
|
@@ -138,7 +138,7 @@ async function maybeFetchProviderQuota(
|
|
|
138
138
|
const reader = keyQuotaReaderForProvider(name, provider);
|
|
139
139
|
// Keep destination/auth fields bound to the same request as the reader's captured
|
|
140
140
|
// bearer, even if the live provider object changes while the quota probe awaits.
|
|
141
|
-
return reader ? reader(name, { ...provider }) : null;
|
|
141
|
+
return reader ? await reader(name, { ...provider }) : null;
|
|
142
142
|
} catch {
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from "../../adapters/cursor/discovery";
|
|
23
23
|
import { cursorFastCapableBases } from "../../adapters/cursor/catalog";
|
|
24
24
|
import { COMMAND_CODE_MODEL_REASONING_EFFORTS } from "../command-code-efforts";
|
|
25
|
+
import { COMMAND_CODE_DECISION_MODEL_DISCOVERY_FILTER } from "../command-code-decision-models";
|
|
25
26
|
import { isCanonicalOpenRouterTarget } from "../openrouter-routing";
|
|
26
27
|
import type { ProviderRegistryEntry } from "./types";
|
|
27
28
|
import { M365_COPILOT_BASE_URL } from "../m365-copilot-models";
|
|
@@ -130,9 +131,11 @@ const ANTHROPIC_FAST_MODELS: Readonly<Record<string, boolean>> = Object.freeze({
|
|
|
130
131
|
* list it, and this unit has no evidence to change them. Gemini 4 Argon (GA 2026-10-13):
|
|
131
132
|
* low/medium(default)/high; `minimal` and thinking_budget return HTTP 400 per
|
|
132
133
|
* ai.google.dev/gemini-api/docs/models/gemini-4-argon. Gemini 4 Hydrogen: low/medium/high/xhigh,
|
|
133
|
-
* default high, verified live on Vertex AI by the author of #8583 (2026-11-13).
|
|
134
|
+
* default high, verified live on Vertex AI by the author of #8583 (2026-11-13). Gemini 4 Neon
|
|
135
|
+
* (GA 2026-11-18): low/medium/high(default)/xhigh per Google Cloud Gemini thinking docs.
|
|
134
136
|
*/
|
|
135
137
|
const GEMINI_MODEL_REASONING_EFFORTS: Readonly<Record<string, string[]>> = {
|
|
138
|
+
"gemini-4-neon": ["low", "medium", "high", "xhigh"],
|
|
136
139
|
"gemini-4-hydrogen": ["low", "medium", "high", "xhigh"],
|
|
137
140
|
"gemini-4-carbon": ["low", "medium", "high"],
|
|
138
141
|
"gemini-4-argon": ["low", "medium", "high"],
|
|
@@ -142,7 +145,10 @@ const GEMINI_MODEL_REASONING_EFFORTS: Readonly<Record<string, string[]>> = {
|
|
|
142
145
|
"gemini-3.5-flash": ["minimal", "low", "medium", "high"],
|
|
143
146
|
"gemini-3.1-pro-preview": ["low", "medium", "high"],
|
|
144
147
|
};
|
|
145
|
-
const GEMINI_MODEL_DEFAULT_REASONING_EFFORTS: Readonly<Record<string, string>> = {
|
|
148
|
+
const GEMINI_MODEL_DEFAULT_REASONING_EFFORTS: Readonly<Record<string, string>> = {
|
|
149
|
+
"gemini-4-neon": "high",
|
|
150
|
+
"gemini-4-hydrogen": "high",
|
|
151
|
+
};
|
|
146
152
|
|
|
147
153
|
const ANTHROPIC_FAST_TIER_DESCRIPTION =
|
|
148
154
|
"Claude fast mode: faster output at 2x price; needs usage credits (subscription) or fast-mode access (API)";
|
|
@@ -227,7 +233,9 @@ export const PROVIDER_REGISTRY_CORE: readonly ProviderRegistryEntry[] = [
|
|
|
227
233
|
// default on `high`, the picker would send `high` explicitly, and the request builder's
|
|
228
234
|
// no-effort fallback to `kimi-k3-max` would never be reached. Mirrors the other K3
|
|
229
235
|
// routes (kimi, kimi-code, opencode-go).
|
|
230
|
-
|
|
236
|
+
// Gemini 4 Hydrogen defaults to `high` (Cursor's docs, and the google/google-vertex rows);
|
|
237
|
+
// without this the medium fallback would win. Carbon's documented default is medium.
|
|
238
|
+
modelDefaultReasoningEfforts: { "kimi-k3": "max", "gemini-4-hydrogen": "high" },
|
|
231
239
|
// Blind Cursor models (Auto routers, Composer, GLM-5.2, GLM-5.3) go through the vision sidecar;
|
|
232
240
|
// multimodal hosts (Claude/Gemini/GPT/Kimi/Grok) take native SelectedImage. The catalog
|
|
233
241
|
// still advertises image for noVision members so Codex can attach (sidecar option B).
|
|
@@ -535,6 +543,9 @@ export const PROVIDER_REGISTRY_CORE: readonly ProviderRegistryEntry[] = [
|
|
|
535
543
|
url: "https://api.commandcode.ai/provider/v1/models",
|
|
536
544
|
maxResponseBytes: 262_144,
|
|
537
545
|
maxModels: 256,
|
|
546
|
+
// System One decision models (typesafe/jev*) are listed here but served only at
|
|
547
|
+
// /provider/v1/systemone (#8997).
|
|
548
|
+
filter: COMMAND_CODE_DECISION_MODEL_DISCOVERY_FILTER,
|
|
538
549
|
},
|
|
539
550
|
// These are capability facts from official Command Code model profiles, not seeded models.
|
|
540
551
|
// Unknown/new live models deliberately do not advertise a reasoning picker.
|
|
@@ -1251,8 +1262,8 @@ export const PROVIDER_REGISTRY_CORE: readonly ProviderRegistryEntry[] = [
|
|
|
1251
1262
|
{
|
|
1252
1263
|
id: "google", label: "Google Gemini", adapter: "google", baseUrl: "https://generativelanguage.googleapis.com", authKind: "key", featured: true,
|
|
1253
1264
|
dashboardUrl: "https://aistudio.google.com/apikey", defaultModel: "gemini-3.5-flash", models: ["gemini-4-argon", "gemini-3.8-flash", "gemini-3.6-flash", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.7-flash"],
|
|
1254
|
-
modelContextWindows: { "gemini-4-hydrogen": 1_048_576, "gemini-4-carbon": 1_048_576, "gemini-4-argon": 1_048_576, "gemini-3.8-flash": 1_048_576, "gemini-3.6-flash": 1_048_576, "gemini-3.5-flash": 1_000_000, "gemini-3.5-flash-lite": 1_048_576, "gemini-3.7-flash": 1_048_576 },
|
|
1255
|
-
modelInputModalities: { "gemini-4-hydrogen": ["text", "image"], "gemini-4-carbon": ["text", "image"], "gemini-4-argon": ["text", "image"], "gemini-3.8-flash": ["text", "image"], "gemini-3.6-flash": ["text", "image"], "gemini-3.5-flash-lite": ["text", "image"], "gemini-3.7-flash": ["text", "image"] },
|
|
1265
|
+
modelContextWindows: { "gemini-4-neon": 1_048_576, "gemini-4-hydrogen": 1_048_576, "gemini-4-carbon": 1_048_576, "gemini-4-argon": 1_048_576, "gemini-3.8-flash": 1_048_576, "gemini-3.6-flash": 1_048_576, "gemini-3.5-flash": 1_000_000, "gemini-3.5-flash-lite": 1_048_576, "gemini-3.7-flash": 1_048_576 },
|
|
1266
|
+
modelInputModalities: { "gemini-4-neon": ["text", "image"], "gemini-4-hydrogen": ["text", "image"], "gemini-4-carbon": ["text", "image"], "gemini-4-argon": ["text", "image"], "gemini-3.8-flash": ["text", "image"], "gemini-3.6-flash": ["text", "image"], "gemini-3.5-flash-lite": ["text", "image"], "gemini-3.7-flash": ["text", "image"] },
|
|
1256
1267
|
modelReasoningEfforts: { ...GEMINI_MODEL_REASONING_EFFORTS },
|
|
1257
1268
|
modelDefaultReasoningEfforts: { ...GEMINI_MODEL_DEFAULT_REASONING_EFFORTS },
|
|
1258
1269
|
jawcodeBundle: "google", extraMetadataAliases: ["gemini"],
|
|
@@ -1262,8 +1273,8 @@ export const PROVIDER_REGISTRY_CORE: readonly ProviderRegistryEntry[] = [
|
|
|
1262
1273
|
{
|
|
1263
1274
|
id: "google-vertex", label: "Google Vertex AI", adapter: "google", baseUrl: "https://aiplatform.googleapis.com", authKind: "key", dashboardUrl: "https://console.cloud.google.com/vertex-ai", defaultModel: "gemini-3-pro", googleMode: "vertex", jawcodeBundle: "google", extraMetadataAliases: ["gemini-vertex"],
|
|
1264
1275
|
modelDiscovery: { path: "/v1beta1/publishers/google/models", query: { pageSize: "300" } },
|
|
1265
|
-
modelContextWindows: { "gemini-4-hydrogen": 1_048_576, "gemini-4-carbon": 1_048_576, "gemini-4-argon": 1_048_576, "gemini-3.8-flash": 1_048_576, "gemini-3.6-flash": 1_048_576, "gemini-3.5-flash": 1_048_576, "gemini-3.5-flash-lite": 1_048_576 },
|
|
1266
|
-
modelInputModalities: { "gemini-4-hydrogen": ["text", "image"], "gemini-4-carbon": ["text", "image"], "gemini-4-argon": ["text", "image"], "gemini-3.8-flash": ["text", "image"], "gemini-3.6-flash": ["text", "image"], "gemini-3.5-flash": ["text", "image"], "gemini-3.5-flash-lite": ["text", "image"] },
|
|
1276
|
+
modelContextWindows: { "gemini-4-neon": 1_048_576, "gemini-4-hydrogen": 1_048_576, "gemini-4-carbon": 1_048_576, "gemini-4-argon": 1_048_576, "gemini-3.8-flash": 1_048_576, "gemini-3.6-flash": 1_048_576, "gemini-3.5-flash": 1_048_576, "gemini-3.5-flash-lite": 1_048_576 },
|
|
1277
|
+
modelInputModalities: { "gemini-4-neon": ["text", "image"], "gemini-4-hydrogen": ["text", "image"], "gemini-4-carbon": ["text", "image"], "gemini-4-argon": ["text", "image"], "gemini-3.8-flash": ["text", "image"], "gemini-3.6-flash": ["text", "image"], "gemini-3.5-flash": ["text", "image"], "gemini-3.5-flash-lite": ["text", "image"] },
|
|
1267
1278
|
modelReasoningEfforts: { ...GEMINI_MODEL_REASONING_EFFORTS },
|
|
1268
1279
|
modelDefaultReasoningEfforts: { ...GEMINI_MODEL_DEFAULT_REASONING_EFFORTS },
|
|
1269
1280
|
},
|
|
@@ -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 { COMMAND_CODE_DECISION_MODEL_DISCOVERY_FILTER } from "../command-code-decision-models";
|
|
12
13
|
import { MIMO_THINKING_CAPABILITIES, MIMO_THINKING_MODELS } from "../mimo-thinking";
|
|
13
14
|
import {
|
|
14
15
|
CODEBUDDY_CN_MODELS,
|
|
@@ -112,6 +113,10 @@ import {
|
|
|
112
113
|
OPPER_MODEL_CONTEXT_WINDOWS,
|
|
113
114
|
OPPER_MODEL_MAX_OUTPUT_TOKENS,
|
|
114
115
|
OPPER_MODEL_INPUT_MODALITIES,
|
|
116
|
+
STEP_CLI_MODELS,
|
|
117
|
+
STEP_CLI_MODEL_CONTEXT_WINDOWS,
|
|
118
|
+
STEP_CLI_NO_VISION_MODELS,
|
|
119
|
+
STEP_CLI_REASONING_EFFORTS,
|
|
115
120
|
AISTUPIDLEVEL_ROUTING_MODES,
|
|
116
121
|
AISTUPIDLEVEL_MODEL_CONTEXT_WINDOWS,
|
|
117
122
|
AISTUPIDLEVEL_MODEL_MAX_OUTPUT_TOKENS,
|
|
@@ -220,6 +225,8 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
220
225
|
path: "models",
|
|
221
226
|
maxResponseBytes: 256 * 1024,
|
|
222
227
|
maxModels: 256,
|
|
228
|
+
// Decision models are not chat rows (#8997); see command-code-decision-models.ts.
|
|
229
|
+
filter: COMMAND_CODE_DECISION_MODEL_DISCOVERY_FILTER,
|
|
223
230
|
},
|
|
224
231
|
// Verified 2026-08-03: public /provider/v1/models returns 51 rows; /chat/completions returns
|
|
225
232
|
// 401 UNAUTHORIZED without a Bearer key. Primary source: https://commandcode.ai/docs/provider.
|
|
@@ -1742,6 +1749,40 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [
|
|
|
1742
1749
|
reasoningEfforts: STEPFUN_REASONING_EFFORTS,
|
|
1743
1750
|
note: "StepFun (阶跃星辰) official OpenAI-compatible API.",
|
|
1744
1751
|
},
|
|
1752
|
+
{
|
|
1753
|
+
// StepCode (阶跃星辰) CLI as the transport for a Step Plan subscription (§三十一). The CLI owns the
|
|
1754
|
+
// account: this row stores no Step token, reads none and injects none, so the only credential in
|
|
1755
|
+
// play is the operator's own `step login`, which the CLI resolves itself.
|
|
1756
|
+
//
|
|
1757
|
+
// GOVERNANCE: routing a Step Plan subscription through a third-party agent harness is Step
|
|
1758
|
+
// 星辰's call, not OpenCodex's — flagged for maintainer review alongside the CodeBuddy and Claude
|
|
1759
|
+
// Code rows above. The Step Plan terms document `step_plan` endpoints for third-party coding
|
|
1760
|
+
// tools, and `--sdk-stdio` is StepCode's own published, MIT-licensed external-client surface; that
|
|
1761
|
+
// is the strongest authorization evidence available without a written permission, and it is not
|
|
1762
|
+
// the same thing as one.
|
|
1763
|
+
id: "step-cli",
|
|
1764
|
+
label: "StepCode CLI (subscription)",
|
|
1765
|
+
adapter: "step-cli",
|
|
1766
|
+
// The destination the subscription's traffic reaches. OpenCodex never sends this host: the CLI
|
|
1767
|
+
// performs every request, so the value exists so the adapter can fail closed when a row is
|
|
1768
|
+
// repointed somewhere this route cannot speak to.
|
|
1769
|
+
baseUrl: "https://api.stepfun.com/step_plan",
|
|
1770
|
+
// `key` + `keyOptional` for the same reason as `claude-cli`: the traffic leaves the machine, so
|
|
1771
|
+
// `local` would misreport the row, but the route is keyless, which is what `keyOptional` states.
|
|
1772
|
+
authKind: "key",
|
|
1773
|
+
keyOptional: true,
|
|
1774
|
+
dashboardUrl: "https://platform.stepfun.com/docs/zh/step-plan/quick-start",
|
|
1775
|
+
defaultModel: "step-5-preview",
|
|
1776
|
+
models: [...STEP_CLI_MODELS],
|
|
1777
|
+
// Static roster, exactly like the Claude Code and CodeBuddy rows. The CLI serves its catalog over
|
|
1778
|
+
// the SDK stdio protocol rather than at an HTTP path the adapter polls, and a live-discovery
|
|
1779
|
+
// attempt against this row would 404 and then fall back to these ids anyway.
|
|
1780
|
+
liveModels: false,
|
|
1781
|
+
modelContextWindows: { ...STEP_CLI_MODEL_CONTEXT_WINDOWS },
|
|
1782
|
+
noVisionModels: [...STEP_CLI_NO_VISION_MODELS],
|
|
1783
|
+
reasoningEfforts: [...STEP_CLI_REASONING_EFFORTS],
|
|
1784
|
+
note: "Runs Step Plan subscription traffic through StepCode's own harness: the official `step` CLI over its length-prefixed SDK stdio protocol, one long-lived process per conversation. OpenCodex stores no Step token, reads none and injects none — the CLI signs in with `step login` and bills the Step Plan account itself. The sign-in is the one of the user this proxy runs as, so every request served through this row spends that same account. Tool ownership stays with the client: the adapter declares the request's tools as StepCode SDK tools and lets the CLI call back over stdio, so no tool ever executes inside Step and approval never leaves the client. Requires the StepCode CLI (`~/.stepcode/bin/step`) and a signed-in Step Plan session. This route shares the CLI family's 128-tool / 2 MiB catalog ceiling, which a real Codex client can exceed because it flattens every MCP server's tools into the function catalog (measured on Codex 0.162.0: 1749 tools, 2.5 MB); the refusal names both counts so the cause is visible, and the fix is to disable or narrow MCP servers for this provider. LIMITATIONS: StepCode carries conversation history only inside its own process, so one conversation needs one process and a process that dies cannot be reconstructed; a tool that takes longer than two minutes to come back exceeds the CLI's own tool-result window; and the CLI's session system prompt cannot be replaced, so a client instruction is prepended to the turn rather than installed as the system prompt. Routing authorization flagged for maintainer security review.",
|
|
1785
|
+
},
|
|
1745
1786
|
{
|
|
1746
1787
|
// Official Claude Code CLI as the transport for a Claude subscription (§三十一). The CLI owns
|
|
1747
1788
|
// the account: this row stores no token and the adapter reads and injects none, so the request
|
|
@@ -1221,6 +1221,48 @@ export const OPPER_MODEL_INPUT_MODALITIES: Record<string, string[]> = Object.fro
|
|
|
1221
1221
|
OPPER_MODELS.map(id => [id, OPPER_TEXT_ONLY_MODELS.includes(id) ? ["text"] : ["text", "image"]]),
|
|
1222
1222
|
);
|
|
1223
1223
|
|
|
1224
|
+
/**
|
|
1225
|
+
* Step Plan catalog as the StepCode CLI serves it (`GET {step_plan}/v1/models`, 2026-10-17).
|
|
1226
|
+
*
|
|
1227
|
+
* Verified against a signed-in `step_plan` login, including `max_input_tokens` and the per-model
|
|
1228
|
+
* `reasoning_effort_support_list`. The four `stepaudio-*` entries the same endpoint returns are
|
|
1229
|
+
* deliberately absent: they are speech models, they hold no chat tools, and a row that routes a text
|
|
1230
|
+
* turn into them answers `model_invalid`. `liveModels` stays false on the registry row for the same
|
|
1231
|
+
* reason Claude Code's row does — the CLI, not the adapter's own HTTP path, owns discovery.
|
|
1232
|
+
*/
|
|
1233
|
+
export const STEP_CLI_MODELS = [
|
|
1234
|
+
"step-5-preview",
|
|
1235
|
+
"step-3.7-flash",
|
|
1236
|
+
"step-3.5-flash",
|
|
1237
|
+
"step-3.5-flash-2603",
|
|
1238
|
+
"step-router-v1",
|
|
1239
|
+
];
|
|
1240
|
+
|
|
1241
|
+
export const STEP_CLI_MODEL_CONTEXT_WINDOWS: Record<string, number> = {
|
|
1242
|
+
"step-5-preview": 1_024_000,
|
|
1243
|
+
"step-3.7-flash": 262_144,
|
|
1244
|
+
"step-3.5-flash": 262_144,
|
|
1245
|
+
"step-3.5-flash-2603": 262_144,
|
|
1246
|
+
"step-router-v1": 262_144,
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Every published model is text-only for this route.
|
|
1251
|
+
*
|
|
1252
|
+
* `step-5-preview` and `step-3.7-flash` do accept images upstream, but nothing verifies that a
|
|
1253
|
+
* headless StepCode turn hands those bytes to the model, and the adapter refuses image input for the
|
|
1254
|
+
* same reason the Qoder and Claude Code rows do. Advertising a modality the route cannot honour makes
|
|
1255
|
+
* route selection pick this row for a picture it then answers blind; the vision sidecar still
|
|
1256
|
+
* captions images into text before they arrive.
|
|
1257
|
+
*/
|
|
1258
|
+
export const STEP_CLI_NO_VISION_MODELS = [...STEP_CLI_MODELS];
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* The three档 Step advertises. `xhigh` and `max` are not advertised and must not be offered: the
|
|
1262
|
+
* service maps them onto `high` server-side, so publishing them would let the client believe it chose
|
|
1263
|
+
* a depth it did not.
|
|
1264
|
+
*/
|
|
1265
|
+
export const STEP_CLI_REASONING_EFFORTS = ["low", "medium", "high"];
|
|
1224
1266
|
// AI Stupid Level routing modes, as listed by the authenticated GET /v1/models on 2026-10-26
|
|
1225
1267
|
// (https://aistupidlevel.info/router/docs#strategies). Each mode picks a model per request, so it
|
|
1226
1268
|
// declares conservative limits that hold for any pick: a 262,144-token window (the pool's smallest,
|
|
@@ -142,6 +142,14 @@ export function legacyModelSource<T>(
|
|
|
142
142
|
registry: Readonly<Record<string, T>> | undefined,
|
|
143
143
|
modelId: string,
|
|
144
144
|
): StaticPolicySource {
|
|
145
|
+
if (!registry) {
|
|
146
|
+
if (!operator) return "unknown";
|
|
147
|
+
if (Object.hasOwn(operator, modelId)) return "operator";
|
|
148
|
+
const colon = modelId.indexOf(":");
|
|
149
|
+
if (colon > 0 && Object.hasOwn(operator, modelId.slice(0, colon))) return "operator";
|
|
150
|
+
const folded = modelId.toLowerCase();
|
|
151
|
+
return Object.keys(operator).some(key => key.toLowerCase() === folded) ? "operator" : "unknown";
|
|
152
|
+
}
|
|
145
153
|
// Match mapFill's case-folded ownership so provenance follows the value lookup.
|
|
146
154
|
const claimed = new Set(Object.keys(operator ?? {}).map(key => key.toLowerCase()));
|
|
147
155
|
const merged: Record<string, T> = {};
|