shim: persistent 6h cooldown on 402 (cool.json), available counter in healthz; add qw_limits.sql (iishko gates)

This commit is contained in:
ENI
2026-11-21 17:34:48 +02:00
parent 370858c0df
commit 7db35a4ec1
4 changed files with 65 additions and 3 deletions
+10
View File
@@ -0,0 +1,10 @@
\set ON_ERROR_STOP on
update tokens set model_limits = $$default,qw-flash,qw-standard,qw-pro,qw-advanced,qw-flagship,qw-qwen4-max,qw-qwen3.8-max,qw-qwen3.8-flash,qw-deepseek-v4.1-flash,qw-glm-5.3,qw-glm-5.3-flash,qw-kimi-k3.1-pro,qw-minimax-m3.1-flash$$
where deleted_at is null and model_limits is null;
update tokens set model_limits = model_limits || $$,qw-flash,qw-standard,qw-pro,qw-advanced,qw-flagship,qw-qwen4-max,qw-qwen3.8-max,qw-qwen3.8-flash,qw-deepseek-v4.1-flash,qw-glm-5.3,qw-glm-5.3-flash,qw-kimi-k3.1-pro,qw-minimax-m3.1-flash$$
where deleted_at is null and model_limits is not null and position($$qw-flash$$ in model_limits) = 0;
update channels set status = 1 where id = 313854;
update abilities set enabled = true where channel_id = 313854;
select $$ch$$, status from channels where id = 313854;
select $$ab$$, count(*) filter (where enabled), count(*) from abilities where channel_id = 313854;
select $$tk$$, count(*) from tokens where deleted_at is null and position($$qw-flash$$ in model_limits) > 0;