Otto G
b94c0c7d04
fix(sse): use x-api-key for opencode-go minimax messages requests ( #733 )
...
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`
2026-03-29 04:29:59 -03:00
..
2026-03-14 10:58:48 -03:00
2026-02-18 00:02:15 -03:00
2026-03-28 12:58:31 -03:00
2026-03-14 14:03:08 -03:00
2026-03-15 00:59:22 -03:00
2026-03-22 16:22:58 +08:00
2026-03-23 09:21:03 -03:00
2026-03-23 11:08:14 -03:00
2026-03-19 02:25:29 -03:00
2026-02-18 00:02:15 -03:00
2026-02-18 00:02:15 -03:00
2026-03-21 00:50:07 +08:00
2026-03-28 17:26:55 -03:00
2026-03-23 11:08:14 -03:00
2026-03-28 23:13:03 -03:00
2026-03-27 06:23:52 -03:00
2026-03-27 22:38:34 -05:00
2026-02-28 07:59:38 -03:00
2026-03-28 12:33:13 -03:00
2026-03-10 08:47:06 -03:00
2026-03-28 20:39:16 -03:00
2026-03-15 01:51:59 +02:00
2026-02-18 00:02:15 -03:00
2026-03-28 21:04:47 -03:00
2026-03-18 12:25:17 +00:00
2026-03-16 10:23:44 +01:00
2026-03-15 02:06:49 +02:00
2026-03-28 12:58:31 -03:00
2026-03-21 00:50:07 +08:00
2026-02-28 08:15:04 -03:00
2026-02-28 08:15:04 -03:00
2026-03-17 01:47:22 +05:30
2026-02-18 00:02:15 -03:00
2026-03-23 09:21:03 -03:00
2026-03-23 11:08:14 -03:00
2026-02-18 00:02:15 -03:00
2026-02-23 03:50:01 -03:00
2026-03-23 09:21:03 -03:00
2026-03-28 12:58:31 -03:00
2026-03-28 19:54:45 -03:00
2026-03-23 20:36:00 -03:00
2026-03-01 21:42:39 -03:00
2026-03-12 10:10:45 -03:00
2026-03-28 20:39:02 -03:00
2026-03-08 20:47:17 +00:00
2026-03-23 09:21:03 -03:00
2026-03-12 10:20:08 +03:00
2026-02-18 00:02:15 -03:00
2026-03-23 11:08:14 -03:00
2026-03-29 04:29:59 -03:00
2026-03-17 01:59:40 +05:30
2026-03-23 19:53:02 -03:00
2026-02-18 00:02:15 -03:00
2026-03-14 18:49:35 +01:00
2026-03-28 21:17:07 -04:00
2026-03-28 12:58:31 -03:00
2026-02-23 16:50:48 -03:00
2026-03-17 13:05:27 +07:00
2026-03-17 13:05:27 +07:00
2026-03-18 13:57:25 +07:00
2026-02-18 00:02:15 -03:00
2026-03-01 07:10:27 -03:00
2026-02-18 00:02:15 -03:00
2026-03-28 22:09:27 -03:00
2026-02-27 16:29:58 -03:00
2026-03-28 14:48:57 -03:00
2026-03-19 02:25:29 -03:00
2026-03-17 18:28:35 +01:00
2026-03-08 17:58:42 -03:00
2026-02-18 00:02:15 -03:00
2026-03-23 09:21:03 -03:00
2026-02-18 00:02:15 -03:00
2026-03-27 15:12:51 -03:00
2026-03-14 14:03:08 -03:00
2026-02-18 00:02:15 -03:00
2026-03-15 20:37:18 +02:00
2026-03-23 11:08:14 -03:00
2026-03-14 14:03:08 -03:00
2026-03-04 18:45:02 -03:00
2026-03-05 01:16:56 -03:00
2026-03-27 16:23:44 -06:00
2026-03-23 11:08:14 -03:00
2026-03-23 11:08:14 -03:00
2026-03-23 11:08:14 -03:00
2026-03-23 11:08:14 -03:00
2026-03-23 11:08:14 -03:00
2026-03-28 20:39:16 -03:00
2026-03-23 11:08:14 -03:00
2026-03-26 23:50:54 -03:00
2026-03-23 11:08:14 -03:00
2026-03-28 12:33:13 -03:00
2026-03-23 11:08:14 -03:00
2026-03-23 11:08:14 -03:00
2026-03-28 12:33:13 -03:00
2026-03-28 16:31:46 -03:00
2026-03-23 11:08:14 -03:00
2026-03-28 21:57:15 -03:00
2026-03-23 11:08:14 -03:00
2026-02-18 00:02:15 -03:00
2026-03-28 12:33:13 -03:00
2026-03-16 09:38:34 -03:00
2026-03-24 17:24:11 +08:00
2026-03-28 12:58:31 -03:00
2026-02-18 00:02:15 -03:00