Files
descrybe/apps/api/sql/schema/050_ai_model_prices_mini.sql
T
2026-10-16 00:34:06 +02:00

15 lines
754 B
SQL

-- +goose Up
-- USD per 1M standard text tokens, OpenAI published rates, 2026-10-16.
-- The platform's cost ledger records USD at call time; never reprice history.
-- Existing/admin-custom pricing remains authoritative.
INSERT INTO ai_model_prices (model,input_micros_per_mtok,cached_input_micros_per_mtok,output_micros_per_mtok,source)
VALUES
('gpt-5.4-mini',750000,75000,4500000,'https://developers.openai.com/api/docs/models/gpt-5.4-mini'),
('gpt-5-mini',250000,25000,2000000,'https://developers.openai.com/api/docs/models/gpt-5-mini'),
('gpt-6-luna',100000,10000,500000,'https://developers.openai.com/api/docs/pricing')
ON CONFLICT(model) DO NOTHING;
-- +goose Down
-- Price rows may be in active use and cost history cannot be re-priced.
SELECT 1;