mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 23:32:12 +03:00
Merge branch 'pr-2019' into release/v3.8.0
# Conflicts: # open-sse/handlers/chatCore.ts # open-sse/services/comboConfig.ts # open-sse/services/usage.ts # src/app/(dashboard)/dashboard/providers/[id]/page.tsx # src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.tsx # src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.tsx # src/app/api/usage/analytics/route.ts # src/lib/db/migrationRunner.ts # src/lib/usage/providerLimits.ts # src/shared/constants/providers.ts # src/sse/handlers/chat.ts # tests/unit/provider-limits-ui.test.ts # tests/unit/usage-analytics.test.ts # tests/unit/usage-service-hardening.test.ts
This commit is contained in:
@@ -555,6 +555,7 @@ export async function GET(request: Request) {
|
||||
COALESCE(NULLIF(service_tier, ''), 'standard') as serviceTier,
|
||||
LOWER(provider) as provider,
|
||||
LOWER(model) as model,
|
||||
COALESCE(NULLIF(service_tier, ''), 'standard') as serviceTier,
|
||||
COUNT(*) as requests,
|
||||
COALESCE(SUM(tokens_input), 0) as promptTokens,
|
||||
COALESCE(SUM(tokens_output), 0) as completionTokens,
|
||||
@@ -563,6 +564,7 @@ export async function GET(request: Request) {
|
||||
COALESCE(SUM(tokens_reasoning), 0) as reasoningTokens,
|
||||
COALESCE(SUM(tokens_input + tokens_output), 0) as totalTokens
|
||||
FROM usage_history
|
||||
|
||||
${whereClause}
|
||||
GROUP BY serviceTier, LOWER(provider), LOWER(model)
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user