Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs-site/src/content/docs/guides/model-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,27 @@ Routing and catalog visibility are separate controls:
}
```

## Watching routing live

The dashboard's **Models › Live routing** tab (`#models/live`) shows how each request was routed,
refreshing every few seconds while the tab is open. For the latest request, or one you select in
the list below it, you see:

- **The route.** The client, then OpenCodex, then every candidate: the account or combo target that
answered, the ones that failed (with the HTTP status and the reason), and the ones that were
skipped before any send. A multi-account OAuth pool shows each account's state when the request
finished: paused, needing sign-in, cooling down, out of quota, or not listing the model.
- **Where the time went.** OpenCodex's own time, earlier failed attempts, the wait for the first
token, and streaming. Every segment is measured; DNS and TLS are not split out.
- **The context window.** Estimated tokens for the system prompt, tools, skills, memory files such
as `AGENTS.md` and `CLAUDE.md`, files, tool results and each conversation turn, against the free
space in the serving model's window, plus the prompt-cache hit rate. Only sizes are recorded,
never prompt text, and they live in memory with the request log.

The request list groups by request, session or API key and shows the account, model, effort,
duration, time to first token, tokens, cache-hit rate, tokens per second and estimated cost.
Combos and accounts keep their own pages; the tab links to them.

## Tips

- **Target a Codex account explicitly** with `<selector>/<native-openai-model>` (rule 1). That route
Expand Down
3 changes: 3 additions & 0 deletions gui/.eslint/i18n-allowlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export function isTechnicalLiteral(value: string): boolean {
// Internal Models session-cache suffix, never rendered as user-facing copy.
if (trimmed === ":picker-order") return true;

// Opaque id tags of the Live routing view model (never rendered).
if (/^(session|key|admission|attempt|decision|roster):$/.test(trimmed)) return true;

// Absolute/relative URLs and localhost endpoints
if (/^https?:\/\//i.test(trimmed)) return true;
if (/^https?:\/\/[^\s]+$/i.test(trimmed)) return true;
Expand Down
4 changes: 2 additions & 2 deletions gui/src/app-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ export function canonicalHashPath(hash: string): string {
export const DASHBOARD_TAB_HASHES = ["dashboard/providers", "dashboard/models"] as const;

/**
* Models owns four tabs: the catalog, Combos, Routing, and Compatibility. The catalog
* Models owns five tabs: the catalog, Live routing, Combos, Routing, and Compatibility. The catalog
* is the bare `#models`, so it has no suffix entry here - same convention Dashboard
* uses for Overview and Logs uses for the log list.
*/
export const MODELS_TAB_HASHES = ["models/combos", "models/routing", "models/compatibility"] as const;
export const MODELS_TAB_HASHES = ["models/live", "models/combos", "models/routing", "models/compatibility"] as const;
/** Action deep link that opens the editable JEV Auto template in the Combos tab. */
export const JEV_AUTO_CREATE_HASH = "models/combos/jev-auto";

Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/de.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -136,6 +137,7 @@ export const de: Record<TKey, string> = {
...desktopCompatibilityCopy("de"),
...shellV2Copy("de"),
...codexCliUpdateCopy("de"),
...routeLiveCopy("de"),
...remoteLinkDiagnosticsCopy("de"),
...modelsV2Copy("de"),
...accountsV2Copy("de"),
Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/en.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -137,6 +138,7 @@ export const en = {
...desktopCompatibilityCopy("en"),
...shellV2Copy("en"),
...codexCliUpdateCopy("en"),
...routeLiveCopy("en"),
...remoteLinkDiagnosticsCopy("en"),
...modelsV2Copy("en"),
...accountsV2Copy("en"),
Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/fr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -135,6 +136,7 @@ export const fr: Record<TKey, string> = {
...desktopCompatibilityCopy("fr"),
...shellV2Copy("fr"),
...codexCliUpdateCopy("fr"),
...routeLiveCopy("fr"),
...remoteLinkDiagnosticsCopy("fr"),
...modelsV2Copy("fr"),
...accountsV2Copy("fr"),
Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/ja.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -135,6 +136,7 @@ export const ja: Record<TKey, string> = {
...desktopCompatibilityCopy("ja"),
...shellV2Copy("ja"),
...codexCliUpdateCopy("ja"),
...routeLiveCopy("ja"),
...remoteLinkDiagnosticsCopy("ja"),
...modelsV2Copy("ja"),
...accountsV2Copy("ja"),
Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/ko.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -135,6 +136,7 @@ export const ko: Record<TKey, string> = {
...desktopCompatibilityCopy("ko"),
...shellV2Copy("ko"),
...codexCliUpdateCopy("ko"),
...routeLiveCopy("ko"),
...remoteLinkDiagnosticsCopy("ko"),
...modelsV2Copy("ko"),
...accountsV2Copy("ko"),
Expand Down
2 changes: 2 additions & 0 deletions gui/src/i18n/pt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopCompatibilityCopy } from "./desktop-compatibility-copy";
import { shellV2Copy } from "./shell-v2-copy";
import { codexCliUpdateCopy } from "./codex-cli-update-copy";
import { routeLiveCopy } from "./route-live-copy";
import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy";
import { modelsV2Copy } from "./v2-pages/models-copy";
import { accountsV2Copy } from "./v2-pages/accounts-copy";
Expand Down Expand Up @@ -137,6 +138,7 @@ export const pt: Record<TKey, string> = {
...desktopCompatibilityCopy("pt"),
...shellV2Copy("pt"),
...codexCliUpdateCopy("pt"),
...routeLiveCopy("pt"),
...remoteLinkDiagnosticsCopy("pt"),
...modelsV2Copy("pt"),
...accountsV2Copy("pt"),
Expand Down
Loading
Loading