qwai-tech_obsidian-plugin-i.../tests
Leon Ward 32b47e847c fix(llm): sanitize chat messages to OpenAI wire shape for strict gateways
A real-LLM agent run against a strict OpenAI gateway (Manifold) failed on the
follow-up turn with `Unrecognized key: "model"`: the planner's working assistant
messages carry internal fields (model, reasoning_content) that lenient servers
(DeepSeek) ignore but strict ones reject. Add toOpenAiWireMessages() — keeps only
spec fields (role, content, name, tool_calls, tool_call_id) and expands image
attachments — and use it in all OpenAI-compatible providers (openai/custom,
deepseek, openrouter, ollama). Stripping reasoning_content is also correct per
DeepSeek's own guidance (must not be echoed back).

Also add an env-gated real-LLM path to the mission harness (MISSION_LLM_*,
defaults to the mock so deterministic/flake-soak runs are unaffected) and a
skipped-by-default real-llm-mission test. Verified end-to-end: deepseek-v4-pro
via Manifold reads a vault file through read_file and returns the sentinel.
2026-06-24 15:30:11 +08:00
..
e2e fix(test): raise long-task wdio timeout 30m->50m (v4-pro pace can exceed 30m) 2026-06-14 21:13:42 +08:00
harness fix(llm): sanitize chat messages to OpenAI wire shape for strict gateways 2026-06-24 15:30:11 +08:00
missions fix(agent): retry empty/truncated turns instead of silently completing 2026-06-14 18:42:44 +08:00
mutation test: widen mutation gate to {adapter, json-utils} at 90.77% 2026-06-14 20:23:54 +08:00
perf test: add memory-leak guard and non-blocking timing metrics 2026-06-13 00:49:01 +08:00