feat: recognize OrcaRouter as a named AI provider in dashboard analytics - #4798
feat: recognize OrcaRouter as a named AI provider in dashboard analytics#4798armyluki-wq wants to merge 1 commit into
Conversation
Add first-class recognition for OrcaRouter alongside the existing gateway/OpenRouter handling: resolve the downstream provider from `orcarouter.provider` span metadata, extract provider-reported usage cost, and derive the model-filter icon from the model prefix. This mirrors the OpenRouter integration so OrcaRouter runs show the same provider/cost fidelity in the dashboard instead of being treated as anonymous custom endpoints.
|
|
Hi @armyluki-wq, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
WalkthroughThe webapp now recognizes OrcaRouter metadata when resolving downstream providers for AI runs and model icons. It extracts positive costs from OrcaRouter usage metadata in run enrichment and admin missing-model data. Metric descriptions now list OrcaRouter as a cost source. A test verifies that OrcaRouter-reported cost takes precedence over catalog pricing. A changelog entry documents the feature. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
Trigger.dev is the open-source platform for building AI workflows in TypeScript, and its run analytics already treats OpenAI-compatible gateways as first-class citizens: OpenRouter spans get a resolved downstream provider, provider-reported usage cost, and a model-filter icon derived from the model prefix.
This PR gives OrcaRouter the same treatment. OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding
orcarouteras a first-class provider means this project's users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.The changes mirror the existing
openrouterhandling in four spots:aiHelpers.ts: resolveresolvedProviderfromorcarouter.providerspan metadataenrichCreatableEvents.server.ts+admin.llm-models.missing.$model.tsx: extractorcarouter.usage.costas provider-reported costModelsFilter.tsx: derive the model-filter icon from the model prefix fororcarouterVerification
oxfmt --checkandoxlintclean on all changed filesGET /v1/modelsandPOST /v1/chat/completionsreturn 200, with usage cost in provider metadataI'm an engineer on the OrcaRouter team.
Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter