The model catalog tests hard-coded specific model ids, the reasoning model
count, and output limits from command-code@1.32.2. Every upstream catalog
sync broke them, which made the daily catalog sync workflow fail before it
could open its PR.
Assert structural invariants over the generated catalog instead: image
models resolve to text+image, every effort entry has a reasoning flag,
reasoning without efforts yields an empty level map, output limits are
positive integers and clamp to the context length.
Closes#67
(cherry picked from commit 458e3a57892bb625a78fb5ded092627ba3cf2867)
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.
deepseek/deepseek-v4-flash-vision-exp is served by the Provider API but was
missing from the hardcoded MODEL_INPUT_MODALITIES allowlist, so pi rejected
any conversation containing an image block. Notably this also rejected images
returned by the read tool via toolResult:
Error: Selected Command Code model does not support image content in tool results
Adding the allowlist entry lets modelSupportsImageInput() return true and the
converters forward images using the current Command Code wire format.
Coverage:
- regression test for modelSupportsImageInput("deepseek/deepseek-v4-flash-vision-exp")
- end-to-end stream test for a tool-result image forwarded as a following user
image (the concrete read reproduction), not only a user-attached image
- end-to-end stream test asserting a text-only model still rejects tool-result
images before any network access
Refs: https://github.com/patlux/pi-commandcode-provider/issues/54
Assert the empty catalog path recovers live models and writes a cache once discovery is available again, including the real pi extension entrypoint used by /reload.
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.