Skip to content

v3.0.3

  • v3.0.3
  • 4bc4cda
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v3.0.3
  • 4bc4cda
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@that-guy-wade that-guy-wade tagged this 25 Oct 00:02
* feat: capture BYOK upstream inference cost per call

OpenRouter's usage.cost on a BYOK request is only the credit charge, so a
miner using their own provider key reported near-zero spend. Record
usage.cost_details.upstream_inference_cost beside it as
inference_byok_cost_usd / inference_byok_requests (and per-model
byok_cost_usd / byok_requests) through InferenceStats, the sandbox stats
reader and merge, and the completion payload's episode summaries.
inference_cost_usd keeps its credit-only meaning.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: count zero-charge BYOK calls via usage.is_byok

A successful call counts toward inference_byok_requests (and per-model
byok_requests) when usage.is_byok is True (strict bool) or
upstream_inference_cost > 0, so free-model BYOK calls are not dropped.
inference_byok_cost_usd stays the summed upstream amount.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Assets 2
Loading