From 7b73ac47dabff3d5ae4dcd6e083610ed96361642 Mon Sep 17 00:00:00 2001 From: Markus Hartung Date: Sat, 16 May 2026 01:31:23 +0200 Subject: [PATCH] fix(db): add quota_window_thresholds_json to SCHEMA_SQL and in-memory path - Add missing column to provider_connections CREATE TABLE baseline so fresh/in-memory databases include it from the start - Call ensureProviderConnectionsColumns for in-memory instances to match the file-backed path --- .env.example | 7 +++++++ docs/reference/ENVIRONMENT.md | 2 ++ src/lib/db/core.ts | 2 ++ 3 files changed, 11 insertions(+) diff --git a/.env.example b/.env.example index 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 for diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index 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 Thresholds diff --git a/src/lib/db/core.ts b/src/lib/db/core.ts index 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; }