mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-20 08:01:46 +00:00
* feat(openai): warm up general quota buckets after reset Co-authored-by: Codex <noreply@openai.com> * fix(openai): distinguish stream quota facts from actual usage Co-authored-by: Codex <noreply@openai.com> --------- Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
12 lines
590 B
SQL
12 lines
590 B
SQL
-- 将已有窗口上限保留为额度桶设置,预热默认关闭
|
|
alter table provider_accounts rename column quota_limits to quota_settings;
|
|
update provider_accounts a set quota_settings = (
|
|
select coalesce(jsonb_object_agg(key, jsonb_build_object('limitPercent', value, 'warmup', null)), '{}'::jsonb)
|
|
from jsonb_each(a.quota_settings)
|
|
);
|
|
|
|
-- 执行进度与管理配置分开,后台写入不发布配置版本
|
|
alter table provider_accounts
|
|
add column quota_warmup_state jsonb not null default '{}'::jsonb,
|
|
add column quota_warmup_revision bigint not null default 0;
|