mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-18 21:22:28 +03:00
* feat(admission): per-target lane-aware probes for combo/fusion fan-out (#9654 Wave 2)
Combo and fusion fan out N targets without ever consulting the adaptive-admission
layer: the parent request holds one lease, but each fan-out target is dispatched
unconditionally. With virtual lanes enabled (OMNIROUTE_CHAT_VIRTUAL_LANES=1), a
connection whose lane queue is full now SKIPS additional fan-out targets instead
of piling more queued work onto an already-congested session.
Adds PerTargetAdmissionHook (admission/types.ts) + createPerTargetAdmissionHook
factory (chatAdmission.ts): strictly non-blocking (maxWaitMs 0 - skip, never
queue), a no-op when virtual lanes are off, keyed to the parent tenantKey, and
release-on-admit so the probe is a capacity gate, not a hold.
Threaded through every parallel fan-out path:
- priority/weighted executeTarget + round-robin skip chains (combo.ts)
- fusion panel before fan-out (fusion.ts), judge fallback prefers survivors
- chaos parallel panel (autoCombo/chaosEngine.ts)
- tryFusionDispatch / tryRuntimeUnitDispatch / buildBaseOptions (dispatchPrelude.ts)
- chat.ts primary + safety-net redirect call sites
Snapshot exposes virtualLanes so the no-op gate is cheap and honest.
Tests: tests/unit/combo-lane-awareness-9654.test.ts (10 tests) - factory
semantics, priority/RR skip, fusion panel drop + all-skipped 503, no-hook
backward-compat baseline.
* feat(flags): activation UX - env-wins adaptive virtual-lanes flag + env docs (#9654 Wave 2)
U7: make adaptive virtual admission lanes discoverable + activatable.
- New OMNIROUTE_CHAT_VIRTUAL_LANES feature flag (boolean/runtime/requiresRestart) in featureFlagDefinitions + en.json i18n key.
- lib/admissionVirtualLanes.ts: env-wins resolver (env > DB > default) + boot warm folding a DB-sourced override into the process-global runtime env via reloadAdaptiveAdmissionRuntime(options.env) - no process.env mutation, no open-sse changes. Env still wins; DB toggle gates at next boot.
- GET /api/settings/feature-flags special-cases the flag to report the gate true source (ccDiscoveryAliases precedent); flagPayload helper dedupes the payload shape.
- Wire the warm into instrumentation-node registerNodejs (non-fatal, DB-ready).
- Document the master switch in .env.example + ENVIRONMENT.md with the system-1/system-2 distinction; zero new env-doc-sync drift.
- 11 new tests (resolver precedence + warm); 60/60 across feature-flag suites; typecheck core clean; ESLint + doc gates green.
* feat(mcp): surface adaptive admission lane data in omniroute_get_health (#9654 Wave 2)
U8: make adaptive virtual-lane admission visible to agents via the MCP health tool. handleGetHealth now surfaces a curated adaptiveAdmission block from the health payload (which already carried the runtime snapshot but was dropping it): virtualLanes/pressure/utilization/laneCount/laneQueuedCount/laneQueuedCost, laneTenants capped at top-10 by queued cost, admitted/rejected/wouldReject counts, shutdown. Block omitted entirely when the health endpoint reports none.
isLaneFlagOn mirrors the runtime 1|true convention so a string serialization can never invert a boolean lane report. getHealthOutput schema extended with the matching optional shape; tool description updated.
4 new dispatch tests (full block, top-10 cap/order, omission, defensive coercion of string flags + malformed lane entries) - 22/22 in essentialTools.test.ts. README: Adaptive Admission Lane Data table + Skills & Tool Navigability audit (29/43 schema entries covered, 14 undocumented, tool_search keyword runtime discovery, full catalog in docs/frameworks/MCP-SERVER.md).
No new lint errors (4 pre-existing in server.ts), typecheck core clean, doc counts + fabricated-docs gates green.
* docs: add changelog entry for #9654 Wave 2 (#10039)
* fix(codeql): suppress js/insufficient-password-hash false positive in lane-key fingerprinting (#10039)
resolveSessionId sha256-hashes bearer/x-api-key/x-goog-api-key to derive a deterministic, non-reversible per-key lane-bucket ID for virtual admission lanes (#9654). This is not password storage or verification, so the rule is a false positive; suppress it inline (same house style as src/lib/sync/tokens.ts) to clear the codeqlAlerts ratchet (2 > baseline 1) that blocks #10039 and every PR against release/v3.8.50.
* docs(mcp): complete MCP server README tool reference (#10039)
The MCP server README covered only 29 of the 43 schema entries, listing the
remaining tools solely as a gap note with omniroute_tool_search as the runtime
fallback. Add tool-reference tables for the agent-skills trio, oneproxy trio,
web_fetch/web_search, tool_search, create_combo, set_routing_strategy,
pick_fastest_model, sync_pricing, and db_health_check so the README covers the
full schemas catalog, and fold the coverage note into the tool_search discovery
paragraph.
* fix(chat): drop unused correlationId from safety-net combo redirect (#10039)
handleComboChat's HandleComboChatOptions has no correlationId member and
the combo pipeline never consumes it; the property was copied from the
handleSingleModelChat options shape by accident and introduced a new
TS2353 under the open-sse workspace typecheck gate.
* fix(i18n): translate featureFlagChatVirtualLanesEnabledDescription into 42 locales (#10039)
en.json gained the flag description in this PR but the locale catalogs
were never mirrored, failing the pt-BR key-parity (#6695) and vi
completeness gates. Adds a real translation to every locale, keeping the
zh-CN/zh-TW glossary canonical terms (提供者/儀表板) and no ICU drift.
* chore(quality): ratchet open-sse-typecheck baseline down (#10039)
The Wave 2 admission refactor removed 66 baselined open-sse type errors;
re-freeze the baseline so the gate pins the new, tighter state.
* docs: resync provider reference to 341 and CLI tools to 34
The release branch gained an 11th no-auth provider (freeaiapikey registry
resync, #10233) and a 26th CLI Code tool without regenerating the
auto-generated docs, leaving every PR against release/v3.8.50 failing the
Docs Gates strict validator (code 341 vs doc 340, CLI 34 vs "33 tools").
Regenerate docs/reference/PROVIDER_REFERENCE.md and sync the provider/tool
counts across README.md, AGENTS.md, llm.txt plus 42 i18n mirrors,
package.json description, and the four diagram SVGs.
* fix(tests): align count expectations with live catalogs (pre-existing release drift)
Release/v3.8.50 currently fails five gates on its own tree; this PR inherits
them. Fix the stale expectations to match live code:
- feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES)
- cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none)
- optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump #10382)
- stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test
- check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential)
* fix(tests): follow release's onnxruntime-node revert to ~1.24.3
release/v3.8.50's #10543 pinned onnxruntime-node back to ~1.24.3 after
#10403's ~1.27.0 bump caused npm to nest a second native copy under
@huggingface/transformers and broke the Docker SONAME contract. This
PR's own drift-alignment commit (57b9c033) predates that revert and
still expected ~1.27.0; the 3-way merge did not flag it as a textual
conflict since only one side touched this exact line, but the merged
tree became internally inconsistent (package.json ~1.24.3 vs test
expecting ~1.27.0). Align the test with the now-canonical release
value.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* fix(quality): dedupe stryker.conf.json chatcore-header-drop-warn-dedupe entry
The 3-way merge applied both sides' insertion of the same test-file entry
at different positions, producing a duplicate with broken indentation.
Adopted release's clean version of the file.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
---------
Co-authored-by: Brandon Bennett <brandonbennett@macbookair.myfiosgateway.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: Brandon Bennett <branben@users.noreply.github.com>
607 lines
22 KiB
TypeScript
607 lines
22 KiB
TypeScript
export interface FeatureFlagDefinition {
|
|
key: string;
|
|
label: string;
|
|
description: string;
|
|
descriptionI18nKey: string;
|
|
category: "security" | "network" | "policies" | "runtime" | "cli" | "health";
|
|
defaultValue: string;
|
|
type: "boolean" | "enum";
|
|
enumValues?: string[];
|
|
requiresRestart: boolean;
|
|
warningLevel?: "info" | "caution" | "danger";
|
|
}
|
|
|
|
export const FEATURE_FLAG_DEFINITIONS: FeatureFlagDefinition[] = [
|
|
// ──────────────── Security (10) ────────────────
|
|
{
|
|
key: "REQUIRE_API_KEY",
|
|
label: "Require API Key",
|
|
description: "Require an API key for all incoming requests",
|
|
descriptionI18nKey: "featureFlagRequireApiKeyDescription",
|
|
category: "security",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "INPUT_SANITIZER_ENABLED",
|
|
label: "Input Sanitizer",
|
|
description: "Enable input sanitization for all requests",
|
|
descriptionI18nKey: "featureFlagInputSanitizerEnabledDescription",
|
|
category: "security",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "INJECTION_GUARD_MODE",
|
|
label: "Injection Guard Mode",
|
|
description: "Set the prompt injection guard mode",
|
|
descriptionI18nKey: "featureFlagInjectionGuardModeDescription",
|
|
category: "security",
|
|
defaultValue: "off",
|
|
type: "enum",
|
|
enumValues: ["off", "warn", "block", "redact"],
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "PII_REDACTION_ENABLED",
|
|
label: "PII Redaction",
|
|
description: "Redact personally identifiable information from requests",
|
|
descriptionI18nKey: "featureFlagPiiRedactionEnabledDescription",
|
|
category: "security",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "PII_RESPONSE_SANITIZATION",
|
|
label: "PII Response Sanitization",
|
|
description: "Sanitize PII from provider responses",
|
|
descriptionI18nKey: "featureFlagPiiResponseSanitizationDescription",
|
|
category: "security",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "PII_RESPONSE_SANITIZATION_MODE",
|
|
label: "PII Response Sanitization Mode",
|
|
description:
|
|
"Mode for PII response sanitization: redact (replace PII), warn (log only), block (reject), off (disable)",
|
|
descriptionI18nKey: "featureFlagPiiResponseSanitizationModeDescription",
|
|
category: "security",
|
|
defaultValue: "redact",
|
|
type: "enum",
|
|
enumValues: ["redact", "warn", "block", "off"],
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OUTBOUND_SSRF_GUARD_ENABLED",
|
|
label: "SSRF Guard",
|
|
description: "Block outbound requests to private/internal IP ranges",
|
|
descriptionI18nKey: "featureFlagOutboundSsrfGuardEnabledDescription",
|
|
category: "security",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "ALLOW_API_KEY_REVEAL",
|
|
label: "API Key Reveal",
|
|
description:
|
|
"Allow authenticated dashboard users to reveal stored API keys instead of only seeing masked values.",
|
|
descriptionI18nKey: "featureFlagAllowApiKeyRevealDescription",
|
|
category: "security",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "danger",
|
|
},
|
|
{
|
|
key: "AUTH_LOG_INCLUDE_ACCOUNT_ID",
|
|
label: "Log Account IDs",
|
|
description:
|
|
"Include the account ID prefix in AUTH log lines (e.g. \"Using <provider> account: abc12345...\"). " +
|
|
"Disabled by default so the account identifier is redacted in shared/multi-tenant process logs. " +
|
|
"Independent of Debug Mode — flipping Debug Mode on does not reveal this.",
|
|
descriptionI18nKey: "featureFlagAuthLogIncludeAccountIdDescription",
|
|
category: "security",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
// ──────────────── Network (7) ────────────────
|
|
{
|
|
key: "ENABLE_TLS_FINGERPRINT",
|
|
label: "TLS Fingerprint",
|
|
description: "Enable TLS fingerprint stealth mode",
|
|
descriptionI18nKey: "featureFlagEnableTlsFingerprintDescription",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "AUDIO_REMOTE_PROVIDER_NODES",
|
|
label: "Remote Audio Provider Nodes",
|
|
description:
|
|
"Allow the /v1/audio/* routes to use OpenAI-compatible provider nodes hosted outside localhost. Off by default — routing audio to a remote host changes egress identity and must be an explicit operator decision. Loopback nodes are always allowed and unaffected.",
|
|
descriptionI18nKey: "settings.featureFlags.audioRemoteProviderNodes",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "danger",
|
|
},
|
|
{
|
|
key: "ONEPROXY_ENABLED",
|
|
label: "OneProxy Enabled",
|
|
description: "Enable 1proxy request proxying.",
|
|
descriptionI18nKey: "settings.featureFlags.oneproxyEnabled",
|
|
category: "network",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "PROXY_AUTO_SELECT_ENABLED",
|
|
label: "Proxy Auto-Selection Fallback",
|
|
description:
|
|
"When no proxy is assigned to a connection, auto-select the first working proxy from the registry. Off by default — otherwise any single registry proxy becomes a global fallback for all traffic (#3332).",
|
|
descriptionI18nKey: "settings.featureFlags.proxyAutoSelectEnabled",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_CONTROL_PLANE_PROXY_DIRECT_FALLBACK",
|
|
label: "Control-Plane Proxy Direct Fallback",
|
|
description:
|
|
"Allow OAuth and provider validation flows to bypass a pinned proxy and connect directly when proxy reachability pre-checks fail. Off by default because this can change account egress IP.",
|
|
descriptionI18nKey: "featureFlagOmnirouteControlPlaneProxyDirectFallbackDescription",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "danger",
|
|
},
|
|
{
|
|
key: "NETWORK_ROTATION_SHARED_EGRESS_GUARD",
|
|
label: "Network Rotation Shared-Egress Guard",
|
|
description:
|
|
"On a network exception (timeout, connection refused/reset) for a multi-account rotation executor, when the failing account has no dedicated proxy, apply a short cooldown and skip other proxy-less accounts for the rest of the request instead of retrying each one. On by default (safe: no egress IP change, only reduces latency/cooldown risk on shared-egress accounts). Disable to restore immediate propagation on the first proxy-less throw.",
|
|
descriptionI18nKey: "featureFlagNetworkRotationSharedEgressGuardDescription",
|
|
category: "network",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "MITM_DISABLE_TLS_VERIFY",
|
|
label: "Disable TLS Verify (MITM)",
|
|
description: "Disable TLS certificate verification for MITM proxy",
|
|
descriptionI18nKey: "featureFlagMitmDisableTlsVerifyDescription",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "danger",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_ALLOW_PRIVATE_PROVIDER_URLS",
|
|
label: "Allow Private Provider URLs",
|
|
description: "Allow provider URLs pointing to private/internal networks",
|
|
descriptionI18nKey: "featureFlagOmnirouteAllowPrivateProviderUrlsDescription",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_ALLOW_LOCAL_PROVIDER_URLS",
|
|
label: "Allow Local Provider URLs",
|
|
description:
|
|
"Allow adding and validating providers on local/private addresses (127.0.0.1, localhost, LAN, private IP ranges) — needed for local OpenAI-compatible models. Enabled by default (OmniRoute is local-first); turn it OFF to enforce strict public-only blocking if you only use public providers. Cloud-metadata endpoints (e.g. 169.254.169.254) stay blocked either way.",
|
|
descriptionI18nKey: "featureFlagOmnirouteAllowLocalProviderUrlsDescription",
|
|
category: "network",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "ENABLE_CC_COMPATIBLE_PROVIDER",
|
|
label: "CC Compatible Provider",
|
|
description: "Enable Claude Code compatible provider mode",
|
|
descriptionI18nKey: "featureFlagEnableCcCompatibleProviderDescription",
|
|
category: "network",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
|
|
// ──────────────── Policies (4) ────────────────
|
|
{
|
|
key: "TOOL_POLICY_MODE",
|
|
label: "Tool Policy Mode",
|
|
description: "Set the tool use policy enforcement mode",
|
|
descriptionI18nKey: "featureFlagToolPolicyModeDescription",
|
|
category: "policies",
|
|
defaultValue: "disabled",
|
|
type: "enum",
|
|
enumValues: ["disabled", "warn", "block"],
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "RATE_LIMIT_AUTO_ENABLE",
|
|
label: "Rate Limit Auto-Enable",
|
|
description: "Automatically enable rate limiting based on usage patterns",
|
|
descriptionI18nKey: "featureFlagRateLimitAutoEnableDescription",
|
|
category: "policies",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "ALLOW_MULTI_CONNECTIONS_PER_COMPAT_NODE",
|
|
label: "Multi Connections per Compat Node",
|
|
description: "Allow multiple connections per compatibility node",
|
|
descriptionI18nKey: "featureFlagAllowMultiConnectionsPerCompatNodeDescription",
|
|
category: "policies",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "CAPABILITY_FILTER_ENABLED",
|
|
label: "Capability Filter",
|
|
description:
|
|
"Reject requests before dispatch when the target model lacks required capabilities (vision, tools, structured output, context window). Protects direct single-provider requests that bypass the combo-layer compatibility filter.",
|
|
descriptionI18nKey: "featureFlagCapabilityFilterEnabledDescription",
|
|
category: "policies",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "RADAR_ENABLED",
|
|
label: "Radar",
|
|
description:
|
|
"Enable the OmniRoute Radar module (catalog feed screens and sync). Off by default; enabling only unlocks the UI — data sync remains a separate opt-in.",
|
|
descriptionI18nKey: "featureFlagRadarEnabledDescription",
|
|
category: "policies",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
|
|
// ──────────────── Runtime (16) ────────────────
|
|
{
|
|
key: "RESPONSES_PASSTHROUGH_DROP_COMMENTARY",
|
|
label: "Drop Responses Commentary",
|
|
description:
|
|
"Drop internal commentary-phase output items from Responses API passthrough streams before forwarding to clients. Disable to receive raw upstream commentary.",
|
|
descriptionI18nKey: "featureFlagResponsesPassthroughDropCommentaryDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_MCP_ENFORCE_SCOPES",
|
|
label: "MCP Enforce Scopes",
|
|
description: "Enforce scope restrictions on MCP tool access",
|
|
descriptionI18nKey: "featureFlagOmnirouteMcpEnforceScopesDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_MCP_COMPRESS_DESCRIPTIONS",
|
|
label: "MCP Compress Descriptions",
|
|
description: "Compress MCP tool descriptions to reduce token usage",
|
|
descriptionI18nKey: "featureFlagOmnirouteMcpCompressDescriptionsDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_ENABLE_RUNTIME_BACKGROUND_TASKS",
|
|
label: "Runtime Background Tasks",
|
|
description: "Enable background task processing at runtime",
|
|
descriptionI18nKey: "featureFlagOmnirouteEnableRuntimeBackgroundTasksDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_DISABLE_BACKGROUND_SERVICES",
|
|
label: "Disable Background Services",
|
|
description: "Disable all background services (quota refresh, sync, etc)",
|
|
descriptionI18nKey: "featureFlagOmnirouteDisableBackgroundServicesDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_RTK_TRUST_PROJECT_FILTERS",
|
|
label: "RTK Trust Project Filters",
|
|
description: "Trust project-level filters from RTK without validation",
|
|
descriptionI18nKey: "featureFlagOmnirouteRtkTrustProjectFiltersDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_ENABLE_LIVE_WS",
|
|
label: "Live Dashboard WebSocket",
|
|
description:
|
|
"Start the real-time dashboard WebSocket server on import (port 20132, loopback-bound by default). Default: enabled. Set to '0' or 'false' to disable. LAN exposure requires LIVE_WS_HOST=0.0.0.0 + LIVE_WS_ALLOWED_ORIGINS.",
|
|
descriptionI18nKey: "featureFlagOmnirouteEnableLiveWsDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_CODEX_WS_ENABLED",
|
|
label: "Codex Responses WebSocket",
|
|
description:
|
|
"Allow Codex to use the Responses-over-WebSocket transport (the codex CLI WS endpoint and codexTransport=websocket). When off, Codex falls back to HTTP Responses.",
|
|
descriptionI18nKey: "featureFlagOmnirouteCodexWsEnabledDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_EMERGENCY_FALLBACK",
|
|
label: "Emergency Fallback",
|
|
description: "Route budget-exhausted requests to the emergency free fallback provider/model.",
|
|
descriptionI18nKey: "featureFlagOmnirouteEmergencyFallbackDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "STREAM_RECOVERY_ENABLED",
|
|
label: "Stream Recovery",
|
|
description:
|
|
"Enable transparent early retry for truncated upstream SSE streams before any response bytes reach the client.",
|
|
descriptionI18nKey: "featureFlagStreamRecoveryEnabledDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "STREAM_RECOVERY_MIDSTREAM_ENABLED",
|
|
label: "Mid-Stream Continuation",
|
|
description:
|
|
"Allow stream recovery to re-request and stitch a response after bytes have already reached the client.",
|
|
descriptionI18nKey: "featureFlagStreamRecoveryMidstreamEnabledDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "danger",
|
|
},
|
|
{
|
|
key: "MODEL_CATALOG_INCLUDE_NAMES",
|
|
label: "Model Catalog Names",
|
|
description:
|
|
"Include display-friendly name fields in /v1/models responses. Disable for clients that expect model IDs only.",
|
|
descriptionI18nKey: "settings.featureFlags.modelCatalogIncludeNames",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "MODELS_CATALOG_PREFIX_MODE",
|
|
label: "Models Catalog Prefix Mode",
|
|
description:
|
|
"Controls how model IDs are prefixed in /v1/models. 'dual' (default) emits both alias and canonical provider-id prefixes for backward compatibility. 'alias' emits only the short alias prefix (e.g. ds-web/model, not deepseek-web/model). 'canonical' emits only the full provider-id prefix.",
|
|
descriptionI18nKey: "featureFlagModelsCatalogPrefixModeDescription",
|
|
category: "runtime",
|
|
defaultValue: "dual",
|
|
type: "enum",
|
|
enumValues: ["dual", "alias", "canonical"],
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "ARENA_ELO_SYNC_ENABLED",
|
|
label: "Arena ELO Sync",
|
|
description: "Enable periodic Arena AI leaderboard ELO sync for model intelligence rankings.",
|
|
descriptionI18nKey: "featureFlagArenaEloSyncEnabledDescription",
|
|
category: "runtime",
|
|
defaultValue: "true",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "EXPOSE_CC_DISCOVERY_ALIASES",
|
|
label: "Claude Code Discovery Aliases",
|
|
description:
|
|
"Advertise claude/<provider>/<model> mirror ids on /v1/models so Claude Code gateway model discovery lists non-Claude models. Warning: doubles catalog entries for all clients when enabled globally.",
|
|
descriptionI18nKey: "featureFlagExposeCcDiscoveryAliasesDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_CHAT_VIRTUAL_LANES",
|
|
label: "Adaptive Virtual Admission Lanes",
|
|
description:
|
|
"Enable per-tenant adaptive virtual admission lanes for provider dispatch (#9654): one tenant's burst no longer 503s another. The OMNIROUTE_CHAT_VIRTUAL_LANES env var wins over this dashboard override; changes take effect at server restart.",
|
|
descriptionI18nKey: "featureFlagChatVirtualLanesEnabledDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "EXPOSE_FUNCTIONAL_GATEWAY_MIRRORS",
|
|
label: "Functional Gateway Mirrors",
|
|
description:
|
|
"Advertise <gateway-alias>/<model> mirror ids on /v1/models for models whose canonical owner has no active credential but a passthrough gateway with an active credential routes them. Warning: adds catalog entries for all clients when enabled globally.",
|
|
descriptionI18nKey: "featureFlagExposeFunctionalGatewayMirrorsDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
|
|
{
|
|
key: "NEWAPI_AGGREGATOR_BALANCE",
|
|
label: "New-API Aggregator Balance",
|
|
description:
|
|
"Enable balance detection for New-API / One-API / Sub2API aggregator compatible nodes. When enabled, compatible nodes with the aggregator flag set will report their balance in the dashboard and quota-preflight routing.",
|
|
descriptionI18nKey: "featureFlagNewApiAggregatorBalanceDescription",
|
|
category: "runtime",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
|
|
// ──────────────── CLI (5) ────────────────
|
|
{
|
|
key: "CLI_COMPAT_ALL",
|
|
label: "CLI Compat All",
|
|
description: "Enable compatibility mode for all CLI clients",
|
|
descriptionI18nKey: "featureFlagCliCompatAllDescription",
|
|
category: "cli",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: true,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "MODEL_ALIAS_COMPAT_ENABLED",
|
|
label: "Model Alias Compat",
|
|
description: "Enable model alias compatibility layer",
|
|
descriptionI18nKey: "featureFlagModelAliasCompatEnabledDescription",
|
|
category: "cli",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "PRICING_SYNC_ENABLED",
|
|
label: "Pricing Sync",
|
|
description:
|
|
"Enable automatic pricing data synchronization (requires the PRICING_SYNC_ENABLED environment variable to be set to true)",
|
|
descriptionI18nKey: "featureFlagPricingSyncEnabledDescription",
|
|
category: "cli",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_AUTO_SYNC_CODEX_PROFILES",
|
|
label: "Auto-Sync Codex Profiles",
|
|
description:
|
|
"After a provider model sync, automatically (re)write ~/.codex/*.config.toml profile files from the live catalog. Never changes the active/default Codex config. Off by default.",
|
|
descriptionI18nKey: "featureFlagOmnirouteAutoSyncCodexProfilesDescription",
|
|
category: "cli",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_AUTO_SYNC_CLAUDE_PROFILES",
|
|
label: "Auto-Sync Claude Code Profiles",
|
|
description:
|
|
"After a provider model sync, automatically (re)write ~/.claude/profiles/<name>/settings.json Claude Code profiles from the live catalog. Never changes the active/default Claude config. Off by default.",
|
|
descriptionI18nKey: "featureFlagOmnirouteAutoSyncClaudeProfilesDescription",
|
|
category: "cli",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
|
|
// ──────────────── Health (3) ────────────────
|
|
{
|
|
key: "OMNIROUTE_DISABLE_LOCAL_HEALTHCHECK",
|
|
label: "Disable Local Health Check",
|
|
description: "Disable the local instance health check endpoint",
|
|
descriptionI18nKey: "featureFlagOmnirouteDisableLocalHealthcheckDescription",
|
|
category: "health",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "OMNIROUTE_DISABLE_TOKEN_HEALTHCHECK",
|
|
label: "Disable Token Health Check",
|
|
description: "Disable the token validation health check",
|
|
descriptionI18nKey: "featureFlagOmnirouteDisableTokenHealthcheckDescription",
|
|
category: "health",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "info",
|
|
},
|
|
{
|
|
key: "SKILLS_SANDBOX_NETWORK_ENABLED",
|
|
label: "Skills Sandbox Network",
|
|
description: "Enable network access in the skills sandbox environment",
|
|
descriptionI18nKey: "featureFlagSkillsSandboxNetworkEnabledDescription",
|
|
category: "health",
|
|
defaultValue: "false",
|
|
type: "boolean",
|
|
requiresRestart: false,
|
|
warningLevel: "caution",
|
|
},
|
|
];
|