Low balance and output limits
Before forwarding a request, SERV estimates its maximum cost from the prompt size, the output-token limit (yours, or the model’s maximum if you set none), and any SERV features in use. If your balance cannot cover that ceiling, SERV lowers the request’s maximum output tokens to what the balance can pay for and reports the new limit in thex-openserv-max-output-tokens response header. It returns 402 only when the balance cannot cover even min(256, requested) output tokens. SERV also sends the header when it adds a default limit to an uncapped request for a model with no published output maximum.
A low balance can therefore truncate a response without an error. Keep enough credit for your largest expected responses, watch for the x-openserv-max-output-tokens header, and check finish_reason or the endpoint’s stop reason for truncation.
