mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-23 07:32:20 +03:00
feat(routing): add DISABLE_CONTEXT_WINDOW_CHECKS bypass for the direct-request input/context check (#10927)
Rescoped from #10606 — see PR body for the full rationale (combo-routing half made moot by #10162's advisory-only architecture, chatCore.ts hard-reject bypass retains real value). Validated in an isolated worktree boarded onto origin/release/v3.8.50: - 65/65 focused unit tests pass (chatcore-model-output-cap-wiring + feature-flags-settings). - check-file-size, check-changelog-integrity: OK. - typecheck:core: clean. - check-complexity / check-cognitive-complexity: OK, both under baseline. Co-authored-by: JxnLexn <10897478+JxnLexn@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
118840131d
commit
f71f3da08b
@@ -72,6 +72,22 @@ export function isCcCompatibleProviderEnabled(): boolean {
|
||||
return isFeatureFlagEnabled("ENABLE_CC_COMPATIBLE_PROVIDER");
|
||||
}
|
||||
|
||||
/**
|
||||
* Context-window checks are fail-safe: an unavailable flag store must never
|
||||
* silently disable local request bounds.
|
||||
*/
|
||||
export function areContextWindowChecksDisabled(): boolean {
|
||||
try {
|
||||
return isFeatureFlagEnabled("DISABLE_CONTEXT_WINDOW_CHECKS");
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"[featureFlags] Failed to resolve DISABLE_CONTEXT_WINDOW_CHECKS, keeping checks enabled:",
|
||||
error instanceof Error ? error.message : error
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function isApiKeyRevealEnabledFlag(): boolean {
|
||||
try {
|
||||
return isFeatureFlagEnabled("ALLOW_API_KEY_REVEAL");
|
||||
|
||||
Reference in New Issue
Block a user