Files
pickedbrianandClaude Opus 5.5 414809cc12 feat(korouter): add KoRouter provider (#8979)
* feat(korouter): add KoRouter provider

KoRouter is an OpenAI- and Anthropic-compatible gateway that relays
Claude, GPT, DeepSeek, GLM and Kimi models on one key and one balance.
19 models; every entry references the lab model through base_model and
carries only KoRouter's own prices, read from the public catalog that
bills requests. reasoning_options describe the /v1 chat-completions
surface and each header cites the live probe that backs it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(korouter): claude-sonnet-5-5 cache_read 0.13 -> 0.065 (Anthropic lists Sonnet 5.5 cache reads at $0.10/MTok)

* feat(korouter): move to schema 2 and answer the reasoning review

dev now rejects model files without schema = 2, so every KoRouter entry
is rewritten in the v2 layout: [capabilities] reasoning and
[cost.text.input/output] (GPT's >272K band as overrides), and
provider.toml gains opencodeai. Prices are unchanged except kimi-k3,
which now lists its cache write (Moonshot bills cache writes).

Reasoning controls, re-probed live on https://korouter.ai/v1 on 2026-10-30:
- claude-opus-4-6: reasoning_effort=xhigh returns 200 with reasoning, so
  effort is low|medium|high|xhigh|max.
- kimi-k3, deepseek-v4.1-flash: reasoning_effort=none turns reasoning
  off (reasoning.enabled=false does the same), so off is effort none
  and there is no separate toggle.
- glm-5.3, glm-5.3-flash: reasoning.enabled=false and
  reasoning_effort=none both return 400 "Reasoning is mandatory", and
  thinking.type has no consistent effect, so effort only, no toggle.
- claude-haiku-4-5: no reasoning reaches the reply on /v1 even with a
  valid thinking budget, so reasoning = { supported = false }.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(korouter): follow the second reasoning review; declare cache

- claude-opus-4-6: back to Anthropic's low|medium|high|max. xhigh is
  accepted but shows no distinct effect; the header explains that the
  quoted 400 is the generic effort validator.
- kimi-k3, deepseek-v4.1-flash: toggle (reasoning.enabled) + low|high|max,
  as the same-model peers; effort none is noted in the header.
- Every entry: cache = { implicit = true }. No cache_control markers are
  needed; live 2026-10-30 a repeated prefix read back as cached_tokens
  on Claude, GPT, DeepSeek, GLM and Kimi.
- GPT: no freeform. Custom tools are dropped before the upstream call on
  /v1 chat completions (live 2026-10-30, evidence in each header).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-14 14:43:25 -06:00
..