mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 13:22:11 +03:00
Release v3.8.32 — see CHANGELOG.md [3.8.32] for the full list. Merged via --admin over documented non-blocking checks: CodeQL alerts ratchet (#665 fixed by #4457/#4462, auto-closes on main rescan), Integration Tests (env-flaky batch-upstream), SonarCloud/SonarQube (advisory new-code).
82 lines
2.5 KiB
TypeScript
82 lines
2.5 KiB
TypeScript
import type { HideableSidebarGroupId } from "@/shared/constants/sidebarGroupVisibility";
|
|
import type {
|
|
HideableSidebarItemId,
|
|
SidebarItemOrder,
|
|
SidebarPresetId,
|
|
SidebarSectionId,
|
|
} from "@/shared/constants/sidebarVisibility";
|
|
import type { ResilienceSettings } from "@/lib/resilience/settings";
|
|
import type {
|
|
AccountFallbackStrategyValue,
|
|
RoutingStrategyValue,
|
|
} from "@/shared/constants/routingStrategies";
|
|
|
|
/**
|
|
* Application settings stored in SQLite key-value pairs.
|
|
*/
|
|
export interface Settings {
|
|
requireLogin: boolean;
|
|
hasPassword: boolean;
|
|
fallbackStrategy: AccountFallbackStrategyValue;
|
|
stickyRoundRobinLimit: number;
|
|
requestRetry: number;
|
|
maxRetryIntervalSec: number;
|
|
maxBodySizeMb?: number;
|
|
jwtSecret?: string;
|
|
mcpEnabled?: boolean;
|
|
mcpTransport?: "stdio" | "sse" | "streamable-http";
|
|
a2aEnabled?: boolean;
|
|
hideHealthCheckLogs?: boolean;
|
|
hideEndpointCloudflaredTunnel?: boolean;
|
|
hideEndpointTailscaleFunnel?: boolean;
|
|
hideEndpointNgrokTunnel?: boolean;
|
|
preferClaudeCodeForUnprefixedClaudeModels?: boolean;
|
|
autoRefreshProviderQuota?: boolean;
|
|
autoRefreshProviderQuotaInterval?: number;
|
|
pinProviderQuotaToHome?: boolean;
|
|
showQuickStartOnHome?: boolean;
|
|
showProviderTopologyOnHome?: boolean;
|
|
hiddenSidebarItems?: HideableSidebarItemId[];
|
|
hiddenSidebarGroupLabels?: HideableSidebarGroupId[];
|
|
sidebarSectionOrder?: SidebarSectionId[];
|
|
sidebarItemOrder?: SidebarItemOrder;
|
|
sidebarActivePreset?: SidebarPresetId;
|
|
resilienceSettings?: ResilienceSettings;
|
|
// LOCAL_ONLY manage-scope bypass policy (DB-stored, hot-reloaded by
|
|
// `applyRuntimeSettings` → `applyAuthzBypassSection`). The route guard
|
|
// consults `getAuthzBypassSnapshot()` on the hot path; these fields are
|
|
// the persisted source of truth that feeds that snapshot.
|
|
localOnlyManageScopeBypassEnabled?: boolean;
|
|
localOnlyManageScopeBypassPrefixes?: string[];
|
|
}
|
|
|
|
export interface ComboDefaults {
|
|
strategy: RoutingStrategyValue;
|
|
maxRetries: number;
|
|
retryDelayMs: number;
|
|
fallbackDelayMs?: number;
|
|
maxComboDepth: number;
|
|
trackMetrics: boolean;
|
|
reasoningTokenBufferEnabled?: boolean;
|
|
concurrencyPerModel?: number;
|
|
queueTimeoutMs?: number;
|
|
queueDepth?: number;
|
|
handoffThreshold?: number;
|
|
handoffModel?: string;
|
|
handoffProviders?: string[];
|
|
maxMessagesForSummary?: number;
|
|
}
|
|
|
|
export interface ProxyConfig {
|
|
type: "http" | "https" | "socks5";
|
|
host: string;
|
|
port: number;
|
|
username?: string;
|
|
password?: string;
|
|
}
|
|
|
|
export interface KVPair {
|
|
key: string;
|
|
value: string;
|
|
}
|