﻿# Where does llama.cpp report Anthropic-compatible inference timings?

Read timings from the regular response or the final message_delta event and measure canceled streams separately.

Author: Retrivium editorial team
Updated: 2026-12-01
Canonical URL: https://retrivium.ai/journal/daily-20261201-compute-llama-anthropic-message-timings/
Language: en

The llama.cpp b12855 prerelease, published on November 30, adds a timings object to Anthropic-compatible requests handled by its local server. The upstream change says consumers such as llama-swap could otherwise receive no usable prompt or generation speed for this endpoint. The feature changes where measurement data appears. It does not change the timing behavior of Anthropic’s hosted service.

## Inspect both response shapes

A regular response to `/v1/messages` includes the object in its body. In a streamed response, it appears in the final `message_delta` event. The subsequent `message_stop` event still carries no timing data. A client that looks for metrics only when it sees the stream’s stop event will miss values even when the server sent them successfully.

## Preserve absent measurements

Track a normal completion and a stream canceled before its final delta as separate outcomes. A missing server timing cannot be safely converted to zero tokens per second. Record a client-side clock for observed duration and time to the first visible token. Those measures include effects that server prompt and generation rates may omit, such as client buffering or transport.

## Verify the monitoring path

Send a small fixed prompt with streaming enabled and disabled. Inspect the raw response and confirm that your collector emits one timing observation for each complete request. Then cancel a stream and confirm that metrics distinguish the incomplete run. Compare throughput between API routes only after confirming that the collector extracts equivalent fields under equivalent cache and load conditions.

## Report throughput with its denominator

A prompt speed can change when the server reuses a prefix or processes several requests together. Keep separate records for cached and uncached requests. Capture the prompt length, generated length and concurrency alongside each timing. In a dashboard, pair completion throughput with the share of streams from which a timing was available. A recent change in cancellation rate can shift that share before it affects overall service performance. For a capacity test, pin a build and compare the same sequence of workload runs across routes.

## Sources

- [Primary source · llama.cpp b12855](https://github.com/ggml-org/llama.cpp/releases/tag/b12855)
- [Primary source · llama.cpp #30244](https://github.com/ggml-org/llama.cpp/pull/30244)

## Related reading

- [How can a shared llama-bench KV parser improve benchmark comparisons?](/journal/daily-20261130-compute-llama-kv-parser-benchmark-parity/)
- [HTTP response integrity: Content-Length, chunked transfer and truncation](/journal/provider-http-message-framing-integrity/)
