The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[FIX] Update token fields in schema.prisma to use BigInt for improved… (#10697)
Muhammad Husnain0675dc109ebf
diff --git a/litellm/proxy/schema.prisma b/litellm/proxy/schema.prismaindex 3c20b9a3cda..b3016cc38bd 100644--- a/litellm/proxy/schema.prisma+++ b/litellm/proxy/schema.prisma@@ -361,14 +361,14 @@ model LiteLLM_DailyUserSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAt@@ -388,14 +388,14 @@ model LiteLLM_DailyTeamSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAt@@ -415,14 +415,14 @@ model LiteLLM_DailyTagSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAtdiff --git a/schema.prisma b/schema.prismaindex 3c20b9a3cda..b3016cc38bd 100644--- a/schema.prisma+++ b/schema.prisma@@ -361,14 +361,14 @@ model LiteLLM_DailyUserSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAt@@ -388,14 +388,14 @@ model LiteLLM_DailyTeamSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAt@@ -415,14 +415,14 @@ model LiteLLM_DailyTagSpend {model Stringmodel_group String?custom_llm_provider String?- prompt_tokens Int @default(0)- completion_tokens Int @default(0)- cache_read_input_tokens Int @default(0)- cache_creation_input_tokens Int @default(0)+ prompt_tokens BigInt @default(0)+ completion_tokens BigInt @default(0)+ cache_read_input_tokens BigInt @default(0)+ cache_creation_input_tokens BigInt @default(0)spend Float @default(0.0)- api_requests Int @default(0)- successful_requests Int @default(0)- failed_requests Int @default(0)+ api_requests BigInt @default(0)+ successful_requests BigInt @default(0)+ failed_requests BigInt @default(0)created_at DateTime @default(now())updated_at DateTime @updatedAt