File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,15 @@ const getGatewayErrorRate_cached = unstable_cache(
77 console . debug ( `[getGatewayErrorRate_cached] refreshing at ${ new Date ( ) . toISOString ( ) } ` ) ;
88 const { rows } = await db . execute ( sql `
99 select
10- provider as "gateway",
11- 1.0 * count(*) filter(where has_error = true) / count(*) as "errorRate"
12- from microdollar_usage_view
10+ mu.provider as "gateway",
11+ 1.0 * count(*) filter(where mu.has_error = true) / count(*) as "errorRate"
12+ from microdollar_usage mu
13+ join microdollar_usage_metadata meta on mu.id = meta.id
1314 where true
14- and created_at >= now() - interval '10 minutes'
15- and is_user_byok = false
16- and provider in ('openrouter', 'vercel')
17- group by provider
15+ and mu. created_at >= now() - interval '10 minutes'
16+ and meta. is_user_byok = false
17+ and mu. provider in ('openrouter', 'vercel')
18+ group by mu. provider
1819 ` ) ;
1920 return z
2021 . array (
You can’t perform that action at this time.
0 commit comments