221_group_model_pricing.sql 573 B

123456789101112
  1. ALTER TABLE groups
  2. ADD COLUMN IF NOT EXISTS long_context_pricing_enabled BOOLEAN NOT NULL DEFAULT TRUE,
  3. ADD COLUMN IF NOT EXISTS model_pricing JSONB;
  4. UPDATE groups
  5. SET long_context_pricing_enabled = TRUE
  6. WHERE long_context_pricing_enabled IS DISTINCT FROM TRUE;
  7. COMMENT ON COLUMN groups.long_context_pricing_enabled IS
  8. 'Whether token pricing selects official/preset long-context tiers; default true preserves existing long-context billing';
  9. COMMENT ON COLUMN groups.model_pricing IS
  10. 'Per-model group pricing overrides channel and built-in model pricing';