Repository navigation
feat: Show headers and thinking fields in the agentop detail pane #1929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,9 @@ import "slices" | |
| var detailKeys = map[string][2][]string{ | ||
| "inference": { | ||
| {"model", "requestedModel", "messages", "temperature", "maxTokens", "topP", | ||
| "stream", "tools", "toolChoice", "toolResults", "historyToolCalls"}, | ||
| "stream", "tools", "toolChoice", "toolResults", "historyToolCalls", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion — the new keys are added only to the request-side list, which matches the PR body ("the proxy records" them on requests). Worth confirming that responses never carry any of these names on this proxy path: if a response ever echoes e.g. |
||
| // How the agent asked the model to think. A change of effort breaks the prompt cache. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: two thinking fields still do not show. |
||
| "effort", "thinkingType", "anthropicBeta", "agentRole", "historyThinking"}, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. must-fix: adding |
||
| // reasoningTokens is a SUBSET of completionTokens, not a sibling: it is the share | ||
| // of the generated tokens the model spent reasoning, billed at the output rate. | ||
| // Adding the two double-counts every one of them. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit — the
len(pa) > 0guard means a response carrying"plugins": {}keeps the empty object, while the PR body says dropShared "removespluginswhen no record is left" — and the all-equal case (covered by the newdropShared(req, req)test) does remove it. Degenerate input, so just a nit, but if you want the body's claim to hold unconditionally, drop the guard and let thelen(pa) == 0branch handle it.Suggested fix:
if json.Unmarshal(...) == nil && json.Unmarshal(...) == nil {(nolen(pa) > 0), keeping the existinglen(pa) == 0 → delete(a, "plugins")branch.