| 12137 | * effective prompt suffix evaluated by ds4_session_sync() is written into |
| 12138 | * the live KV cache and can be reused by the next request. */ |
| 12139 | j->req.cache_read_tokens = cached; |
| 12140 | j->req.cache_write_tokens = prompt_tokens > cached ? prompt_tokens - cached : 0; |
| 12141 | |
| 12142 | const double t0 = now_sec(); |
| 12143 | uint64_t trace_id = trace_begin(s, j, cached, prompt_tokens, &cache_diag, |
| 12144 | cache_source, disk_cached, disk_cache_path); |
| 12145 | char ctx_span[48]; |
| 12146 | request_ctx_span(ctx_span, sizeof(ctx_span), cached, prompt_tokens); |
| 12147 | server_prefill_progress progress = { |
| 12148 | .srv = s, |
| 12149 | .slot = slot, |
| 12150 | .kind = j->req.kind, |