litellm/seed.sql
2026-09-22 18:32:29 -07:00

3 lines
955 B
SQL

INSERT INTO "LiteLLM_SpendLogs" (request_id, call_type, "startTime", "endTime", model, model_id, custom_llm_provider, spend, prompt_tokens, completion_tokens, total_tokens, cache_hit, metadata)
SELECT 'local-pagination-' || lpad(n::text, 2, '0'), 'acompletion', date_trunc('hour', now() AT TIME ZONE 'UTC') - n * interval '1 minute', date_trunc('hour', now() AT TIME ZONE 'UTC') - n * interval '1 minute' + interval '1 second', 'claude-sonnet-4-20250514', 'pagination-fixture', 'anthropic', 0.0123, 11000, 100, 11100, 'false', jsonb_build_object('litellm_gateway_injected_cache', 'pagination-fixture', 'usage_object', jsonb_build_object('prompt_tokens', 11000, 'completion_tokens', 100, 'total_tokens', 11100, 'cache_read_input_tokens', CASE WHEN n % 5 = 0 THEN 0 ELSE 10000 END, 'cache_creation_input_tokens', CASE WHEN n % 5 = 0 THEN 10000 ELSE 0 END), 'fixture_label', 'Local pagination fixture, not production traffic')
FROM generate_series(1, 23) n;