diff --git a/modules/runs/trail.go b/modules/runs/trail.go index 7880576e3..d3977b880 100644 --- a/modules/runs/trail.go +++ b/modules/runs/trail.go @@ -101,11 +101,16 @@ type TrailEntry struct { Reasoning string `json:"reasoning,omitzero"` ToolCalls []ToolCallView `json:"tool_calls,omitzero"` Usage *chat.Usage `json:"usage,omitzero"` - Input string `json:"input,omitzero"` - Output string `json:"output,omitzero"` - Value jsontext.Value `json:"value,omitzero"` - Error string `json:"error,omitzero"` - Unknown bool `json:"unknown,omitzero"` + // Request is the model request exactly as it was sent: the messages, the + // tools offered and the sampling settings. + Request jsontext.Value `json:"request,omitzero"` + // FinishReason is the wire finish reason of a model call. + FinishReason string `json:"finish_reason,omitzero"` + Input string `json:"input,omitzero"` + Output string `json:"output,omitzero"` + Value jsontext.Value `json:"value,omitzero"` + Error string `json:"error,omitzero"` + Unknown bool `json:"unknown,omitzero"` } // ToolCallView is a tool call a model asked for. @@ -331,6 +336,7 @@ func entry(s store.Recorded) TrailEntry { if je.Kind == agentloop.EntryCompact { e.Kind = "compaction" } + e.Request, e.FinishReason = je.Request, je.FinishReason usage := je.Usage e.Usage = &usage if je.Message != nil { diff --git a/ui/src/archie/ActionTrailView.vue b/ui/src/archie/ActionTrailView.vue index 520d736be..52558e020 100644 --- a/ui/src/archie/ActionTrailView.vue +++ b/ui/src/archie/ActionTrailView.vue @@ -52,6 +52,26 @@ const ceilingTone = (v: Verdict): Tone => (v.failed ? "warn" : "secondary"); {{ json(decision.action.input) }} +
+ Connector calls +
+
+ {{ c.connector }} {{ c.method }} + Request + + {{ json(c.request) }} + + + {{ c.error }} +
+
+
+