Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(db): add quota_window_thresholds_json to SCHEMA_SQL and in-memory path
Markus Hartung7b73ac47dabf
diff --git a/.env.example b/.env.exampleindex fd1951fd5f..312f56e225 100644--- a/.env.example+++ b/.env.example@@ -699,6 +699,13 @@ GEMINI_CLI_USER_AGENT="google-api-nodejs-client/10.3.0"# OMNIROUTE_CHATGPT_TLS_TIMEOUT_MS=60000# OMNIROUTE_CHATGPT_TLS_GRACE_MS=10000+# ── Claude TLS sidecar (Chromium-fingerprinted client) ──+# Used by: open-sse/services/claudeTlsClient.ts — wire-level timeout for+# the bogdanfinn/tls-client koffi binding and the JS-side grace window+# layered on top of it when the native library is wedged.+# OMNIROUTE_CLAUDE_TLS_TIMEOUT_MS=60000+# OMNIROUTE_CLAUDE_TLS_GRACE_MS=10000+# ── Circuit breaker thresholds and reset windows ──# Used by: open-sse/config/constants.ts → src/lib/resilience/settings.ts.# Defaults match historical PROVIDER_PROFILES values (post-scaling fordiff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.mdindex 7724e458ed..9538a815de 100644--- a/docs/reference/ENVIRONMENT.md+++ b/docs/reference/ENVIRONMENT.md@@ -526,6 +526,8 @@ REQUEST_TIMEOUT_MS (global override)| `OMNIROUTE_DEFAULT_FETCH_TIMEOUT_MS` | `120000` | Fallback used by `src/shared/utils/fetchTimeout.ts` when `FETCH_TIMEOUT_MS` is unset. || `OMNIROUTE_CHATGPT_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`chatgptTlsClient.ts`). || `OMNIROUTE_CHATGPT_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. |+| `OMNIROUTE_CLAUDE_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`claudeTlsClient.ts`). |+| `OMNIROUTE_CLAUDE_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. |### Circuit Breaker Thresholdsdiff --git a/src/lib/db/core.ts b/src/lib/db/core.tsindex d5bda22141..f2ffcf8f9a 100644--- a/src/lib/db/core.ts+++ b/src/lib/db/core.ts@@ -188,6 +188,7 @@ const SCHEMA_SQL = `last_used_at TEXT,"group" TEXT,max_concurrent INTEGER,+ quota_window_thresholds_json TEXT,created_at TEXT NOT NULL,updated_at TEXT NOT NULL);@@ -1136,6 +1137,7 @@ export function getDbInstance(): SqliteDatabase {memoryDb.exec(SCHEMA_SQL);ensureUsageHistoryColumns(memoryDb);ensureCallLogsColumns(memoryDb);+ ensureProviderConnectionsColumns(memoryDb);setDb(memoryDb);return memoryDb;}