Skip to content

feat: map CLIProxyAPI usage and tok/s onto OpenCode payloads - #12

Open
RaviTharuma wants to merge 1 commit into
GRomR1:mainfrom
RaviTharuma:feat/gateway-telemetry
Open

RaviTharuma wants to merge 1 commit into
GRomR1:mainfrom
RaviTharuma:feat/gateway-telemetry

Conversation

@RaviTharuma

Copy link
Copy Markdown

Summary

Map CLIProxyAPI gateway usage and tokens-per-second onto the OpenCode inference payload.

Changes

  • Fetch interceptor copies usage.tokens_per_second from X-CLIProxyAPI-Tokens-Per-Second / usage
  • Winning model from X-OmniRoute-Model / CLIProxy model headers when present
  • Missing tok/s is omitted (never tokens / latency)

Testing

npm test (includes test/telemetry.test.mjs)

Closes #11

Copy gateway tokens_per_second onto usage. Never invent tok/s from latency.

Closes GRomR1#11
Copilot AI lite review requested due to automatic review settings September 3, 2026 20:12

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Pass CLIProxyAPI usage and tok/s into OpenCode session telemetry

2 participants