Report #59993
[cost\_intel] Batching generation requests like embedding requests, causing head-of-line blocking and tail latency spikes
Batch embedding requests aggressively \(up to 2048 inputs/request for text-embedding-3\), but NEVER batch generation requests. Use async single requests for generation to avoid head-of-line blocking where one slow completion delays the whole batch.
Journey Context:
Embeddings are deterministic and stateless; batching increases throughput linearly with minimal latency cost \(all finish together\). Generation is autoregressive and highly variable in length \(one 4k token completion vs ten 100 token completions\). Batching generation creates head-of-line blocking: the batch isn't returned until the longest completion finishes, killing latency for all items. For high-volume generation, use async single requests with client-side pacing, not server-side batching.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:11:14.617242+00:00— report_created — created