motivation
chibi's --debug request-log currently logs a reconstructed serde_json::Value that chibi builds internally — it's not the actual HTTP body sent to the API. the real serialization happens deep in the llm crate via ratatoskr, and chibi has no visibility into it.
this matters for debugging: when investigating a tool output caching loop (#205), we couldn't verify whether the LLM was actually receiving the cached stub messages as expected.
design
once emesal/ratatoskr#27 lands (optional request inspector callback), chibi would:
- add a new
DebugKey variant (e.g. WireRequest)
- when active, register a callback on the ratatoskr gateway that captures the serialized request body
- write it to
wire_requests.jsonl in the context dir, same pattern as existing requests.jsonl
zero overhead when not active — the callback is None and ratatoskr skips serialization entirely.
blocked by
motivation
chibi's
--debug request-logcurrently logs a reconstructedserde_json::Valuethat chibi builds internally — it's not the actual HTTP body sent to the API. the real serialization happens deep in the llm crate via ratatoskr, and chibi has no visibility into it.this matters for debugging: when investigating a tool output caching loop (#205), we couldn't verify whether the LLM was actually receiving the cached stub messages as expected.
design
once emesal/ratatoskr#27 lands (optional request inspector callback), chibi would:
DebugKeyvariant (e.g.WireRequest)wire_requests.jsonlin the context dir, same pattern as existingrequests.jsonlzero overhead when not active — the callback is
Noneand ratatoskr skips serialization entirely.blocked by