mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
Captured a 2.1.1 CLI request with the plugin hook that produced the 2.0.32 capture. The body is byte-identical; what moved is the version string and the route. The 2.1 client groups /inference routes by provider family, so a chat request goes to /inference/openai/v1/chat/completions, responses to /inference/openai/v1/responses and messages to /inference/anthropic/v1/messages. A 2.0.32 client posted the protocol path directly and that route still answers, so this is fidelity rather than a fix. The family segment is only inserted for the /inference origin: a custom base URL and the /zen/go lane keep the flat route, because the grouping belongs to /inference alone. Co-authored-by: AiFLYF <AiFLYF@users.noreply.github.com>