The standalone section read like a commit message and sat between Install
and Authentication as if it were a core topic. Keep the part users need
(sibling extensions share the connection and credentials, so their
requests count against Command Code usage) as one sentence under Usage;
the registry mechanics stay in index.ts and the changelog.
google/gemini-3.7-flash currently fails on the Provider API with a
zero-data-retention routing 404 for every request, which made the GOAT
live suite red regardless of provider changes. GPT-5.6 Luna is available
on every plan, accepts image input, and completes the vision request.
PR #69 added efforts for meta/muse-spark-* directly to the generated
catalog, which the drift check flags and the daily sync job reverts.
Keep src/commandcode-catalog.ts byte-identical to upstream and merge a
separate src/commandcode-catalog-overrides.ts over it at load time. A
test fails as soon as upstream publishes efforts for an overridden model
so the override gets removed instead of shadowing the CLI catalog.
Verified against the live endpoint: pi --thinking xhigh sends
reasoning_effort="xhigh" for meta/muse-spark-1.2-contributor and the
request succeeds; --thinking off sends none.
Closes#69
The official CLI marks meta/muse-spark-* as reasoning models but ships no
effort levels for them and sends no effort parameter, so the thinking level
stays off in pi. Document that so the locked footer is not mistaken for a
provider bug.
Refs #69
(cherry picked from commit 263310635a89e35cf0b3da527474555c9687903e)
Every host start awaited a full catalog request before the provider
registered, costing one HTTPS round-trip (up to the discovery timeout on a
hanging connection) even when a cache written seconds earlier was on disk.
Register the cached catalog immediately and run the live refresh in the
background; the live result re-registers the provider when it arrives. A
first start without a cache still awaits the live catalog. The background
refresh is aborted on session_shutdown so print mode does not wait for it.
Closes#63
(cherry picked from commit 142191f9420fe90460cdc3cbae70e26d0c000860)
pi routes the main chat through the registered provider, but sibling
extensions that call streamSimple from @earendil-works/pi-ai/compat with
the active Command Code model resolve model.api through the compat
api-registry, which only knows built-in APIs. On plain pi that failed
with "No API provider registered for api: commandcode-custom".
Register commandcode-custom there and delegate to the transport router.
The registry resolves no credentials for extension providers, so fall
back to the configured Command Code key when the caller passes none.
Closes#68
(cherry picked from commit 7e9659e672771c6a9223b95938e50fb2a051a0a7)
Add claude-fable-5-1, deepseek/deepseek-v4-flash-fast, and
tencent/hy4-preview with their reasoning efforts, add moonshotai/Kimi-K3
efforts, and drop minimax/minimax-m3-free, which the CLI no longer lists.
Synchronize the static model catalog with command-code@1.36.0, which adds
Qwen/Qwen3.8-Flash (reasoning efforts low, medium, xhigh) and
z-ai/glm-5.3-flash (low, high, max), the free minimax/minimax-m3-free
model, and the glm-5.3-flash output limit, and drops the retired
stealth/ox-alpha.
Fetches live account quota from Command Code alpha usage endpoints
(whoami, billing/credits, billing/subscriptions, usage/summary) and
renders a plain-text dashboard via ui.notify.
- Graceful degradation: optional endpoint transport/timeout/parse
failures degrade to null sections instead of aborting; only 401/403
are hard failures. 429 is transient, not fatal.
- Overall deadline bounds the whole command to QUOTA_TIMEOUT_MS
(per-request controllers are chained; post-deadline phases fail fast).
- OMP auth: filter unresolved $COMMANDCODE_API_KEY placeholder and fall
back to the host resolver via pickCommandCodeApiKey.
- ZDR privacy header respected on quota requests.
- Redaction reuses redactCommandCodeErrorText plus JSON-quoted
credential fields; outer-catch errors are redacted too.
- resetAt parsed from seconds, ms, numeric string, or ISO string.
- 21 hermetic unit tests wired into npm test (test:quota).
Resolve the Command Code model cache through the host's getAgentDir helper so pi, OMP, and PI_CODING_AGENT_DIR use their own agent state directory instead of the official Command Code client directory.
Persist the last valid Command Code model catalog and use it when live model discovery fails. Keep first-time offline startup non-fatal, surface clear warnings, and cover cached model selection with unit and pi integration regression tests.
Support OMP as a host alongside pi:
- Convert OMP's array-format system prompts to string via systemPromptToText
- Guard against OMP passing the literal env-var name as the API key value
- Add ~/.omp/agent/auth.json to default auth path lookup
- Fix --list-models output to check both stdout and stderr
- Add OMP compatibility smoke test with isolated temp HOME and mock server
- Deduplicate usage section in README, add OMP install and usage docs
Document the incremental reasoning-delta streaming, live display pricing,
and dynamic model fetch in CHANGELOG.md. Add a Pricing section to
README.md explaining the MODEL_COSTS overlay and how to update prices.
- Add scripts/extract-models.ts to parse command-code npm dist file
- Generate models.json (21 models, 15 pricing entries) with contextWindow
and maxOutputTokens pre-filled; no nulls or hardcoded fallbacks in index.ts
- Rewrite index.ts to load model list and costs from models.json
- Cap gateway model maxOutputTokens at 65536 (API limit for Baseten/Vercel)
- Add 'Update models' section to README documenting the generation flow
- Add npm run extract-models script