Skip to content

CubePi 0.13.2

Choose a tag to compare

@xfgong xfgong released this 23 Jul 14:47
· 21 commits to main since this release

What's fixed

gen_ai.output.messages on the chat span

Per the tracing design spec (§10.3/§10.5), the provider-level chat span now records gen_ai.output.messages reflecting what the provider actually returned - independent of the turn/agent-level rollup.

A code comment in _on_provider_response already claimed it would record "the normalized output messages where derivable", but only cubepi.llm.raw_response was ever set on this span; gen_ai.output.messages was written only on invoke_agent and cubepi.turn.

The recorder now reconstructs the semconv output-message parts (text / reasoning / tool_call) directly from the assembled response body via a new _derive_output_message_from_body() helper, mirroring the existing three-way provider-shape dispatch (Anthropic-shaped, OpenAI chat.completion-shaped, OpenAI Responses-shaped). Unrecognized shapes or empty content set nothing - identical to prior behavior, no regression.

Full changelog: https://github.com/cubeplexai/cubepi/blob/main/CHANGELOG.md#0132--2026-07-23