Changeset 0.28.0 (#172)

This commit is contained in:
2026-03-11 11:22:38 +00:00
parent 07432233f7
commit 93c72daadf
31 changed files with 580 additions and 431 deletions

View File

@@ -3,7 +3,7 @@
-- ==========================================
-- Provider configs, model catalog, pricing, health, capability
-- overrides, and routing policies.
-- ICD §10 (Providers & Routing), §11 (Models & Preferences)
-- Consolidated v0.28.0: adds capability_match policy type.
-- ==========================================
-- =========================================
@@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS model_pricing (
-- =========================================
-- PROVIDER HEALTH (v0.22.0)
-- PROVIDER HEALTH
-- =========================================
CREATE TABLE IF NOT EXISTS provider_health (
@@ -135,7 +135,7 @@ CREATE INDEX IF NOT EXISTS idx_provider_health_window
-- =========================================
-- CAPABILITY OVERRIDES (v0.22.0)
-- CAPABILITY OVERRIDES
-- =========================================
CREATE TABLE IF NOT EXISTS capability_overrides (
@@ -155,7 +155,7 @@ CREATE INDEX IF NOT EXISTS idx_capability_overrides_model
-- =========================================
-- ROUTING POLICIES (v0.22.2)
-- ROUTING POLICIES
-- =========================================
CREATE TABLE IF NOT EXISTS routing_policies (
@@ -166,7 +166,7 @@ CREATE TABLE IF NOT EXISTS routing_policies (
team_id UUID REFERENCES teams(id) ON DELETE CASCADE,
priority INTEGER NOT NULL DEFAULT 100,
policy_type VARCHAR(30) NOT NULL
CHECK (policy_type IN ('provider_prefer', 'team_route', 'cost_limit', 'model_alias')),
CHECK (policy_type IN ('provider_prefer', 'team_route', 'cost_limit', 'model_alias', 'capability_match')),
config JSONB NOT NULL DEFAULT '{}'::jsonb,
is_active BOOLEAN NOT NULL DEFAULT true,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),