Skip to content

πŸ¦‹ New version release - #180

Open
brentrager wants to merge 1 commit into
mainfrom
changeset-release/main
Open

πŸ¦‹ New version release#180
brentrager wants to merge 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-core@1.11.0

Minor Changes

  • 875b7a6: Ask the gateway for usage on every streaming request (stream_options: {"include_usage": true}), in all
    five engines.

    The OpenAI streaming API omits usage unless it is explicitly requested, and nothing here ever
    requested it. So the missing usage chunk was never the gateway losing data β€” it was the gateway
    correctly honouring a request that never asked. Everything built on top of that misattribution
    compensates for one unset request parameter: two char-count estimators, prompt_tokens hardcoded to
    0, completion_tokens = content.len() / 4, the usage_estimated and cost_estimated flags, and a
    cross-language "is this measured?" convention.

    Verified against llm.smoo.ai (LiteLLM 1.95.0, groq-gpt-oss-120b), same prompt both ways:

    • without the field β€” 7 chunks, 0 carrying usage
    • with the field β€” 8 chunks, 1 carrying "prompt_tokens": 73, "completion_tokens": 8

    Sent only when streaming: it is meaningless otherwise, and leaving it off keeps a non-streaming
    request byte-identical to before. Python honours an explicit caller-supplied stream_options rather
    than overriding it.

    Not fixed by this, and worth knowing: the per-request cost headers are present on a streamed
    response but all read 0.0, because at header-flush time the completion has not been priced yet.
    parse_gateway_cost already maps 0 to None, so gateway cost stays unavailable on the streaming
    path and the response_id β†’ LiteLLM_SpendLogs.request_id join remains the only authoritative
    per-turn cost there.

@smooai/smooth-operator-temporal@1.9.4

Patch Changes

  • Updated dependencies [875b7a6]
    • @smooai/smooth-operator-core@1.11.0

@brentrager
brentrager force-pushed the changeset-release/main branch from 807ce24 to 5d7b1a7 Compare August 19, 2026 00:54
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