Skip to content

πŸ¦‹ New version release - #480

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

πŸ¦‹ New version release#480
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.53.1

Patch Changes

  • e0077e4: Stop exporting fabricated token counts on the turn span, and adopt the cross-language cost_unavailable attribute.

    gen_ai.usage.input_tokens was published whenever either count was non-zero. That || was the whole bug: when the gateway drops the usage chunk, smooai-smooth-operator-core's collect_stream fabricates the struct β€” prompt_tokens hardcoded to 0 and completion_tokens estimated as content.len() / 4 β€” so the fabricated struct always had a non-zero completion count, and the || published input_tokens = 0 beside it. LiteLLM drops that chunk for smooth-* aliases, so this was the common path, not an edge case: no streamed turn has ever exported a measured token count.

    The estimated output count looked plausible precisely because it is derived from the reply text β€” an estimate computed from the output cannot help but track the output. Only the zeroed input half looked obviously wrong.

    Now gated on prompt_tokens > 0 alone: both counts are exported, or neither. Absent is honest; 0 is a lie. The underlying fabrication still needs fixing in core.

    Also adds smooai.gen_ai.cost_unavailable = "unpriced", set instead of gen_ai.usage.cost_usd when no cost could be established β€” the same attribute name and value the TypeScript emitters use, so a consumer never has to special-case per engine.

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

Patch Changes

  • Updated dependencies [e0077e4]
    • @smooai/smooth-operator@1.53.1

@brentrager
brentrager merged commit 748dac7 into main Aug 18, 2026
5 checks passed
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