Skip to content

feat: --debug wire-request log using ratatoskr request inspector #206

Description

@emesal

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:

  1. add a new DebugKey variant (e.g. WireRequest)
  2. when active, register a callback on the ratatoskr gateway that captures the serialized request body
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions