From b4d36334bff69538bbfe66f3d3ba10de075187a5 Mon Sep 17 00:00:00 2001 From: infosave2007 Date: Fri, 7 Aug 2026 22:25:52 +0300 Subject: [PATCH] chore: release 0.2.39 --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- docs/ROUTING.md | 8 +++++++- docs/ROUTING.ru.md | 8 +++++++- 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 369ad7a..614178b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,48 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/). +## [0.2.39] - 2026-08-07 + +### Added +- **Benchmark, redesigned into the console** (⏱ sidebar entry): two explicit modes. **Smart + routing** (default) sends every probe through `cortiq-auto` and judges the ROUTER — task label + vs expected (✓/✗), complexity tier, chosen model with per-request cost, task-rule badge — + with KPIs for answer quality, classification accuracy, TTFT, tok/s and money spent, plus a + "requests went to" per-model distribution. **Individual models** compares pinned models + head-to-head. Results render live row-by-row, runs land in a browser-side history (per-run × + and Clear-all), custom tests supported, ⚡ quick subset (7) vs full suite (17). +- **Hard probes that exercise the high tier**: two route-judged tests (science / ops pools) + generated fresh each run — interdisciplinary prompts rate high reliably while fixed wordings + decay with the router's novelty signal. Pass = the router said `high` and the request escalated; + the tiny token budget keeps them at cents even on the priciest model. +- **One-paste harness setup** on the API-keys page: Claude Code (native Anthropic `/v1/messages`, + now on by default, one-click enable for older configs), Codex, OpenCode, Continue and Cline — + each pre-filled with the gateway URL and the freshly created key. The gateway detects harnesses + already installed on its machine (✓ on the tab, "already configured for this gateway" status). +- **Stale-tab detection**: open consoles notice a gateway restart via the meta start marker and + show a reload banner instead of silently running an old interface. +- Log viewer Clear button (`DELETE /admin/api/logs`). + +### Changed +- **High complexity escalates over task rules**: at tier `high` the tier chain leads and the task + rule demotes to fallback — a `code → cheap-model` rule no longer pins the hardest prompts to + the cheap model. Low/medium keep task-rule-first semantics (documented in docs/ROUTING). +- **Honest stream costs**: the final cost rides a closing SSE event (`cortiq_cost_usd`) since the + initial header is written before generation; money renders with 4 decimals (last two smaller) + and grows precision below $0.0001 instead of collapsing to $0.0000. +- **Oracle-sized timeouts**: router default 800 ms → 15 s (hosted escalations take ~10 s); + provider clients gained a 10 s connect timeout (dead upstreams fail over fast) with no overall + cap so long generations and streams are never cut. +- Benchmark fairness: +256-token reasoning headroom (thinking models aren't cut mid-``), + router degradation shown as "⚠ router degraded" and excluded from accuracy, "budget spent on + reasoning" instead of a misleading "empty answer", creative-writing budget 96 → 512. +- New-key dialog simplified to account / rate limit / optional custom value. + +### Fixed +- `cortiq bench` results showed "error" with newer cortiq releases that pretty-print `--json`: + the parser now finds the last balanced JSON object anywhere in the output, and tok/s prefers + steady decode speed (the old heuristic could report `allocs_per_token` as tok/s). + ## [0.2.38] - 2026-08-07 ### Added diff --git a/Cargo.lock b/Cargo.lock index c5adcbf..24abd44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,7 +285,7 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "cortiq-gateway" -version = "0.2.38" +version = "0.2.39" dependencies = [ "anyhow", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index f9d5aed..c4665fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cortiq-gateway" -version = "0.2.38" +version = "0.2.39" edition = "2021" rust-version = "1.75" license = "Apache-2.0" diff --git a/docs/ROUTING.md b/docs/ROUTING.md index 2260833..22aa2a4 100644 --- a/docs/ROUTING.md +++ b/docs/ROUTING.md @@ -177,7 +177,13 @@ code = ["claude-sonnet", "gpt"] # code goes to the strongest coder first A matching rule's models go **first** in the candidate chain; the complexity chain follows as fallback, so a task pin never weakens failover. Tasks without -a rule route by complexity alone. The available labels come from the router +a rule route by complexity alone. + +**Exception — high complexity escalates.** When the router rates a request +`high` (and a `high` chain is configured), the tier chain leads and the task +rule demotes to fallback. Otherwise a rule like `code → cheap-model` would pin +even the hardest prompts to the cheap model and the tier system would never +get a say. Low/medium keep task-rule-first semantics. The available labels come from the router (`GET /v1/taxonomies`) — the admin console's Routing page builds the editor from your account's live taxonomy and shows each task's share of recent traffic. When a rule supplied the head of the chain the response reports diff --git a/docs/ROUTING.ru.md b/docs/ROUTING.ru.md index 0daf794..e71d138 100644 --- a/docs/ROUTING.ru.md +++ b/docs/ROUTING.ru.md @@ -175,7 +175,13 @@ code = ["claude-sonnet", "gpt"] # код — сильнейшему ко Модели подходящего правила идут **первыми** в цепочке кандидатов; цепочка по сложности следует за ними как резерв — правило по задаче не ослабляет failover. -Задачи без правила маршрутизируются только по сложности. Список меток приходит +Задачи без правила маршрутизируются только по сложности. + +**Исключение — высокая сложность эскалирует.** Когда роутер оценил запрос как +`high` (и цепочка `high` настроена), цепочка уровня идёт первой, а правило +задачи становится резервом. Иначе правило вида `code → дешёвая-модель` +приковало бы к дешёвой модели даже самые сложные запросы, и система уровней +не имела бы права голоса. Для low/medium правило задачи ведёт, как и раньше. Список меток приходит с роутера (`GET /v1/taxonomies`) — вкладка Роутинг строит редактор по живой таксономии аккаунта и показывает долю каждой задачи в трафике. Когда цепочку возглавило правило задачи, ответ сообщает `route_source: "router+task-rule"`.