Skip to content

feat(cost): add deAPI provider cost tracking#5689

Open
adampachowicz wants to merge 2 commits into
Helicone:mainfrom
deapi-ai:feature/DEV-1793
Open

feat(cost): add deAPI provider cost tracking#5689
adampachowicz wants to merge 2 commits into
Helicone:mainfrom
deapi-ai:feature/DEV-1793

Conversation

@adampachowicz

Copy link
Copy Markdown

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).

Disclosure: I'm contributing this on behalf of deAPI (operated by CoinAxe Ltd) — i.e. I'm affiliated with the provider.

Changes

  • New packages/cost/providers/deapi/index.ts — BGE-M3 embedding cost row (prompt_token set, completion_token: 0 since embeddings produce no output tokens), mirroring the existing OpenAI/Mistral embedding entries.
  • Wire deAPI into packages/cost/providers/mappings.ts: base-URL regex for https://oai.deapi.ai, DEAPI added to providersNames, and the { pattern, provider: "DEAPI", costs } mapping entry.

Notes

  • Scoped to cost-tracking / observability of proxied traffic. deAPI is embeddings-only (it does not serve chat completions), so it's registered in the cost provider layer rather than as an AI-Gateway routable provider.
  • Pricing: BGE-M3 at $0.068 / 1M input tokens.
  • No changes to the AI Gateway model registry.

Happy to adjust to match your conventions — thanks for maintaining Helicone!

🤖 Generated with Claude Code

adampachowicz and others added 2 commits June 2, 2026 14:21
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>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@adampachowicz is attempting to deploy a commit to the Helicone Team on Vercel.

A member of the Team first needs to authorize it.

@vercel vercel Bot temporarily deployed to Preview – helicone-bifrost June 2, 2026 14:09 Inactive

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
helicone-bifrost Skipped Skipped Jun 2, 2026 2:09pm

Request Review

@adampachowicz

Copy link
Copy Markdown
Author

Hi team 👋 — friendly follow-up on this PR.

This is a small, self-contained change that adds deAPI to the legacy cost-tracking layer (packages/cost/providers/deapi/) so that traffic proxied through Helicone is correctly attributed and costed. It only touches the cost provider files and the mappings registry — no gateway/routing changes.

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!

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