mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
OpenCode Go mixes request protocols by model family: - `glm-5` and `kimi-k2.5` use OpenAI-style `/chat/completions` - `minimax-m2.5` and `minimax-m2.7` use Anthropic-style `/messages` OmniRoute already routed MiniMax Go models to `/messages`, but the executor still sent `Authorization: Bearer ...`, which caused upstream `401 Missing API key` errors. This changes `OpencodeExecutor` to send: - `x-api-key` + `anthropic-version` for Claude-targeted OpenCode Go requests - `Authorization: Bearer ...` for the remaining OpenCode Go request formats Also updates unit coverage to assert the correct header behavior for MiniMax Go models. Validated with: - direct curl repro against OpenCode Go endpoints - `node --import tsx/esm --test tests/unit/opencode-executor.test.mjs` - `npm run typecheck:core` - `npm run build`
6.7 KiB
6.7 KiB