Skip to content

πŸ¦‹ New version release - #492

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
Aug 18, 2026
Merged

πŸ¦‹ New version release#492
brentrager merged 1 commit into
mainfrom
changeset-release/main

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@smooai/smooth-operator@1.54.2

Patch Changes

  • 3da620b: Emit usage provenance, cost provenance, and the gateway response id on the turn span.

    Closes a hole in the previous release. That change gated gen_ai.usage.input_tokens on prompt_tokens > 0, which worked only against the streaming estimator β€” the one that hardcodes prompt tokens to zero. Core has a second estimator on the non-streaming path that derives prompt tokens from the request JSON length, so it produces a plausible non-zero count. The old gate published that invented number as a measurement; a test restoring it prints the invented 372.

    Now reads AgentEvent::Completed.usage_estimated (core 1.10) instead of inferring provenance from the value. A flag carries the fact; a heuristic guesses at it, and this is the second bug today caused by inferring provenance from a plausible-looking number.

    Adds:

    • gen_ai.usage.cost_source β€” gateway or estimated, set alongside cost_usd. Without it a billable figure is indistinguishable from a guess against a local price table, which matters on a metered SKU.
    • gen_ai.response.id β€” the gateway's chatcmpl-…, previously discarded at deserialization on all four LLM paths. It joins LiteLLM_SpendLogs.request_id, whose row carries the gateway's authoritative dollars and real token counts β€” so it matters most exactly when the counts on the span are absent.

    Requires core 1.10; the wire protocol is unchanged (the flags are telemetry-only, pinned by a key-count assertion).

@smooai/smooth-operator-web-chat-example@0.0.96

Patch Changes

  • Updated dependencies [3da620b]
    • @smooai/smooth-operator@1.54.2

@brentrager
brentrager force-pushed the changeset-release/main branch from 8d62645 to 8749bc0 Compare August 18, 2026 23:36
@brentrager
brentrager merged commit c50b50a into main Aug 18, 2026
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