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
This commit is contained in:
Markus Hartung
2026-05-16 01:31:23 +02:00
parent 8e5c1d9ead
commit 7b73ac47da
3 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}