Skip to content

fix(tracing): show model-call reasoning above the answer, not below#154

Open
arelchan wants to merge 1 commit into
mainfrom
fix/tracing_viewer_reasoning_order
Open

fix(tracing): show model-call reasoning above the answer, not below#154
arelchan wants to merge 1 commit into
mainfrom
fix/tracing_viewer_reasoning_order

Conversation

@arelchan

Copy link
Copy Markdown
Contributor

Summary

Fix the reading order of a model-call detail in the tracing viewer: reasoning
now renders above the assistant answer instead of below it.

The Model Output card appended the (collapsed) Reasoning block after the
answer body, so the card read bottom-up. Reasoning precedes the answer
chronologically -- the model thinks, then responds -- so it belongs at the top
of the card. It stays collapsed by default since it is long and diagnostic.

Reasoning is part of the model's output (it comes from llm.output's
reasoning_content), so it stays inside the Model Output card rather than
moving to the Model Input area (system prompt / tools / history).

Card order is now: Model Output header -> Reasoning (folded) -> answer.

Type

  • Fix

Verification

  • Application changes have been tested thoroughly

  • node --check raven/tracing/viewer/ui/app.js -> OK.

  • Booted the viewer against real traces and opened a minimax/minimax-m3
    model call that carries reasoning. Confirmed the Model Output card children
    are now header -> Reasoning(details) -> answer (DOM check
    reasoningBeforeAnswer: true) and verified it visually.

Risk

  • Backward compatibility considered

Viewer-only, presentation-only change: no data model, schema, or API change;
purely reorders two blocks within one detail card.

Related Issues

N/A -- follow-up polish on the tracing viewer merged in #135.

The viewer's Model Output card appended the (folded) reasoning block after
the assistant answer, so it read bottom-up. Reasoning precedes the answer
chronologically -- the model thinks, then responds -- so render it at the
top of the card, kept collapsed since it is long and diagnostic.

Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
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