Skip to content

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

692 B
Raw Blame
-- #7819 (Level 2) — per-API-key candidate exclusions for `auto/*` channels.
-- OmniRoute is single-tenant (no `users` table); `api_key_id` is the closest
-- real per-caller identity this app has. One row per excluded candidate
-- connection for a given API key + auto channel.
CREATE TABLE IF NOT EXISTS auto_candidate_overrides (
  id TEXT PRIMARY KEY,
  api_key_id TEXT NOT NULL,
  auto_channel TEXT NOT NULL,
  connection_id TEXT NOT NULL,
  excluded INTEGER NOT NULL DEFAULT 1,
  created_at TEXT NOT NULL,
  UNIQUE(api_key_id, auto_channel, connection_id)
);

CREATE INDEX IF NOT EXISTS idx_auto_candidate_overrides_key_channel
  ON auto_candidate_overrides(api_key_id, auto_channel);