Repository navigation
- fix: chat-completions contract handling — reasoning is sent back to the server complete and unmodified, in the field it arrived in (
reasoning,reasoning_content, or OpenRouterreasoning_details), and never inside the message content;reasoning_contentstreams (DeepSeek, llama.cpp, LM Studio) are now read - fix: every tool call gets its tool message, including when a tool throws; missing tool-call ids are generated, chunks without an index are joined, empty or unparsable arguments go back as
{} - fix:
finish_reasonlengthcontinues a cut-off reply (up to three times),content_filteris reported as an error, and refusals are shown - fix: SSE parsing accepts CRLF and bare-CR line endings,
data:without a space, and a last event without a trailing blank line - fix: HTTP status is kept for retry decisions,
Retry-Afteris honoured, 408 is retried - fix: a tool call the model writes inside its reasoning (DeepSeek call syntax) is recovered and run instead of counting as an empty reply; a reply with no action no longer crashes the run
- fix: compaction carries
MI_API_PARAMSand dropschat_template_kwargswhen a server rejects it - feat:
MI_SESSIONkeeps a one-shot (-por piped) conversation in a file (mode 0600) and continues it on the next call under the current system message - feat: goal loop — one worker conversation for the whole budget; a review passes only when its last line is exactly
VERDICT: PASS; reviews get a pristine copy of the working directory for literal change-set checks; request cap and retry under a deadline;MI_GOAL_PLAN=0skips the planner - feat:
MI_DENYrefuses tool calls whose arguments match a regex - add: benchmarking on the Harbor framework (
bench/,docs/benchmarking.md,docs/benchmark-history.md), including an optional network allowlist for evaluation runs - docs:
docs/api-contracts.md— the audit of mi's model API handling against the official contracts, with live evidence from local model servers
Known limitations
- The contract fixes were verified live only against local servers (Ollama and llama.cpp). Behaviour that needs a paid API is covered by tests against the documented wire shapes only: OpenRouter's
reasoning_detailsround trip, DeepSeek's rejection of a tool-calling request withoutreasoning_content, and OpenAI's rejection of unknown request arguments. - Not exercised against a real server: CRLF streams, tool calls without ids or index, refusals,
Retry-After. reasoning_detailsthat arrive without an index across several deltas can be ambiguous to reassemble.- Reasoning is now sent back in full, which makes requests larger on servers that count it as prompt tokens.
- When a conversation already exceeds the context window, the compaction request exceeds it too and fails.
- mi speaks the Chat Completions format only; there is no Responses API or Anthropic Messages support.