Classify every comment as tautology, stale, excuse or decision record. Tautology/stale/excuse comments are deleted (excuses filed as issues #196-#236), decisions moved to docs/adr/0001-0034. - scripts/lint-comments.sh + .comment-baseline: per-file comment count may only go down; wired into tests/all.sh - .claude/skills/delete-comment: repeatable audit workflow - cargo fmt applied to touched crates Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
902 B
OpenAI-compatible server tolerance
Status: accepted
Context
Servers (Ollama, vLLM, LM Studio, OpenRouter) vary: tool results must directly follow the assistant's tool_calls, not all accept content arrays, not all know reasoning_effort, some close without [DONE]. Custom endpoints are cheap to query and their config is edited by hand.
Decision
Emit tool results first, use plain string content, retry once without reasoning_effort, and still emit Done when the stream ends without [DONE]. Never serve the model-list cache first for custom endpoints.
Consequences
Wider server compatibility at the cost of an extra request in the retry case. Providers must always emit Done last with the full assembled message.
Code: crates/hx-ai/src/openai_compat.rs (message conversion, request retry, stream end); crates/hx-ai/src/models.rs:list_models; crates/hx-ai/src/lib.rs:StreamEvent