Commit Graph

24 Commits (acd8966ff054511b541ab1020377055b2694de09)

Author SHA1 Message Date
Vincent Koc 1a13c34f5b fix(agents): close cache boundary transport gaps 8 months ago
Vincent Koc c76646adb1
feat(agents): add prompt cache break diagnostics (#60707)
* feat(agents): add prompt cache break diagnostics

* test(agents): wire cache trace into live cache suite

* fix(agents): always record cache trace result stage

* feat(status): show cache reuse in verbose output

* fix(agents): ignore missing prompt cache usage

* chore(changelog): note prompt cache diagnostics

* fix(agents): harden prompt cache diagnostics
8 months ago
Robin Waslander fb6588cb99
fix(diagnostics): redact credentials from cache-trace diagnostic output
Refs #53103
8 months ago
Peter Steinberger 5effa6043e fix(agents): land #38935 from @MumuTW
Co-authored-by: MumuTW <MumuTW@users.noreply.github.com>
9 months ago
Peter Steinberger 3c71e2bd48 refactor(core): extract shared dedup helpers 9 months ago
Vincent Koc 9c86a9fd23
fix(gateway): support image_url in OpenAI chat completions (#34068)
* fix(gateway): parse image_url in openai chat completions

* test(gateway): cover openai chat completions image_url flows

* docs(changelog): note openai image_url chat completions fix (#17685)

* fix(gateway): harden openai image_url parsing and limits

* test(gateway): add openai image_url regression coverage

* docs(changelog): expand #17685 openai chat completions note

* Gateway: make OpenAI image_url URL fetch opt-in and configurable

* Diagnostics: redact image base64 payload data in trace logs

* Changelog: note OpenAI image_url hardening follow-ups

* Gateway: enforce OpenAI image_url total budget incrementally

* Gateway: scope OpenAI image_url extraction to the active turn

* Update CHANGELOG.md
9 months ago
Peter Steinberger 1934eebbf0 refactor(agents): dedupe lifecycle send assertions and stable payload stringify 9 months ago
Peter Steinberger b8b43175c5 style: align formatting with oxfmt 0.33 9 months ago
Peter Steinberger 31f9be126c style: run oxfmt and fix gate failures 9 months ago
cpojer d0cb8c19b2
chore: wtf. 9 months ago
Sebastian ed11e93cf2 chore(format) 9 months ago
cpojer c70597daeb
chore: Fix formatting. 9 months ago
Peter Steinberger dee0134269 style: reformat dedupe-touched files 9 months ago
Peter Steinberger 817b5812e1 refactor(agents): share queued JSONL file writer 9 months ago
cpojer 90ef2d6bdf
chore: Update formatting. 9 months ago
Peter Steinberger d82c5ea9d1 refactor(utils): share safe json stringify 9 months ago
cpojer f06dd8df06
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
cpojer 5ceff756e1
chore: Enable "curly" rule to avoid single-statement if confusion/errors. 10 months ago
cpojer 9c4cbaab7b
chore: Enable eslint/no-unused-vars. 10 months ago
cpojer 15792b153f
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later. 10 months ago
Peter Steinberger 9a7160786a refactor: rename to openclaw 10 months ago
Peter Steinberger 6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 10 months ago
Peter Steinberger 97e8f9d619 fix: add diagnostics cache trace config (#1370) (thanks @parubets) 10 months ago
Andrii 5392fa0dfa cache trace mvp
Added a standalone cache tracing module and wired it into the embedded
runner so you can capture message flow and the exact context sent to
  Anthropic in a separate JSONL file.

  What changed

  - New tracing module: src/agents/cache-trace.ts (self‑contained,
env‑gated, writes JSONL, computes per‑message digests).
  - Hook points in src/agents/pi-embedded-runner/run/attempt.ts: logs
stage snapshots (loaded/sanitized/limited/prompt/stream/after) and wraps
the
    stream fn to record the real context.messages at send time.

  How to enable

  - CLAWDBOT_CACHE_TRACE=1 enables tracing.
  - CLAWDBOT_CACHE_TRACE_FILE=~/.clawdbot/logs/cache-trace.jsonl
overrides output (default is
$CLAWDBOT_STATE_DIR/logs/cache-trace.jsonl).
  - Optional filters:
      - CLAWDBOT_CACHE_TRACE_MESSAGES=0 to omit full messages (still
logs digests).
      - CLAWDBOT_CACHE_TRACE_PROMPT=0 to omit prompt text.
      - CLAWDBOT_CACHE_TRACE_SYSTEM=0 to omit system prompt.

  What you’ll see

  - One JSON object per line with stage, messagesDigest, per‑message
messageFingerprints, and the actual messages if enabled.
  - The most important line is stage: "stream:context" — that is the
exact payload pi‑mono is sending. If this diverges from earlier stages,
you’ve
    found the mutation point.
10 months ago