@cartanova/qgrid-cli 2.14.0 → 2.15.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/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +12 -13
- package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +10 -6
- package/bundle/dist/utils/providers/common/model-cost.js +10 -1
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +15 -15
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +3 -2
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.test.ts +31 -4
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +14 -14
- package/bundle/src/utils/providers/anthropic/anthropic-quota.test.ts +12 -7
- package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +17 -7
- package/bundle/src/utils/providers/common/effort.test.ts +1 -0
- package/bundle/src/utils/providers/common/model-cost.test.ts +5 -0
- package/bundle/src/utils/providers/common/model-cost.ts +12 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +23 -7
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +19 -23
- package/bundle/src/utils/providers/openai/openai-dispatcher.test.ts +9 -8
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +3 -1
- package/bundle/web-dist/client/assets/{index-Cj7ZXipM.js → index-JkBenvsH.js} +3 -3
- package/bundle/web-dist/client/assets/{logs-DSuoyKRh.js → logs-UozX8VD5.js} +1 -1
- package/bundle/web-dist/client/assets/{monit-BwLPgwHG.js → monit-CQ6cVvzc.js} +1 -1
- package/bundle/web-dist/client/assets/{routes-_R4-gxLV.js → routes-BkeaYiBN.js} +2 -2
- package/bundle/web-dist/client/assets/{settings-ZBCgAZaZ.js → settings-DJdBEFoL.js} +1 -1
- package/bundle/web-dist/client/assets/{show-DFFBtBqe.js → show-CcKkiy8Y.js} +1 -1
- package/bundle/web-dist/client/assets/{tokens-DYSfYz8A.js → tokens-DuLrdLMa.js} +1 -1
- package/bundle/web-dist/client/assets/{use-oauth-login-flow-CN8nxeAR.js → use-oauth-login-flow-CFJY-N99.js} +1 -1
- package/bundle/web-dist/client/assets/{use-update-token-mutation-B-N8fFUm.js → use-update-token-mutation-CrEi7wJa.js} +1 -1
- package/bundle/web-dist/client/index.html +1 -1
- package/bundle/web-dist/server/assets/{routes-CjWxvHAO.js → routes-CCdBJqP_.js} +11 -10
- package/bundle/web-dist/server/entry-server.generated.js +3 -2
- package/package.json +1 -1
- package/skills/qgrid/references/ai-sdk-provider-contract.md +1 -1
- package/skills/qgrid/references/anthropic-claude-code-runtime.md +4 -3
- package/skills/qgrid/references/decision-rationale.md +4 -4
- package/skills/qgrid/references/docs-workflow.md +10 -0
- package/skills/qgrid/references/grok-runtime.md +4 -1
- package/skills/qgrid/references/openai-codex-runtime.md +22 -5
- package/skills/qgrid/references/sonamu-api-web-flow.md +5 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +8 -5
|
@@ -2937,11 +2937,7 @@ var lucideGripVertical = ({ title, titleId, ...props }, ref) => /* @__PURE__ */
|
|
|
2937
2937
|
var ForwardRef = (0, import_react.forwardRef)(lucideGripVertical);
|
|
2938
2938
|
//#endregion
|
|
2939
2939
|
//#region src/components/qgrid/UsageCard.tsx
|
|
2940
|
-
var QUOTA_THRESHOLD_PROVIDERS = /* @__PURE__ */ new Set([
|
|
2941
|
-
"anthropic",
|
|
2942
|
-
"openai",
|
|
2943
|
-
"grok"
|
|
2944
|
-
]);
|
|
2940
|
+
var QUOTA_THRESHOLD_PROVIDERS = /* @__PURE__ */ new Set(["anthropic", "openai"]);
|
|
2945
2941
|
function validateThreshold(raw) {
|
|
2946
2942
|
const trimmed = raw.trim();
|
|
2947
2943
|
if (trimmed === "") return {
|
|
@@ -3149,7 +3145,7 @@ function TokenUsage({ token, theme }) {
|
|
|
3149
3145
|
resetsAt: data.sevenDay.resetsAt,
|
|
3150
3146
|
windowDurationMins: data.sevenDay.windowDurationMins,
|
|
3151
3147
|
theme,
|
|
3152
|
-
threshold: token.provider === "grok" ?
|
|
3148
|
+
threshold: token.provider === "anthropic" || token.provider === "grok" ? 100 : void 0
|
|
3153
3149
|
})
|
|
3154
3150
|
]
|
|
3155
3151
|
});
|
|
@@ -3222,7 +3218,7 @@ function ThresholdControl({ token }) {
|
|
|
3222
3218
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
3223
3219
|
htmlFor: `threshold-${token.id}`,
|
|
3224
3220
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
3225
|
-
children: "사용률 제한"
|
|
3221
|
+
children: token.provider === "anthropic" ? "5시간 사용률 제한" : "주간 사용률 제한"
|
|
3226
3222
|
}),
|
|
3227
3223
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3228
3224
|
className: "mt-1 flex items-center gap-2",
|
|
@@ -3254,7 +3250,7 @@ function ThresholdControl({ token }) {
|
|
|
3254
3250
|
}),
|
|
3255
3251
|
validation.ok ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
3256
3252
|
className: "mt-1.5 text-[11px] text-sand-500 leading-snug",
|
|
3257
|
-
children: validation.value === null ? "제한 없음 — 사용률과 무관하게 항상 사용합니다." : "
|
|
3253
|
+
children: validation.value === null ? token.provider === "anthropic" ? "5시간 제한 없음. 주간 사용량 100%에서는 제외합니다." : "제한 없음 — 사용률과 무관하게 항상 사용합니다." : token.provider === "anthropic" ? "5시간 사용률에 적용합니다. 주간은 100%에서만 제외합니다." : "주간 사용률이 임계치에 달하면 해당 토큰을 건너뜁니다."
|
|
3258
3254
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
3259
3255
|
className: "mt-1.5 text-[11px] text-red-500",
|
|
3260
3256
|
children: validation.error
|
|
@@ -3495,12 +3491,17 @@ function SortableTokenCard({ token }) {
|
|
|
3495
3491
|
}),
|
|
3496
3492
|
QUOTA_THRESHOLD_PROVIDERS.has(token.provider) && token.quota_threshold !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
3497
3493
|
className: "px-1.5 py-0.5 rounded-full bg-sienna-50 text-[10px] tabular-nums font-medium text-sienna-600",
|
|
3498
|
-
title:
|
|
3494
|
+
title: `${token.provider === "anthropic" ? "5시간" : "주간"} 사용률 ${token.quota_threshold}% 이상이면 이 토큰 제외`,
|
|
3499
3495
|
children: [
|
|
3500
3496
|
"≤ ",
|
|
3501
3497
|
token.quota_threshold,
|
|
3502
3498
|
"%"
|
|
3503
3499
|
]
|
|
3500
|
+
}),
|
|
3501
|
+
token.provider === "grok" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3502
|
+
className: "px-1.5 py-0.5 rounded-full bg-sienna-50 text-[10px] tabular-nums font-medium text-sienna-600",
|
|
3503
|
+
title: "주간 사용률 100%에서 이 토큰 제외",
|
|
3504
|
+
children: "7d 100%"
|
|
3504
3505
|
})
|
|
3505
3506
|
]
|
|
3506
3507
|
}),
|
|
@@ -3514,7 +3515,7 @@ function SortableTokenCard({ token }) {
|
|
|
3514
3515
|
token.reauth_required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReloginButton, { token }),
|
|
3515
3516
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1" }),
|
|
3516
3517
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(WeightControl, { token }),
|
|
3517
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThresholdControl, { token })
|
|
3518
|
+
token.provider !== "grok" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThresholdControl, { token })
|
|
3518
3519
|
]
|
|
3519
3520
|
})
|
|
3520
3521
|
]
|
|
@@ -52455,6 +52455,7 @@ var MODEL_PRESET_GROUPS = [
|
|
|
52455
52455
|
models: [
|
|
52456
52456
|
"openai/gpt-6-astra",
|
|
52457
52457
|
"openai/gpt-6.1-sol",
|
|
52458
|
+
"openai/gpt-6.1-terra",
|
|
52458
52459
|
"openai/gpt-6-sol",
|
|
52459
52460
|
"openai/gpt-6-luna",
|
|
52460
52461
|
"openai/gpt-5.6-terra",
|
|
@@ -53085,7 +53086,7 @@ function ChatWidget() {
|
|
|
53085
53086
|
}
|
|
53086
53087
|
//#endregion
|
|
53087
53088
|
//#region src/components/Sidebar.tsx
|
|
53088
|
-
var qgridVersion = "2.
|
|
53089
|
+
var qgridVersion = "2.15.1";
|
|
53089
53090
|
function Sidebar({ className }) {
|
|
53090
53091
|
const pathname = useRouterState({ select: (s) => s.location.pathname });
|
|
53091
53092
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", {
|
|
@@ -55280,7 +55281,7 @@ function RootComponent() {
|
|
|
55280
55281
|
}
|
|
55281
55282
|
//#endregion
|
|
55282
55283
|
//#region src/routes/index.tsx
|
|
55283
|
-
var $$splitComponentImporter$5 = () => import("./assets/routes-
|
|
55284
|
+
var $$splitComponentImporter$5 = () => import("./assets/routes-CCdBJqP_.js");
|
|
55284
55285
|
var Route$5 = createFileRoute("/")({ component: lazyRouteComponent($$splitComponentImporter$5, "component") });
|
|
55285
55286
|
//#endregion
|
|
55286
55287
|
//#region src/services/sonamu.generated.ts
|
package/package.json
CHANGED
|
@@ -77,7 +77,7 @@ Language-model `providerOptions.qgrid` supports:
|
|
|
77
77
|
- `logger`: request-log switch. Omitted or `true` is the default and enables qgrid logging; `false` guarantees that generation creates zero qgrid request-log rows.
|
|
78
78
|
- `sessionKey`: source for model-scoped opaque OpenAI prompt-cache affinity. Disabled for Anthropic models.
|
|
79
79
|
- `thinking`: optional boolean for both providers. Omission preserves existing model behavior. True enables thinking with the normal request effort → config `defaultEffort` → default resolution; it does not guarantee thinking tokens on every response. False ignores both efforts, including in request logging, and rejects unsupported or unverified model/runtime combinations. Generate, stream, tool continuation, and structured output carry the same boolean. Update SDK and server together: older servers can ignore the field. No `defaultThinking` or public `effort: "none"` is exposed. Haiku/Sonnet 5.5 off requires Claude Code >=2.1.295; Sonnet uses `between_tools` and may retain thinking blocks between tools.
|
|
80
|
-
- `effort`: provider-specific vocabulary. OpenAI (ChatGPT-subscription Codex route): `low | medium | high | xhigh | max | ultra`, where GPT-6 Astra, GPT-6 Sol, GPT-5.6 Sol, and Terra support `ultra`, and GPT-6 Luna and GPT-5.6 Luna support through `max`; `none`/`minimal` are not public effort values; use `thinking: false` for verified off-capable models. Anthropic (Claude Code `--effort`): `low | medium | high | xhigh | max`. The server resolves the value per provider and model (`providers/common/effort.ts`): anything outside the provider set, or above the Codex model's supported maximum, is silently dropped and treated as unspecified. With thinking omitted, Anthropic falls back to qgrid's default `low`; OpenAI omits `reasoning.effort` so the backend default applies. With `thinking: true`, OpenAI explicitly falls back to `low` for absent or unsupported effort, including raw API requests. With `thinking: false`, both providers ignore caller/default effort and apply their off policy instead. Invalid effort itself produces no error or metadata, only a debug log; unsupported thinking-off requests still fail explicitly. Use `QgridOpenAIProviderOptions` / `QgridAnthropicProviderOptions` for provider-typed `satisfies`; `QgridProviderOptions` is their union.
|
|
80
|
+
- `effort`: provider-specific vocabulary. OpenAI (ChatGPT-subscription Codex route): `low | medium | high | xhigh | max | ultra`, where GPT-6 Astra, GPT-6 Sol, GPT-5.6 Sol, and Terra support `ultra`, and GPT-6 Luna and GPT-5.6 Luna support through `max`; `ultra` is accepted where supported but sent to the backend as `max` because qgrid does not run Codex sub-agent delegation; `none`/`minimal` are not public effort values; use `thinking: false` for verified off-capable models. Anthropic (Claude Code `--effort`): `low | medium | high | xhigh | max`. The server resolves the value per provider and model (`providers/common/effort.ts`): anything outside the provider set, or above the Codex model's supported maximum, is silently dropped and treated as unspecified. With thinking omitted, Anthropic falls back to qgrid's default `low`; OpenAI omits `reasoning.effort` so the backend default applies. With `thinking: true`, OpenAI explicitly falls back to `low` for absent or unsupported effort, including raw API requests. With `thinking: false`, both providers ignore caller/default effort and apply their off policy instead. Invalid effort itself produces no error or metadata, only a debug log; unsupported thinking-off requests still fail explicitly. Use `QgridOpenAIProviderOptions` / `QgridAnthropicProviderOptions` for provider-typed `satisfies`; `QgridProviderOptions` is their union.
|
|
81
81
|
- `verbosity`: OpenAI/Codex route only.
|
|
82
82
|
- `reasoningSummary`: OpenAI/Codex route only.
|
|
83
83
|
- `serviceTier`: OpenAI/Codex route only.
|
|
@@ -44,9 +44,10 @@ Anthropic tokens live in an in-memory `Map<tokenId, PooledToken>`.
|
|
|
44
44
|
|
|
45
45
|
Quota threshold:
|
|
46
46
|
|
|
47
|
-
- `quota_threshold`
|
|
48
|
-
`seven_day_overage_included.utilization`
|
|
49
|
-
|
|
47
|
+
- `quota_threshold` applies only to `five_hour.utilization`. Shared `seven_day.utilization`
|
|
48
|
+
and the Fable family's `seven_day_overage_included.utilization` exclude tokens only at 100%.
|
|
49
|
+
Weekly exhaustion is checked even without a configured threshold. Keepalive uses the same
|
|
50
|
+
policy, so a 5-hour utilization of 0% and weekly utilization of 92% passes an 80% threshold.
|
|
50
51
|
- A runtime quota-exhausted result invalidates every 60-second usage-cache key used before and
|
|
51
52
|
after a possible OAuth refresh, so the next untargeted request rechecks usage and can select
|
|
52
53
|
another token.
|
|
@@ -174,10 +174,10 @@ Key decisions:
|
|
|
174
174
|
- The token subscriber disables statement/idle timeouts for `LISTEN` and uses reconnect backoff.
|
|
175
175
|
- `quota_threshold` is a routing guardrail, not a load balancer. It prevents an individual token from crossing a configured utilization percentage; it does not equalize traffic.
|
|
176
176
|
- Threshold values are nullable integers from 1 to 100. `0` is not valid; `100` means exclude only at full utilization.
|
|
177
|
-
- Provider criteria differ by quota window: Anthropic
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
`primary.usedPercent
|
|
177
|
+
- Provider criteria differ by quota window: Anthropic applies the configured threshold only to
|
|
178
|
+
`five_hour.utilization`; shared and Fable-specific weekly usage block only at 100%. Grok has
|
|
179
|
+
only weekly usage and blocks at 100% regardless of its stored threshold. OpenAI applies the
|
|
180
|
+
configured threshold to `primary.usedPercent`, currently its weekly window.
|
|
181
181
|
- Threshold gates are by token id, not token name. Names are display/logging labels and can change.
|
|
182
182
|
- Token window keepalive is opt-in at two levels since 2.8.0 (`ea7feb3`): an instance fires only with env `QGRID_TOKEN_WINDOW_KEEPALIVE_ENABLED=true`, and only for tokens with `keepalive_enabled = true`. The runner gate exists because developer instances sharing the production DB fired duplicate pings under the 2.7.6 default-on switch; the per-token flag lets shared or credit-metered accounts stay out. The cost is that upgrades start with zero targets until both are set.
|
|
183
183
|
- Lookup failure is fail-open with logs/metrics. Hard failure happens only when usage was read successfully and the token is over threshold.
|
|
@@ -31,6 +31,16 @@ Do not copy stale docs blindly. Use docs to identify decisions and then verify a
|
|
|
31
31
|
|
|
32
32
|
When a repo doc establishes or changes durable rationale for a qgrid feature, reflect the stable decision in `references/decision-rationale.md`. Keep the skill reference as a compact index of why the decision exists and where the source docs live; do not copy full plans or brainstorms into the skill.
|
|
33
33
|
|
|
34
|
+
## Release versioning
|
|
35
|
+
|
|
36
|
+
Effective 2026-10-26, version selection follows the user's client-update policy:
|
|
37
|
+
|
|
38
|
+
- Keep the major version fixed (currently 2) until the user explicitly changes this policy.
|
|
39
|
+
- Bump minor and reset patch to zero when clients need to upgrade `@cartanova/qgrid-ai-sdk` to receive the change.
|
|
40
|
+
- Use a patch bump for every other release. Server, routing, dashboard, and operational changes alone do not require a minor bump.
|
|
41
|
+
- Package publication is separate from client upgrade requirements: publishing SDK and CLI under the same version does not make a patch a mandatory client update.
|
|
42
|
+
- State whether a client SDK upgrade is needed in each Notion release log. Do not renumber previously published releases.
|
|
43
|
+
|
|
34
44
|
## Skill and wiki consistency
|
|
35
45
|
|
|
36
46
|
`packages/cli/skills/qgrid` is the canonical qgrid skill. The CLI package ships this directory to consuming projects. The repository-local `.agents/skills/qgrid` directory is a checked mirror for agents working in this repository; do not edit the mirror as a separate source.
|
|
@@ -47,7 +47,10 @@ Refresh starts 300 seconds plus stable 0–60 second per-account jitter before e
|
|
|
47
47
|
|
|
48
48
|
The response is protobuf JSON, which omits zero-valued scalars: a period without measurable usage arrives without `creditUsagePercent`, so qgrid reads the missing field as 0%. Observed on a Free account on 2026-10-21, where the field stayed absent even after a small request. The period is fixed (it existed before the token's first request and did not move after one), so token-window keepalive does not apply to Grok; xAI documents one weekly pool and no short rolling window.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Every routing prefetch reads billing, even without a configured threshold. Grok exposes only weekly
|
|
51
|
+
usage: accounts are excluded at 100%, and the stored configurable threshold is not applied.
|
|
52
|
+
Dashboard usage (`QgridFrame.usage`) calls the same prefetch through `refreshUsage` and waits up to
|
|
53
|
+
3 seconds. The 60-second lookup cache bounds the xAI calls.
|
|
51
54
|
|
|
52
55
|
D6 excludes accounts when `/settings.on_demand_enabled` is `true`; `null`, `false`, or absence allows routing. Billing does not carry this field. D7 selects eligible accounts through the shared `SmoothWeightedRoundRobin`, using `tokens.weight`; a valid cache-affinity token remains preferred. `QGRID_GROK_MAX_INFLIGHT_PER_TOKEN` optionally excludes accounts at the cap, while omission leaves Grok uncapped (`grok-quota.ts`, `grok-dispatcher.ts`, `packages/api/src/utils/providers/common/smooth-weighted-round-robin.ts`).
|
|
53
56
|
|
|
@@ -16,7 +16,7 @@ Use this reference before changing OpenAI transport, concurrency, routing, promp
|
|
|
16
16
|
|
|
17
17
|
`providerOptions.qgrid.thinking` reaches the Responses builder as a boolean. False overrides request/default effort and sends `reasoning: { effort: "none" }` without a reasoning summary. True uses a valid resolved effort, or explicitly sends `low` when effort is absent or unsupported, so a raw API request cannot fall back to a non-thinking backend default. Omission preserves the existing behavior: valid effort is forwarded; absent or unsupported effort leaves the backend default in effect. True and omission retain the requested reasoning summary policy. `none` belongs only to the internal wire type, not the public effort enum.
|
|
18
18
|
|
|
19
|
-
The 2026-10-10 subscription probe accepted off for `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, and `gpt-5.5`. `gpt-6-astra` and `gpt-6.1-sol` explicitly rejected it. Other model IDs are unverified for off and are rejected locally only when false is requested. Model-access failures are not evidence of mandatory thinking. Validate terminal success and response settings, not HTTP 200 alone: errors can arrive within SSE. The same policy applies to text-model requests driving image generation, not to the image model itself.
|
|
19
|
+
The 2026-10-10 subscription probe accepted off for `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, and `gpt-5.5`; a 2026-10-27 probe also accepted it for `gpt-6.1-terra`. `gpt-6-astra` and `gpt-6.1-sol` explicitly rejected it. Other model IDs are unverified for off and are rejected locally only when false is requested. Model-access failures are not evidence of mandatory thinking. Validate terminal success and response settings, not HTTP 200 alone: errors can arrive within SSE. The same policy applies to text-model requests driving image generation, not to the image model itself.
|
|
20
20
|
|
|
21
21
|
## Adding an OpenAI model
|
|
22
22
|
|
|
@@ -45,7 +45,7 @@ availability or identical limits on qgrid's ChatGPT-subscription route.
|
|
|
45
45
|
Report mocked tests separately from any live smoke test. Model registration does not authorize
|
|
46
46
|
a release, version bump, deployment, or remote migration.
|
|
47
47
|
|
|
48
|
-
### GPT-6 Astra, Sol, Luna, and GPT-6.1
|
|
48
|
+
### GPT-6 Astra, Sol, Luna, GPT-6.1 Sol, and GPT-6.1 Terra
|
|
49
49
|
|
|
50
50
|
`openai/gpt-6-astra` uses the existing text generation, streaming and structured-output paths.
|
|
51
51
|
The model supports image input. The language-model SDK adapter forwards user-message image parts
|
|
@@ -87,16 +87,33 @@ received `400 The 'gpt-6.1-sol' model is not supported when using Codex with a C
|
|
|
87
87
|
succeeded; the pinned User-Agent version did not need to change. The catalog now labels GPT-6 Sol
|
|
88
88
|
"Previous generation workhorse model" without a retirement date. Ultrafast (`service_tier: "ultrafast"`, $60 /
|
|
89
89
|
$6 / $300) is a public-API tier for GPT-6 Astra only; the subscription catalog exposes just the `fast` tier.
|
|
90
|
+
`openai/gpt-6.1-terra` (released 2026-10-26) uses the same paths. Standard prices per million tokens:
|
|
91
|
+
input $1, cached input $0.05, cache write $1.25, output $5, with the same 272K multipliers and the 2x Fast rate;
|
|
92
|
+
every rate is exactly half of GPT-6.1 Sol. The Codex subscription catalog fetched 2026-10-27 with
|
|
93
|
+
`client_version=0.164.0` lists `context_window=500000`, effort through `ultra`, default `low`, and text+image input;
|
|
94
|
+
the same fetch also raised GPT-6.1 Sol to `context_window=500000`. The
|
|
95
|
+
[model page](https://developers.openai.com/api/docs/models/gpt-6.1-terra) separately lists 1.05M context, 922K
|
|
96
|
+
maximum input, 128K maximum output, and effort `none` through `max`. On 2026-10-27, `low`, `max`, and structured
|
|
97
|
+
output succeeded through a local qgrid server, and a direct probe with qgrid's client accepted `effort: "none"`
|
|
98
|
+
with zero reasoning tokens.
|
|
99
|
+
|
|
100
|
+
`ultra` is a Codex client mode, not a wire value: the backend rejects it with `Invalid value: 'ultra'` and accepts
|
|
101
|
+
effort only through `max`. Codex CLI pairs `ultra` with sub-agent delegation and sends the catalog's
|
|
102
|
+
`multi_agent_reasoning_effort` (`xhigh` for Astra and GPT-6.1 Sol/Terra), else `max`, else the highest supported
|
|
103
|
+
level. qgrid has no delegation, so it accepts `ultra` where the catalog lists it but sends `max`, the deepest
|
|
104
|
+
single-request reasoning; request logs keep the requested `ultra`. Before this mapping (fixed in 2.15.1) every
|
|
105
|
+
`ultra` request failed. Verified live for GPT-6.1 Terra and Sol on 2026-10-27.
|
|
90
106
|
|
|
91
107
|
## Existing OpenAI model pricing and limits
|
|
92
108
|
|
|
93
|
-
Checked 2026-09-23 against the official [Standard pricing table](https://developers.openai.com/api/docs/pricing)
|
|
109
|
+
Checked 2026-09-23 (GPT-6.1 rows 2026-10-27) against the official [Standard pricing table](https://developers.openai.com/api/docs/pricing)
|
|
94
110
|
and the local Codex subscription catalog. Prices are USD per million tokens:
|
|
95
111
|
|
|
96
112
|
| Model | Input | Cached input | Cache write | Output | Codex context | Maximum Codex effort |
|
|
97
113
|
|---|---:|---:|---:|---:|---:|---|
|
|
98
114
|
| GPT-6 Astra | 10 | 1 | 12.50 | 50 | 272K | ultra |
|
|
99
|
-
| GPT-6.1 Sol | 2 | 0.10 | 2.50 | 10 |
|
|
115
|
+
| GPT-6.1 Sol | 2 | 0.10 | 2.50 | 10 | 500K | ultra |
|
|
116
|
+
| GPT-6.1 Terra | 1 | 0.05 | 1.25 | 5 | 500K | ultra |
|
|
100
117
|
| GPT-6 Sol | 2 | 0.20 | 2.50 | 10 | 272K | ultra |
|
|
101
118
|
| GPT-6 Luna | 0.10 | 0.01 | 0.125 | 0.50 | 272K | max |
|
|
102
119
|
| GPT-5.6 Sol | 4 | 0.40 | 5 | 20 | 272K | ultra |
|
|
@@ -108,7 +125,7 @@ GPT-5.3-Codex-Spark has a 128K catalog context and effort through `xhigh`; its t
|
|
|
108
125
|
remains an explicitly documented generic estimate. Retired model pricing rows remain for legacy logs.
|
|
109
126
|
The catalog does not establish a maximum output size. GPT-5.6 public API specifications list 1.05M
|
|
110
127
|
context, 922K maximum input and 128K maximum output; do not conflate them with the subscription limits.
|
|
111
|
-
Codex default effort is `low` for GPT-6.1 Sol and GPT-5.6 Sol, `medium` for GPT-6 Astra/Sol/Luna, GPT-5.6 Terra/Luna and GPT-5.5, and `high` for Spark.
|
|
128
|
+
Codex default effort is `low` for GPT-6.1 Sol/Terra and GPT-5.6 Sol, `medium` for GPT-6 Astra/Sol/Luna, GPT-5.6 Terra/Luna and GPT-5.5, and `high` for Spark.
|
|
112
129
|
GPT-5.5 retires from the Codex/ChatGPT route on 2026-10-14 (the API-key route is unaffected); it stays in the SDK type and price table but is excluded from chat presets.
|
|
113
130
|
The SDK default remains `low` regardless of the backend default.
|
|
114
131
|
|
|
@@ -74,10 +74,14 @@ Clicking an attached or generated image opens a preview with extension, decoded
|
|
|
74
74
|
|
|
75
75
|
Token credential previews must tolerate missing `accessToken` rather than reading `.length` unconditionally. Legacy system-keychain credentials display `System Keychain`; this display compatibility does not enable an Antigravity runtime.
|
|
76
76
|
|
|
77
|
-
Chat model presets: the model `<select>` lists the served subset of `QgridSupportedModel` grouped by provider (`MODEL_PRESET_GROUPS` in `ChatWidget.tsx`), newest first, and defaults to `anthropic/claude-fable-5-1`. Ids that the ChatGPT-subscription Codex route no longer serves (`gpt-5.4` and `gpt-5.4-mini` retired 2026-08-31 with `gpt-5.6-terra` / `gpt-5.6-luna` as replacements; `gpt-5.2` and `gpt-5.3-codex` removed earlier), `gpt-5.3-codex-spark` (rejected on the ChatGPT-account Codex route and absent from its catalog as of 2026-09-29), `gpt-5.5` (retires from the Codex/ChatGPT route on 2026-10-14; replacements `gpt-6.1-sol` / `gpt-6-luna`), the retired `claude-opus-4` / `claude-sonnet-4` (2026-06-15) and `claude-opus-4-1` (2026-08-05; Claude Code silently serves `claude-opus-5-5` instead), `claude-sonnet-4-5` (deprecated 2026-09-30, retirement 2026-11-30, replacement `claude-sonnet-5-5`), and the catalog-less `claude-sonnet-4-7` stay in the SDK type and price table (legacy request-log cost) but are excluded here. web does not depend on ai-sdk, so a new model must be added in both places. `openai/gpt-6-astra`, `openai/gpt-6.1-sol`, `openai/gpt-6-sol`, and `openai/gpt-6-luna` are included in the OpenAI group and `anthropic/claude-opus-5-5`, `anthropic/claude-sonnet-5-5`, and `anthropic/claude-haiku-5-5` in the Anthropic group; adding them does not change the default model.
|
|
77
|
+
Chat model presets: the model `<select>` lists the served subset of `QgridSupportedModel` grouped by provider (`MODEL_PRESET_GROUPS` in `ChatWidget.tsx`), newest first, and defaults to `anthropic/claude-fable-5-1`. Ids that the ChatGPT-subscription Codex route no longer serves (`gpt-5.4` and `gpt-5.4-mini` retired 2026-08-31 with `gpt-5.6-terra` / `gpt-5.6-luna` as replacements; `gpt-5.2` and `gpt-5.3-codex` removed earlier), `gpt-5.3-codex-spark` (rejected on the ChatGPT-account Codex route and absent from its catalog as of 2026-09-29), `gpt-5.5` (retires from the Codex/ChatGPT route on 2026-10-14; replacements `gpt-6.1-sol` / `gpt-6-luna`), the retired `claude-opus-4` / `claude-sonnet-4` (2026-06-15) and `claude-opus-4-1` (2026-08-05; Claude Code silently serves `claude-opus-5-5` instead), `claude-sonnet-4-5` (deprecated 2026-09-30, retirement 2026-11-30, replacement `claude-sonnet-5-5`), and the catalog-less `claude-sonnet-4-7` stay in the SDK type and price table (legacy request-log cost) but are excluded here. web does not depend on ai-sdk, so a new model must be added in both places. `openai/gpt-6-astra`, `openai/gpt-6.1-sol`, `openai/gpt-6.1-terra`, `openai/gpt-6-sol`, and `openai/gpt-6-luna` are included in the OpenAI group and `anthropic/claude-opus-5-5`, `anthropic/claude-sonnet-5-5`, and `anthropic/claude-haiku-5-5` in the Anthropic group; adding them does not change the default model.
|
|
78
78
|
|
|
79
79
|
The monit tab's vitals strip shows per-provider in-flight counts, an in-flight sparkline, token chips with quota gauges (fed by the dispatcher's 60-second rate-limits cache; `resetsAt` arrives as ms epoch), and a 1-hour per-provider request/error/cache-hit stats line polled separately every 30 seconds.
|
|
80
80
|
|
|
81
|
+
Quota controls match provider policy: Anthropic edits its 5-hour threshold and shows a fixed 100%
|
|
82
|
+
weekly cap; OpenAI edits its weekly primary-window threshold. Grok has only a fixed 100% weekly cap
|
|
83
|
+
and no threshold editor. Disabling the Anthropic threshold does not disable weekly exhaustion checks.
|
|
84
|
+
|
|
81
85
|
Current-turn input images render in the detail view under the user prompt from `request_logs.input_images` (subset `A` only, not the list subset). Logs created before that column fall back to the first synthetic `image_generation` step's `tool_args.inputImages`. Keep the prompt itself text-only, redact large base64 in request JSON views, and avoid rendering duplicate input previews for multi-output image turns.
|
|
82
86
|
|
|
83
87
|
## Verification
|
|
@@ -140,9 +140,9 @@ Usage/quota:
|
|
|
140
140
|
|
|
141
141
|
- Usage API is `https://api.anthropic.com/api/oauth/usage`.
|
|
142
142
|
- qgrid caches Anthropic usage by access-token suffix for 60 seconds.
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
- The configured quota threshold applies only to `five_hour.utilization`. The shared
|
|
144
|
+
`seven_day.utilization` and Fable-only `seven_day_overage_included.utilization` block only at
|
|
145
|
+
100%, independently of the configured threshold.
|
|
146
146
|
- Usage lookup failure is fail-open for routing.
|
|
147
147
|
|
|
148
148
|
## OpenAI OAuth And Refresh Flow
|
|
@@ -274,7 +274,10 @@ When a refresh fails in a way that only re-login can fix, qgrid removes the toke
|
|
|
274
274
|
|
|
275
275
|
`quota_threshold` is a routing gate, not a hard external-provider guarantee.
|
|
276
276
|
|
|
277
|
-
- Null
|
|
277
|
+
- Null disables the configurable threshold, but Anthropic and Grok still check weekly exhaustion.
|
|
278
|
+
- Anthropic applies the configured threshold to 5-hour usage and a fixed 100% cap to weekly usage.
|
|
279
|
+
- Grok exposes only weekly usage and uses a fixed 100% cap; its stored threshold is not applied.
|
|
280
|
+
- OpenAI applies the configured threshold to its primary usage window, currently weekly.
|
|
278
281
|
- Lookup failure is fail-open.
|
|
279
282
|
- Individual over-threshold tokens are excluded from selection.
|
|
280
283
|
- OpenAI keeps this exclusion as an in-memory `quota-blocked` runtime state without changing the
|
|
@@ -283,7 +286,7 @@ When a refresh fails in a way that only re-login can fix, qgrid removes the toke
|
|
|
283
286
|
`recovered` once a later quota check falls below the threshold. Metadata generations prevent an
|
|
284
287
|
in-flight lookup from restoring a block after a threshold or lifecycle change. The state is not
|
|
285
288
|
persisted across server restarts.
|
|
286
|
-
- Grok also keeps
|
|
289
|
+
- Grok also keeps weekly-cap and exhaustion blocks in memory. Its exhaustion block is request-class
|
|
287
290
|
scoped, and `/settings.on_demand_enabled = true` independently excludes the entire account
|
|
288
291
|
(`packages/api/src/utils/providers/grok/grok-dispatcher.ts`).
|
|
289
292
|
- If all ready/eligible tokens are over threshold, qgrid throws `QuotaThresholdExceededError`.
|