Commit Graph
2 Commits
Author SHA1 Message Date
cat-shark 5947e133de feat: rewrite the Command Code provider on pi's native provider API
Replace the previous implementation with one that registers the Provider API
catalog through pi's own provider layer instead of shipping a custom transport,
cache file, and hand-maintained pricing table.

- models: derive the catalog from the published command-code CLI package
  (context windows, reasoning efforts, image input, output limits, rates) and
  keep it as the offline baseline; scripts/sync-catalog.mjs regenerates it and
  supports --check
- refresh: use refreshModels plus context.publish so pi persists the live
  /provider/v1/models listing in models-store.json and restores it offline
- auth: /login browser transfer through a localhost callback server with a
  pasted-key fallback; $COMMAND_CODE_API_KEY, --api-key and auth.json keep
  working
- streaming: pi's native openai-completions and anthropic-messages adapters;
  the generate-transport fallback and Oh My Pi branches are gone
- keep the context-overflow rewrite that enables pi's compaction retry and the
  /commandcode-quota command
- tests: 51 cases under tests/<module>/ covering models, catalog sync, auth,
  the callback server, overflow handling, quota, and the extension factory

Verified against the live API: chat, tool round trip, image input and
--thinking max on deepseek/deepseek-v4.1-flash, quota output, and catalog
persistence in an interactive session.
2026-09-14 11:19:33 +08:00
cat-shark 8007a6480c fix(models): support DeepSeek V4.1 vision and max effort
CI / typecheck (push) Failing after 51s
CI / format (push) Failing after 4s
CI / Oh My Pi compatibility (push) Failing after 1m7s
CI / CodeQL SAST (push) Failing after 26m15s
CI / Semgrep — pi extension audit (push) Failing after 8m15s
CI / Gitleaks — secrets scan (push) Failing after 8s
CI / Dependency review (push) Skipped
CI / npm audit (push) Failing after 6s
CI / Check lifecycle scripts (push) Failing after 2s
Refresh the generated capability catalog from command-code@1.44.0 to
1.53.1. deepseek/deepseek-v4.1-flash now advertises image input and its
low, high, and max reasoning efforts, so pi forwards attached images and
exposes the full thinking-level selector instead of reporting the model
as text-only without selectable levels. The sync also adds gpt-6-astra,
xai/grok-4.6, and inclusionai/ling-3.0-flash-sante:free metadata.

Drop the now-obsolete manual Meta Muse Spark effort overrides because
upstream publishes efforts for meta/muse-spark-1.1 through 1.3-contributor
and MiniMaxAI/MiniMax-M3, and add a regression test for the V4.1
capabilities.
2026-09-13 22:27:51 +08:00