/** * RouteCodex 统一常量定义 * 所有硬编码值应在此处集中管理 */ export declare const API_ENDPOINTS: { readonly OPENAI: "https://api.openai.com/v1"; readonly OPENAI_BASE: "https://api.openai.com"; readonly ANTHROPIC: "https://api.anthropic.com"; }; export declare const LOCAL_HOSTS: { readonly IPV4: "127.0.0.1"; readonly IPV6: "::1"; readonly LOCALHOST: "localhost"; readonly IPV4_MAPPED_IPV6: "::ffff:127.0.0.1"; readonly ANY: "0.0.0.0"; }; export declare const DEFAULT_CONFIG: { readonly HOST: "127.0.0.1"; readonly PORT: 5506; readonly TIMEOUT: 30000; readonly OAUTH_CALLBACK_PORT: 8080; readonly OAUTH_CALLBACK_HOST: "localhost"; readonly LM_STUDIO_HOST: "localhost"; readonly LM_STUDIO_PORT: 1234; }; export declare const DEFAULT_TIMEOUTS: { readonly PROVIDER_STREAM_HEADERS_CAP_MS: 900000; readonly PROVIDER_STREAM_IDLE_CAP_MS: 900000; readonly HTTP_SSE_IDLE_MS: 900000; readonly HTTP_SSE_TOTAL_MS: 900000; }; export declare const HTTP_PROTOCOLS: { readonly HTTP: "http://"; readonly HTTPS: "https://"; }; export declare const API_PATHS: { readonly OPENAI_CHAT: "/v1/chat/completions"; readonly OPENAI_COMPLETIONS: "/v1/completions"; readonly OPENAI_MODELS: "/v1/models"; readonly ANTHROPIC_MESSAGES: "/v1/messages"; readonly HEALTH: "/health"; readonly SHUTDOWN: "/shutdown"; readonly CONFIG: "/config"; readonly OAUTH_CALLBACK: "/oauth2callback"; }; export declare const DEFAULT_PROVIDER: { readonly USER_AGENT: "codex_cli_rs/0.73.0 (Mac OS 15.6.1; arm64) iTerm.app/3.6.5"; readonly TIMEOUT_MS: 240000; readonly MAX_RETRIES: 3; readonly STREAM_IDLE_TIMEOUT_MS: 900000; readonly STREAM_HEADERS_TIMEOUT_MS: 900000; }; export declare const DEFAULT_TOKEN_DAEMON: { readonly INTERVAL_MS: 60000; readonly REFRESH_AHEAD_MINUTES: 30; readonly MIN_REFRESH_INTERVAL_MS: number; readonly ANTIGRAVITY_METADATA_ENSURE_INTERVAL_MS: number; }; export declare const DEFAULT_PIPELINE_HEALTH: { readonly CHECK_INTERVAL_MS: number; readonly MAX_CONSECUTIVE_ERRORS: 3; readonly ERROR_THRESHOLD: 5; readonly SUCCESS_THRESHOLD: 3; readonly RECOVERY_INTERVAL_MS: number; readonly CHECK_TIMEOUT_MS: number; }; export declare const DEFAULT_KEY_429_TRACKER: { readonly MAX_CONSECUTIVE_ERRORS: 3; readonly MIN_INTERVAL_MS: number; readonly BLACKLIST_DURATION_MS: number; readonly CLEANUP_INTERVAL_MS: number; readonly MAX_RECORD_AGE_MS: number; }; export declare const PROVIDER_CACHE: { readonly MAX_INSTANCES: 100; readonly INSTANCE_ID_HASH_LENGTH: 16; }; export declare const CODEX_IDENTIFIER_MAX_LENGTH = 64; export type ApiEndpoint = typeof API_ENDPOINTS[keyof typeof API_ENDPOINTS]; export type LocalHost = typeof LOCAL_HOSTS[keyof typeof LOCAL_HOSTS]; export type ApiPath = typeof API_PATHS[keyof typeof API_PATHS];