feat: improve agent workbench and digital human flows
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Restore the documented $1 starter credit for existing user default keys.
|
||||
-- Keep explicit admin/recharge limits intact, and never leave default user keys
|
||||
-- with NULL max_cost because NULL is treated as unlimited by the proxy path.
|
||||
UPDATE downstream_api_keys
|
||||
SET max_cost = 1.0,
|
||||
updated_at = datetime('now')
|
||||
WHERE user_id IS NOT NULL
|
||||
AND (max_cost IS NULL OR max_cost <= 0.0)
|
||||
AND (
|
||||
name LIKE '% 的默认密钥'
|
||||
OR name LIKE '% default key'
|
||||
OR key LIKE 'sk-user-%'
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
CREATE INDEX IF NOT EXISTS proxy_logs_created_at_desc_idx
|
||||
ON proxy_logs (created_at DESC, id DESC);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS route_channels_route_enabled_cooldown_idx
|
||||
ON route_channels (route_id, enabled, cooldown_until, account_id, token_id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS token_routes_enabled_id_idx
|
||||
ON token_routes (enabled, id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS accounts_id_status_site_idx
|
||||
ON accounts (id, status, site_id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS sites_id_status_url_idx
|
||||
ON sites (id, status, url);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS account_tokens_id_enabled_idx
|
||||
ON account_tokens (id, enabled);
|
||||
Reference in New Issue
Block a user