Skip to content

changeset: release polyglot tool-span parity - #491

Merged
brentrager merged 1 commit into
mainfrom
changeset-polyglot-parity
Aug 18, 2026
Merged

changeset: release polyglot tool-span parity#491
brentrager merged 1 commit into
mainfrom
changeset-polyglot-parity

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Releases #490. Fifth PR in a row on this ticket to merge without a changeset (#470, #471, #474, #488, #490) — see the note below on closing that loop.

What #490 fixes

All four non-Rust engines omitted gen_ai.system from the tool span, so OTLP consumers that gate on it — SmooAI's does — discarded every tool span those engines ever emitted, identically to the Rust engine. Each now carries its own gen_ai.system, gen_ai.operation.name (literally chat/tool, taken verbatim by ingest), gen_ai.conversation.id, and smooai.org_id. Child spans need their own copies: ingest merges resource attributes with that span's attributes, with no parent inheritance.

Cost reaches the span for the first time in all four, with a gateway zero recorded as cost_unavailable = "unpriced" rather than as a cost — unpriced is not free.

Two more fabricated values, removed rather than ported

  • .NET returned a literal TurnUsage(0, …) on the cost fallback, under an XML doc reading "0 means 'nothing priced it', not 'free'". The comment was right; the code shipped the zero anyway.
  • .NET published input_tokens = 0 by guarding on sawUsage alone — a usage chunk with null counts sets that flag while both totals collapse to 0 via ?? 0. The other three guard on the counts.

That makes six such values found today. The consistent tell: the comment is accurate about the mechanism and silent about the consequence.

Worth closing the changeset loop

Anchor Guard already runs on every PR and checks that a changeset names the right package. It just doesn't check one exists for a PR touching published trees. Same script, one condition wider — and it would have caught all five.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LkCz96UfUxcai5RU4LwPnG

Fifth in a row on this ticket to merge without one (#470, #471, #474, #488,
#490). Adding it so the parity work actually publishes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LkCz96UfUxcai5RU4LwPnG
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 59275ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@smooai/smooth-operator Patch
@smooai/smooth-operator-web-chat-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager merged commit 29f1d87 into main Aug 18, 2026
1 check 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