Align the developer-message fix with the Provider API transport router.
The fix stays scoped to the legacy /alpha/generate converter, and the
OMP advisory compat test now forces the upgrade_required fallback so the
advisory is asserted on the generate request body.
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
OMP converts custom and hook messages (advisor notes, todo reminders,
retry nudges) to role "developer" before calling the provider.
messagesToCC() only handled user, assistant, and toolResult, so those
messages were dropped before params.messages was sent to
/alpha/generate. Steering still interrupted pending tools, but the
model never saw the message content.
/alpha/generate has no developer role: the official command-code CLI
(0.32.3) only emits user, assistant, and tool messages plus a separate
params.system. Forward developer messages as user messages with
identical content in the same chronological position. Hoisting them
into params.system would turn a mid-conversation note into a global
top-priority instruction.
If upstream omits reasoning-end and starts emitting text-delta or
tool-call events, the thinking block remained open causing
thinking_start -> thinking_delta -> text_start -> ... -> thinking_end
ordering. Now endThinking() is called at the start of text-delta and
tool-call handlers so thinking_end always precedes text_start or
toolcall_start.
Adds 2 regression tests for the missing reasoning-end edge case.
- Removed unnecessary blank lines and improved formatting for better readability in index.ts and converters.ts.
- Updated package-lock.json to downgrade several dependencies for compatibility, including @protobufjs/eventemitter, @protobufjs/fetch, and others.
- Enhanced error message in core.ts to clarify configuration options for the Command Code API key.
- Added a test to ensure the correct handling of environment variable values in test-stream.ts.
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