Skip to content

v0.8.57: Normalize cached and reasoning token telemetry across all providers #2961

@Hmbown

Description

@Hmbown

Goal

Extend the provider usage-telemetry normalization started for the OpenAI Codex provider (#2955) to every supported provider, so the Harbor stream and benchmark harness report a consistent token schema: input, cached input, output, and reasoning tokens, with explicit null for metrics a provider does not report.

Current evidence

Scope

  • Define one normalized usage struct (input, cached_input, output, reasoning, plus provider-raw passthrough) and map each supported provider's usage payload onto it.
  • Emit it uniformly in the Harbor stream and wherever per-turn usage is recorded, so the v0.8.56: Build a Codex-parity token comparison harness #2952 harness and future tooling read one schema regardless of provider.
  • Document per-provider field mappings and which fields are unavailable (explicit null, never silent zero).
  • Tests with recorded usage payload fixtures per provider.

Non-goals

Acceptance criteria

  • All currently supported providers map their usage payloads to the normalized schema, with fixtures proving the mapping.
  • The v0.8.56: Build a Codex-parity token comparison harness #2952 comparison harness consumes cached/reasoning tokens for non-Codex providers without provider-specific parsing.
  • A docs table lists each provider's usage-field mapping and gaps.

Related: #2955, #2952, #1177, #2956, #2666

Deferred to v0.8.57: depends on #2955 landing first and touches every provider adapter, so it should not block the v0.8.56 parity work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cache-maximalismDeepSeek V4 cache-maximal context and agent architecturedocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions