Skip to content

chore(chat): log full provider errors during chat turns#53

Merged
killertux merged 2 commits into
mainfrom
chore/chat-logging
May 22, 2026
Merged

chore(chat): log full provider errors during chat turns#53
killertux merged 2 commits into
mainfrom
chore/chat-logging

Conversation

@killertux
Copy link
Copy Markdown
Owner

Summary

Chat errors like "Http Error: Error decoding response" surface to the user via the short `LLMError::to_string()` wrapper, which strips the original HTTP status, body, and decode path. Nothing was making it to the session log either, so failures were undebuggable after the fact.

This change threads the session `Logger` and a `/` provider tag through `ChatTurn`, then logs:

  • stream-open retry failures (both Display and Debug shape, so wrappers like "Error decoding response" no longer hide the inner provider detail)
  • mid-stream errors (with round number + partial-text length already painted)
  • tool dispatch drops
  • tool-call budget overruns
  • `build_client` failures
  • turn start / done summaries (provider, history size, tool count, total text length)

User-visible behaviour is unchanged; the new lines land in `.rowdy/.log` under target `chat`.

Test plan

  • `cargo test` — 575 passed
  • `cargo clippy` — clean
  • `cargo fmt`

killertux added 2 commits May 22, 2026 10:25
The user-facing chat panel only sees the short `LLMError::to_string()`
wrapper (e.g. "Error decoding response"), which strips the original
HTTP status / body / decode path. Thread the session Logger and a
`<backend>/<model>` tag through `ChatTurn` and log every:

- stream-open retry failure (Display + Debug shape)
- mid-stream error (with round + partial-text length)
- tool dispatch drop
- tool-budget overrun
- turn start / done summary
- build_client failure

so post-mortem diagnosis from `.rowdy/<datetime>.log` is possible.
@killertux killertux merged commit f1e2cab into main May 22, 2026
3 checks 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