π¦ New version release - #178
Merged
Merged
Conversation
brentrager
force-pushed
the
changeset-release/main
branch
from
August 18, 2026 22:46
701226e to
807ce24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-core@1.10.0
Minor Changes
418d996: Carry cost/usage provenance and the gateway response id out of the engine, so nothing downstream can
publish a fabricated number as a measurement.
collect_streaminvents a usage struct whenever a response carries no usage chunk β which LiteLLMdoes for every
smooth-*alias β hardcodingprompt_tokens = 0and estimatingcompletion_tokensas
content.len() / 4. The estimate is kept, because budget enforcement needs something to multiply,but it is now flagged:
LlmResponse.usage_estimated, aggregated ontoAgentEvent::Completedasusage_estimated. This is what let production recordinput_tokens = 0on every streamed turnbeside an output count that only ever tracked the reply's length. The old comment there claimed the
estimate would "produce a real cost number against ModelPricing"; it does not, and it now says so.
AgentEvent::Completedalso gainscost_estimatedβ true once any call in the run was priced fromthe local
ModelPricingtable instead of the gateway's own figure. That table cannot price aliasedroutes and returns the free tier for anything it does not recognise, so a tainted total may be a wild
under-count while looking exact. Cost and usage provenance are tracked separately on purpose: the
gateway reports cost on an HTTP header and usage on an SSE chunk, so either can be authoritative
while the other is a guess.
Finally, the gateway's response id (
chatcmpl-β¦, ormsg_β¦on the Anthropic-native path) is nowcaptured off both the streaming and non-streaming paths and surfaced as
LlmResponse.response_idandAgentEvent::Completed.response_id. It was previously discarded at deserialization. It is the joinkey to
LiteLLM_SpendLogs.request_id, whose row carries the gateway's authoritative dollars andits real prompt/completion counts β the only trustworthy source for either while the flags above can
be set.
All three fields cross the Temporal activity boundary via
ModelCallOutput, so a durable replaycannot silently launder an estimate back into a measurement.
smooth-operator-temporal's corerequirement moves 1.8 -> 1.9 accordingly.
Note for consumers matching exhaustively on
StreamEvent: this adds aResponseIdvariant.@smooai/smooth-operator-temporal@1.9.3
Patch Changes