-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
Summary
Add xAI (Grok) provider support for the custom/manual logging endpoint, enabling cost calculation for xAI requests logged via the Manual Logger SDK.
Current Behavior
When using the Manual Logger (@helicone/helpers) or the /custom/v1/log endpoint with xAI/Grok models:
- Provider shows as "unknown" in the dashboard
- Cost calculation returns "Cost Unsupported"
- The
provider: "X"field in the payload is not recognized
Expected Behavior
- Provider should be identified as "X" or "xAI"
- Cost calculation should work using the existing xAI pricing in
packages/cost/providers/x/index.ts - Ideally, a dedicated
/x/v1/logroute (similar to/oai/v1/log,/anthropic/v1/log)
Context
The cost package already has xAI pricing defined with URL pattern matching for the gateway (/^https:\/\/api\.x\.ai/), but this pattern matching doesn't apply to the custom logging endpoint.
The providerRoutes map in the SDK only includes:
- OPENAI → oai
- ANTHROPIC → anthropic
- GOOGLE → googleapis
Adding X → x (or similar) would enable xAI support.
Workaround
Currently, the only way to get xAI cost tracking is through the gateway (x.helicone.ai), which isn't always feasible for async/manual logging use cases.
Related
- xAI gateway docs: https://docs.helicone.ai/integrations/xai/curl
- Cost package: https://github.com/Helicone/helicone/tree/main/packages/cost/providers/x
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels