The proxy only added a request's prompt tokens from the final usage chunk, so a long prefill showed as a flat prompt rate and then one spike (prompt size over a 2 s sample), and requests the client abandoned mid-prefill were never counted. mlx_lm.server already streams ": keepalive <done>/<total>" after each prefill step; count those as they pass through, and top up from the usage chunk. Also leave out prompt-cache hits (cached_tokens), which take no processing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca |
||
|---|---|---|
| .. | ||
| backends | ||
| web | ||
| __init__.py | ||
| __main__.py | ||
| catalog.json | ||
| cli.py | ||
| hfcache.py | ||
| hw.py | ||
| opencode.py | ||
| paths.py | ||
| plan.py | ||
| service.py | ||