- docs/reference/derived-facts.json: the base merged a provider and the `jev` strategy (394
providers, 238 migrations, 22 strategies) and regenerated the README SVGs; the snapshot follows,
so the generators reproduce those SVGs byte for byte.
- docs/routing/AUTO-COMBO.md: the combo-matrix sentence said "all 21 public strategies" — a test
coverage statement, not the strategy total, but the count extractor reads it as one. The matrix
has no `jev` test, so "22" would be false; the sentence no longer carries a number.
- validate-release-green test: the --full-ci loop of the base computes the bucket with
`fullCiKindFor(g.id, results, g.kind)` and builds `gateEnv`; the wiring assertion follows.
- pr-mode strategy test: compares against the snapshot's strategy count instead of the fixture's.
The final verification found that the first real timestamped migration
would have turned three of the new tests red:
- the generator test checked the real directory with a fixed clock
(2026-11-13T12:00Z), so any real migration dated later read as "in the
future". It now uses one second after the newest real stamp;
- two gate e2e tests copied every real migration into their synthetic
bases, so the fixed synthetic stamps were no longer the newest. The
synthetic bases now take only the legacy NNN_ files.
Both files honor OMNIROUTE_TEST_MIGRATIONS_SOURCE_DIR and joined the guard
test that re-runs them against a copy holding a real timestamped migration.
Without the fix that guard fails on exactly those three tests.
The self-contained gate e2e copies src with dereference, so a symlinked
checkout can never receive the test's constants.ts writes.
--base-latest-tag:
- in a repository with no pure vX.Y.Z tag (the Enterprise one only carries
vX.Y.Z-ee.N tags) it compares with the newest -ee tag instead of failing;
- against a tag, every file since it is already merged, so the gate and the
checker (new --merged-base flag) say "fix forward with a new migration"
instead of "rename" or "new stamp".
MIGRATION_BASE_REF and MIGRATION_COMMUTATION_SCRIPT (test-only) are
documented in .env.example and ENVIRONMENT.md. CODEBASE_DOCUMENTATION.md
and two test messages no longer talk about sequential numbers. A stale
contract comment in migration-commutation.ts now names C1.
- scripts/release/facts.mjs: collectFacts/readCodeFactsResult classify a failed probe
(timeout, spawn, exit, parse) as an infrastructure error, never as documentation drift.
The 180 s hard timeout that turned a loaded host into a false red is now
OMNIROUTE_FACTS_TIMEOUT_MS (default 600 s). readCodeFacts() and the test seams keep
their old shape.
- The inline `node -e` probe becomes a real module (scripts/release/lib/code-facts-probe.mjs),
run under tsx in a subprocess. It forces a throwaway DATA_DIR before any import, so loading
the MCP tool modules can never open or migrate the operator's SQLite file.
- `npm run facts [-- --key=a.b] [--snapshot]` prints every derived number as JSON
(exit 2 on an infrastructure error).
- docs/reference/derived-facts.json: the facts as of the last refresh, serialized in a stable,
Prettier-identical layout. Generated artifacts and unit tests are judged against it; only
the release refresh and the nightly refresh PR write it.
The base added the expiry-first strategy (#17829) and the
CODE_ASSIST_INELIGIBLE_ONBOARD_LEGACY_TIER flag (#18060), so both sides
had moved the same counts.
- Strategies: the code registry now has 22 public strategies (expiry-first
and jev). AGENTS.md, open-sse/services/AGENTS.md, the bs AGENTS mirror,
AUTO-COMBO.md (table now has both rows), RESILIENCE_GUIDE.md and llm.txt
state 22. The other docs the expiry-first PR bumped to 21 now say 22
(README, CONTRIBUTING, ARCHITECTURE, FEATURES, OPEN_SSE_ARCHITECTURE,
REPOSITORY_MAP, CODEBASE_DOCUMENTATION, comparison, diagrams README,
request-pipeline, QUOTA_SHARE, RELEASE_CHECKLIST, tier-flow images).
README's strategy table gets a jev row. The README SVGs were regenerated
from their generators (comparison table, hero, tier cascade, strategies
grid).
- Flags: both sides' flags are kept (catalog total 125, Runtime 62).
featureFlagDefinitions.ts stays under the 1440-line cap: the System One
spread loses its comment and two blank lines are dropped.
- llm.txt i18n mirrors: same five count lines as the root (docs-sync).
- stryker.conf.json: list boundary-engine-seams.test.ts, which now covers
auth.ts and autoStrategy.ts (check:mutation-test-coverage --strict).
- strategy-registry test: CANONICAL is 22 public + quota-share = 23.
- connectionAwareExpansion.ts, check-fabricated-docs.mjs, stryker.conf.json:
both sides kept.
Brings the recut of #17920 up to release/v3.8.54 at 2f2c1957. The base
added Hetzner, Grokified, Replicate and Cerebrium (#19206) and moved the
canonical provider count 388 -> 393 on the same lines this branch bumps.
The 93 conflicted files were count-only (verified by masking digits). Each
conflict hunk keeps the release side; the merged tree then has 394
canonical providers (check:provider-consistency), so the provider total
was replayed 393 -> 394 on the lines check:docs-counts flags, the matching
llm.txt mirrors, the tier-flow SVGs and the README diagram generators.
Digit-only edits. PROVIDER_REFERENCE.md was regenerated with
gen:provider-reference and the README diagrams with docs:readme-diagrams.
The "Catalog-Marked Free" figure (153) and the README locale mirrors
(389) are left as the base has them; neither is gated and both were
already behind the code before this merge.
Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
Resolve the conflicts with the base, which added the
CODE_ASSIST_INELIGIBLE_ONBOARD_LEGACY_TIER flag (#18060) next to this
branch's PII_REVERSIBLE_VAULT_ENABLED flag:
- featureFlagDefinitions.ts: keep both module imports.
- feature-flags-settings / server-owned-tool-loop-flag tests: both flags
are counted, so the catalog total is 123.
- FEATURE_FLAGS.md: the catalog header and the API example now say 123.
PII_REDACTION_ENABLED and PII_RESPONSE_SANITIZATION still default to
"false" (Hard Rule 20).
Validated in the full merge-train on the .113 (lot 6, 2026-11-13): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Rafa Martins <rafacpti23@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 5, 2026-11-12): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Jowimila <127446097+jowimila@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 5, 2026-11-12): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: OpenCode (host) <opencode@kytranempowerment.com>
Validated in the full merge-train on the .113 (lot 5, 2026-11-12): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Dizzle <112548150+maxmad64bis@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 3b, 2026-11-12): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. The real ones trace to #18060 and #18604, which were fixed separately. The rest come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: serenity <295272363+serenity-X@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 3c, 2026-11-11): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Bl0ck <36800583+Bl0ck154@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 3c, 2026-11-11): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Rafa Martins <rafacpti23@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 3c, 2026-11-11): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change.
Co-authored-by: Cristiano M Bergamo <cmbergamo@outlook.com>
Validated in the full merge-train on the .113 (lot 2b, 2026-11-11): typecheck, static gates and the full unit suite. The remaining failures in that run come from the .113 root environment, the known base-red (#19329), or timing flakes under load. None trace back to this change.
Co-authored-by: serenity <295272363+serenity-X@users.noreply.github.com>
Validated in the full merge-train on the .113 (lot 2b, 2026-11-11): typecheck, static gates and the full unit suite. The remaining failures in that run come from the .113 root environment, the known base-red (#19329), or timing flakes under load. None trace back to this change.
Co-authored-by: serenity <295272363+serenity-X@users.noreply.github.com>
Both this branch (keenable-search) and release/v3.8.54 (#15201, chatgpt)
moved the canonical provider count 387 -> 388 on the same lines, so the merge
kept 388. The merged tree has 389 canonical providers
(check:provider-consistency). Digit-only edits on those lines (AGENTS.md,
llm.txt + mirrors, README + mirrors, skills, package.json, docs, generator
constants); PROVIDER_REFERENCE.md and the README diagrams regenerated with
gen:provider-reference and docs:readme-diagrams.
Resolve the count-only conflicts with #15201 (chatgpt): README and
ARCHITECTURE keep this branch's lines, the three generated README SVGs take
the base copy and are regenerated in the next commit.
Adds ChatGPT as its own OAuth provider through OpenAI's official Sign in with ChatGPT (SIWC) token-sharing flow and the public Responses API: a recognizable sign-in button, OpenAI's consent screen, an account-specific live model catalog, public Responses inference and usage management, without a separately created OpenAI API key or client secret.
Provider-count train, step 6: the branch was merged with the release tip after Codex Web Search (#17933). Both sides had raised the count from 386 to 387, so git kept identical lines; every count line was recounted to 388 (`gen:provider-reference`: 388 unique IDs, oauth=31): README and its 66 mirrors (Persian digits in `fa`), `llm.txt` and its 66 mirrors, AGENTS.md, skills, docs, `package.json` and the SVG generators. PROVIDER_REFERENCE and the README diagrams were regenerated. RESERVED_PREFIX_COUNT is 444 (443 on the base plus `chatgpt`). The `QuotaCard` conflict keeps the ChatGPT local-usage branch and the base's Cursor per-model usage. The PKCE challenge and the test owner fingerprints now go through `generateCodeChallenge` and `opaqueTokenFingerprint`, byte-identical to the inline SHA-256 they replace. Protected files differ from the tip only in digits. Validated with check:docs-counts, check:provider-consistency (388), the focused SIWC, usage UI, golden and count tests, lint and the full fast gates.
Both this branch (keenable-search) and release/v3.8.54 (#17933, codex-search)
bumped the canonical provider count 386 -> 387 on the same lines, so the merge
kept 387. The merged tree has 388 canonical providers
(check:provider-consistency). Digit-only edits on the lines either side bumped,
plus PROVIDER_REFERENCE.md regenerated with gen:provider-reference.
Resolve the Codex Web Search (#17933) collision: keep both keenable-search
and codex-search in the registry, aliases, handler imports and tests
(24 search providers, 8 fetch providers).
## Summary
Add **Settings → Resilience → Preferred account failover** with hot controls for all chat providers. The feature remains opt-in. Operators can set:
- Global default: **20,000 ms**
- Provider-specific response-start deadline (e.g., `codex`, `antigravity`)
- Exact model or family deadline (e.g., `anthropic/claude-opus-*`), which takes precedence over provider settings
- `0` override to disable preferred fast failover for a specific provider/model
The original built-in Antigravity heuristic is retained when not overridden: **5s** ordinarily and **12s** for Gemini 3.8 Flash, which can be slow to start. These values describe *upstream response start*, not first token/TTFT.
## Implementation
- Add a validated `preferredAccountFailover` section to the existing Resilience GET/PATCH API and sparse normalized settings.
- Retain partial-update semantics for scalar fields; override maps can be explicitly replaced/cleared.
- Key, length, count and 0-or-500..120000ms validation; UI can add/edit/remove provider and model overrides.
- Existing cached settings allow new requests to pick up dashboard changes without server restart (subject to the existing cache TTL).
- Additional tests cover persistence, defaults, partial updates, map deletion, and invalid payloads.
## Dependency / release safety
Stacked on #19258 (universal runtime policy), which depends on #19162 (trusted per-request response-start timeout). Please merge in that order; overlapping parent diff will disappear. Th
Thanks @Bl0ck154.
## Problem and behavior
The in-memory session map's TTL is hard-coded to 15 minutes. Deployments whose agent sessions legitimately live longer lose them from the active-session views (`/api/sessions`, telemetry summary, monitoring health) after 15 minutes, and the only way to change that today is a rebuild.
## Changes
- New env `OMNIROUTE_SESSION_TTL_MIN` (minutes), registered in `.env.example` and `docs/reference/ENVIRONMENT.md` (`check:env-doc-sync` clean).
- New shared resolver `open-sse/utils/ttlFromEnv.ts`; wiring in `open-sse/services/sessionManager.ts`.
- Fully opt-in: **default stays 15 — zero behavior change unless set.** Unset/blank/NaN/`<=0` all fall back to the default, so a typo can neither disable the TTL nor make it negative.
Thanks @jjxyxsjr.
## Problem and behavior
The global-attempts cap is calibrated for *fast* failures (429/5xx swap-outs costing seconds each). A stalled upstream that fails the stream-readiness window instead burns a full readiness window (tens of seconds to minutes) **and** a heavyweight body re-dispatch on every rotation — a handful of them multiplies user latency and gateway memory while the global cap still has plenty of headroom, and the combo keeps rotating through every remaining target against an upstream that will stall on all of them.
## Changes
- New pure helpers in `open-sse/services/combo/comboPredicates.ts`: `clampDeadlineFailureBudget` (env parse; unset/empty/`0`/invalid → `0` = disabled, the default; positive integer passes through, floored, clamped to the attempts hard cap — mirrors `clampGlobalAttempts`) and `isReadinessDeadlineFailure` (`status === 504` plus the stable `STREAM_READINESS_TIMEOUT` marker raised by `StreamReadinessReadTimeout`).
- `executeTargetAttempt.ts`: after a failed attempt is recorded, a readiness-deadline failure increments `state.deadlineFailures`; when the configured budget is exhausted the combo terminates with a clean 504 instead of rotating further.
- Counter added to `AttemptLoopState`, initialized alongside `fallbackCount`. Env documented in `.env.example` + `ENVIRONMENT.md`.
Thanks @jjxyxsjr.
Adds `codex-search` (alias `codex_search`), a fallback-only `/v1/search` provider that uses the built-in `web_search` tool through connected OpenAI Codex (ChatGPT) accounts, so no separate search-service key is needed. Normalizes observed sources and citations into standard search rows, bounds the stream to 4 MiB with cancellation, keeps search failures in a search-specific in-memory lock so they never touch the shared Codex connection's health, and records upstream token usage in call logs. `CODEX_SEARCH_AUTO_FALLBACK_ENABLED` (default off) controls whether automatic searches may use a Codex account. Closes#17925.
Provider-count train, step 5 of 5: the branch was merged with the release tip after deAPI (#19319), ParalonCloud (#18356), MegaBrain (#18129) and RenderHour (#18103). Count-only conflicts took the base text and were recounted to 387 (`gen:provider-reference`: 387 unique IDs, search=20): README and its 66 mirrors (Persian digits in `fa`), `llm.txt` and its 66 mirrors, AGENTS.md, skills, docs, `package.json`, the SVG generators and the tier-flow SVGs. PROVIDER_REFERENCE and the README diagrams were regenerated. The feature-flag count is 121 on the merged tree. Protected files differ from the tip only in digits. Validated with check:docs-counts, check:provider-consistency (387), the focused search, flag, golden and count tests, lint and the full fast gates.
Brings the recut of #17920 up to release/v3.8.54 at 8943ca61, which added
RenderHour (#18103) and moved the provider count 385 -> 386 in the same
count-only files this PR bumps. For those 93 files the release side was kept
and the PR's own +1 provider / +1 hasFree was replayed on top (387 providers,
154 hasFree, 20 search providers). PROVIDER_REFERENCE.md and the four README
diagrams were regenerated. Protected files change in digits only.
Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
Adds RenderHour (`renderhour`) as one dual-auth media provider for images, video and speech: subscription sign-in (authorization code + PKCE with the public client via `resolvePublicCred`, rotating refresh tokens) or an `rh_…` API key, both validated with `GET /v1/balance`. One shared client runs RenderHour's async job API (upload, `POST /v1/generations` with an Idempotency-Key, polling with back-off), with thin image, video and TTS handlers on top.
Provider-count train, step 4 of 5: the branch was merged with the release tip after deAPI (#19319), ParalonCloud (#18356) and MegaBrain (#18129). Count-only conflicts took the base text and were recounted to 386 (`gen:provider-reference`: 386 unique IDs): README and its 66 mirrors (Persian digits in `fa`), `llm.txt` and its 66 mirrors, AGENTS.md, skills, docs, `package.json`, the SVG generators and the tier-flow SVGs. PROVIDER_REFERENCE and the README diagrams were regenerated. The OAuth test-config and provider-list conflicts keep both MegaBrain and RenderHour. Protected files differ from the tip only in digits. Validated with check:docs-counts, check:provider-consistency (386), the focused provider, OAuth, refresh, public-creds, golden and count tests, lint and the full fast gates.
Brings the recut of #17920 up to release/v3.8.54 at 8e72dbf5. The base added
MegaBrain (#18129), which moved the provider count 384 -> 385 in the same
count-only files this PR bumps. For those 93 files the release side was kept
and the PR's own +1 provider / +1 hasFree was replayed on top (386 providers,
154 hasFree, 20 search providers). PROVIDER_REFERENCE.md and the four README
diagrams were regenerated. Protected files change in digits only.
Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
Adds MegaBrain (`megabrain`, alias `mb`) as one dual-auth chat provider wired like `kilocode`: subscription sign-in through Kilo's device-auth flow on api.getmegabrain.com, or an `mb-v1-…` API key. Requests carry `X-KILOCODE-FEATURE: omniroute` so they count against the plan limits. Includes live model discovery, connection test and key validation via `/api/profile/limits`, Provider Limits (session and weekly quotas), and an error-classifier branch that locks the model instead of banning the connection on MegaBrain's `plan_tier_required` / `extra_usage_off` 403s.
Provider-count train, step 3 of 5: the branch was merged with the release tip after deAPI (#19319) and ParalonCloud (#18356). Count-only conflicts took the base text and were recounted to 385 (`gen:provider-reference`: 385 unique IDs, oauth=29, apikey=258): README and its 66 mirrors (Persian digits in `fa`), `llm.txt` and its 66 mirrors, AGENTS.md, skills, docs, `package.json`, the SVG generators and the tier-flow SVGs. PROVIDER_REFERENCE and the README diagrams were regenerated. The registry conflict keeps both providers with megabrain still last, and RESERVED_PREFIX_COUNT is 443 (paraloncloud/paralon plus megabrain/mb). Protected files differ from the tip only in digits. Validated with check:docs-counts, check:provider-consistency (385), the focused provider, OAuth, golden and count tests, lint and the full fast gates.