Skip to content

fix(analytics): attribute latency rows with null provider to unknown - #107

Open
mia-lee-hk wants to merge 1 commit into
Continuum-AI-Corp:mainfrom
mia-lee-hk:fix/analytics-null-provider
Open

mia-lee-hk wants to merge 1 commit into
Continuum-AI-Corp:mainfrom
mia-lee-hk:fix/analytics-null-provider

Conversation

@mia-lee-hk

@mia-lee-hk mia-lee-hk commented Sep 14, 2026

Copy link
Copy Markdown

Orca-Code-Review — push 1

Severity Count
P0 0
P1 0
P2 0
P3 0

✅ no blocking findings

The endpoint aggregates rows by provider name. When the LiteLLM adapter fails before routing (e.g. , DNS failure), the row still gets written with . The aggregation currently creates a key in the response, which the dashboard frontend renders as null in the provider list.

Groups null-provider rows under so the aggregation always produces clean string keys. The p50/p99 calculations are unaffected — only the bucket label changes.

4 tests cover null provider, mixed providers, empty rows, and percentile accuracy for the unknown bucket.

The latency_by_provider endpoint aggregates request_log rows by
provider name. When the LiteLLM adapter fails before routing (e.g.
no providers configured, connection refused), the row still gets
written with provider=NULL. The aggregation currently creates a
null key in the response, which the dashboard frontend renders as
"null" in the provider list.

Group null-provider rows under "unknown" so the aggregation always
produces clean string keys. The p50/p99 calculations are unaffected
— only the bucket label changes.

@orcacode-review orcacode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐳 OrcaCode Review

No findings — nothing to flag in this PR. Great work!

OrcaCode Review — Route Smarter. Ship Safer. Spend Less.
Engine-reported: 473 calls · 30.9M tokens · 99% cached

❤️ Share · Install OrcaCode Review

Free on GitHub — the review runs on your own OrcaRouter key. If it helped, a shout-out goes a long way.

Share: X · Reddit · LinkedIn
Follow: X · Discord · LinkedIn · OrcaRouter

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant