RC-1
Some checks failed
release-tag / release-image (push) Failing after 1m18s

This commit is contained in:
2026-08-10 05:48:55 +02:00
parent 4f0ac14c49
commit 005fd6ca51
52 changed files with 9020 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS artifact_api_usage (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at INTEGER NOT NULL,
task_id TEXT REFERENCES tasks(id) ON DELETE SET NULL,
kind TEXT NOT NULL CHECK (kind IN ('character_anchor','artifact')),
provider TEXT NOT NULL,
model TEXT NOT NULL,
endpoint TEXT NOT NULL,
size TEXT NOT NULL,
quality TEXT NOT NULL,
request_id TEXT,
input_tokens INTEGER NOT NULL DEFAULT 0,
input_text_tokens INTEGER NOT NULL DEFAULT 0,
input_image_tokens INTEGER NOT NULL DEFAULT 0,
output_tokens INTEGER NOT NULL DEFAULT 0,
total_tokens INTEGER NOT NULL DEFAULT 0,
estimated_cost_usd REAL,
pricing_basis TEXT NOT NULL DEFAULT '',
meta_json TEXT NOT NULL DEFAULT '{}'
);
CREATE INDEX IF NOT EXISTS artifact_api_usage_created_idx ON artifact_api_usage(created_at DESC);
CREATE INDEX IF NOT EXISTS artifact_api_usage_kind_created_idx ON artifact_api_usage(kind, created_at DESC);
CREATE INDEX IF NOT EXISTS artifact_api_usage_task_idx ON artifact_api_usage(task_id);