Skip to content

πŸ¦‹ New version release - #473

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

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

Patch Changes

  • aa9af9e: Fix multi-tenant org scoping in handle_send_message, and make LLM turn spans carry cost and tool spans self-identifying.

    Org scoping (handle_send_message: stop re-binding the turn's org to the seed orgΒ #470). handle_send_message bound org_id twice: once correctly from the conversation (used to resolve the per-org gateway key) and again ~120 lines later as SEED_ORG_ID, shadowing it. Everything downstream of the second binding β€” the org persona override and the host tool provider's scope β€” saw reference-org on a multi-tenant host, for every tenant. Because the gateway key came from the first binding, per-org billing and per-org LLM keys stayed correct, which is why the split went unnoticed. Now reuses the derived org and falls back to the seed org only when it is empty, so the single-org reference/local flavor is unchanged.

    Turn cost (otel: record per-turn cost, and make tool spans self-identifyingΒ #471). The gateway's authoritative per-response cost was already parsed by smooai-smooth-operator-core and carried to TurnUsage.cost_usd, but nothing recorded it on the span, so gen_ai.usage.cost_usd was never emitted and consumers showed "cost not measured". The turn span now records it. A non-positive or non-finite value is dropped rather than written as 0 β€” a gateway 0 means the model is unpriced, not free, and recording it as a real cost would silently under-bill.

    Self-identifying tool spans (otel: record per-turn cost, and make tool spans self-identifyingΒ #471). Tool spans carried neither gen_ai.system nor gen_ai.operation.name, and OTLP consumers that gate on gen_ai.system therefore discarded every tool span ever emitted. They now carry gen_ai.system, gen_ai.operation.name, gen_ai.conversation.id and smooai.org_id, so a tool span is both ingestable and joinable to its conversation. Fixed at both emission sites β€” runner::run_streaming_turn and KnowledgeChatRuntime::run_turn β€” which had the identical gap.

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

Patch Changes

  • Updated dependencies [aa9af9e]
    • @smooai/smooth-operator@1.52.3

@brentrager
brentrager merged commit 8c230d8 into main Aug 18, 2026
9 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