• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / inference-perf / 39285023412
85%

Build:
DEFAULT BRANCH: main
Ran 19 Oct 2026 04:32PM UTC
Jobs 1
Files 136
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Oct 2026 04:23PM UTC coverage: 83.638% (+0.3%) from 83.351%
39285023412

push

github

web-flow
feat(trace-replay): replay recorded images as images (#900)

Fixes #899

Trace replay didn't send recorded images as images. What happened
depended on where the image was:
- **In a tool result** (e.g. an agent reading a screenshot), the image
was sent as base64 text, which costs roughly one token per byte of the
image file. The prompt grew far beyond what was recorded, and a few
screenshots could exceed the context window.
- **Anywhere else** (an image block in a user message, an `image_url`
part, an OTel `blob` part), the image was dropped, so the prompt was
smaller than recorded.

Recorded images now replay as image parts, in their recorded position,
with the same bytes on every call:

| Recorded API | Where the image is |
|---|---|
| Anthropic Messages | `image` blocks in user messages and inside
`tool_result` |
| Chat Completions | `image_url` parts in any message, including `role:
"tool"` |
| Responses | `input_image` in `message` and `function_call_output`;
computer use's `computer_call` / `computer_call_output`, replayed as
calls to a `computer` function |
| OTel GenAI | `blob` / `uri` parts |

The `anthropic_messages` renderer sends images natively, including
inside `tool_result`. Images are not resized, pruned or moved: the trace
already reflects the client's image policy. Any recorded API can be
replayed with either `api.type`; with `chat`, a tool-result image stays
in the `role: "tool"` message, where the server's chat template decides
whether the model sees it. Text-only traces replay unchanged.

Also in this change:
- **Claude Code raw-body logs.** A streamed Anthropic request whose
recorded response is one assembled JSON `message` is accepted; a
truncated stream or an error body is still skipped. Claude Code's
`OTEL_LOG_RAW_API_BODIES` files record streamed calls this way.
- **Missing-image warning.** A trace that no longer carries an image's
bytes logs one warning with the count. This covers redacted images,
`[image]` / Langfuse placeho... (continued)

253 of 264 new or added lines in 8 files covered. (95.83%)

12360 of 14778 relevant lines covered (83.64%)

0.84 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
94.12
inference_perf/apis/image_parts.py
2
87.68
0.2% inference_perf/datagen/replay/replay_graph_session_datagen.py
1
90.7
3.93% inference_perf/apis/anthropic_messages.py
1
56.0
2.38% inference_perf/client/modelserver/otel_instrumentation.py
1
82.01
1.53% inference_perf/datagen/replay/otel_trace_to_replay_graph.py
1
58.11
1.66% inference_perf/datagen/replay/otel_trace_utils.py
Jobs
ID Job ID Ran Files Coverage
1 39285023412.1 19 Oct 2026 04:32PM UTC 136
83.64
GitHub Action Run
Source Files on build 39285023412
  • Tree
  • List 136
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39285023412
  • e133f9c2 on github
  • Prev Build on main (#39233880775)
  • Next Build on main (#39337572130)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc