feat(cost): add deAPI provider cost tracking#5689
Conversation
Register deAPI (https://deapi.ai), an OpenAI-compatible inference platform operated by GamerHash, in the legacy passthrough cost-tracking layer so that deAPI embedding requests proxied through Helicone are matched, logged and costed. Adds the multilingual BGE-M3 model (Bge_M3_FP16) priced as an embeddings model (completion_token: 0). Scope note: deAPI is embeddings-only. Helicone's AI Gateway routes only chat/responses (BodyMappingType has no embeddings type), so deAPI is wired for cost-tracking/observability of proxied traffic rather than as an AI-Gateway routable provider. Making embeddings gateway-routable would require core gateway changes (embeddings BodyMappingType + per-provider /embeddings buildUrl + embeddings validator + router path detection) and is intentionally out of scope here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align with deAPI's configured embeddings rate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@adampachowicz is attempting to deploy a commit to the Helicone Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Hi team 👋 — friendly follow-up on this PR. This is a small, self-contained change that adds deAPI to the legacy cost-tracking layer ( Whenever someone on the team has a moment, I'd appreciate a review. One small blocker: the Vercel preview deploys are stuck on "Authorization required" because this comes from an external fork — a maintainer would need to authorize the deploy for the checks to run. Happy to rebase or adjust anything to match your conventions. Thanks for maintaining Helicone! |
Summary
Adds deAPI (deapi.ai), an OpenAI-compatible inference provider operated by CoinAxe Ltd, to the cost-tracking provider registry, so that deAPI requests proxied through Helicone are correctly attributed and costed. Registers the multilingual BGE-M3 embedding model (
Bge_M3_FP16).Changes
packages/cost/providers/deapi/index.ts— BGE-M3 embedding cost row (prompt_tokenset,completion_token: 0since embeddings produce no output tokens), mirroring the existing OpenAI/Mistral embedding entries.packages/cost/providers/mappings.ts: base-URL regex forhttps://oai.deapi.ai,DEAPIadded toprovidersNames, and the{ pattern, provider: "DEAPI", costs }mapping entry.Notes
Happy to adjust to match your conventions — thanks for maintaining Helicone!
🤖 Generated with Claude Code