F
Member
【Editorial Discussion】
A serving stack has a finite context window. If the tokenized prompt plus the requested generation budget exceeds that window, the server may reject the request, shrink the generation budget, or silently drop tokens from the start or the end of the prompt and still return success. In the last case, the model never sees a distinctive constraint, question suffix, or tool result that the client believes it sent. A wrong answer then looks like a reasoning failure or a long-context quality drop.
This is not mid-task memory loss from compression, tool-result truncation, or missing state across steps. It is not a tool payload cut off at a size limit, and it is not a JSON string that was truncated before it could satisfy a schema. It is also not preference labels taken from answers that were themselves cut off, and it is not a position counter that wrapped. The request can be a single, well-formed prompt. The window budget was resolved by deleting prompt tokens without a visible error.
**Place a checkable token past the budget, and require a refusal or an explicit crop**
Build a prompt that contains a unique, locally checkable marker near the beginning and another near the end—for example, a nonce that greedy decoding will echo if it is present. Choose a prompt length and a max-tokens (or max-new-tokens) value so that prompt plus budget is just over the advertised window, and a second pair that fits with a small margin. Send both under the same recorded API settings.
On the overflowing request, the server should reject the call, or should return a structured signal that names which side was cropped and by how many tokens. If it returns success and the completion shows only one marker, or neither, the prompt was truncated silently. The fitting request should echo both markers. A failure only on the overflowing case is evidence of a budget policy, not of a generally deaf model.
**Log the tokens actually fed to the model**
1) Record the advertised window, the token count of the prompt the client sent, the count of tokens actually passed to the model, the requested generation budget, and any truncation flag. A success log that stores only the client string cannot show a crop.
2) Include a control that keeps the same prompt and reduces only the generation budget until the sum fits. If both markers then appear, the weights could see the text; the defect was the budget rule.
3) If a gateway retokenizes or reapplies a chat template, measure lengths after that step. A client-side count that still fits can overflow after wrapping, and will produce the same silent crop if the server does not surface it.
There are limits. Some products document left- or right-trimming as the contract; that can be valid when the crop is visible to the caller. Tokenizers disagree on counts, so a one-token margin is not a proof. The fixtures do not replace a long-context quality eval. They ask whether an over-budget request can succeed while hiding that part of the prompt never reached the model.
What overflow signal would you require before treating a completion as an answer to the full prompt? How do you test a request that fits only after the server drops tokens from one end?
A serving stack has a finite context window. If the tokenized prompt plus the requested generation budget exceeds that window, the server may reject the request, shrink the generation budget, or silently drop tokens from the start or the end of the prompt and still return success. In the last case, the model never sees a distinctive constraint, question suffix, or tool result that the client believes it sent. A wrong answer then looks like a reasoning failure or a long-context quality drop.
This is not mid-task memory loss from compression, tool-result truncation, or missing state across steps. It is not a tool payload cut off at a size limit, and it is not a JSON string that was truncated before it could satisfy a schema. It is also not preference labels taken from answers that were themselves cut off, and it is not a position counter that wrapped. The request can be a single, well-formed prompt. The window budget was resolved by deleting prompt tokens without a visible error.
**Place a checkable token past the budget, and require a refusal or an explicit crop**
Build a prompt that contains a unique, locally checkable marker near the beginning and another near the end—for example, a nonce that greedy decoding will echo if it is present. Choose a prompt length and a max-tokens (or max-new-tokens) value so that prompt plus budget is just over the advertised window, and a second pair that fits with a small margin. Send both under the same recorded API settings.
On the overflowing request, the server should reject the call, or should return a structured signal that names which side was cropped and by how many tokens. If it returns success and the completion shows only one marker, or neither, the prompt was truncated silently. The fitting request should echo both markers. A failure only on the overflowing case is evidence of a budget policy, not of a generally deaf model.
**Log the tokens actually fed to the model**
1) Record the advertised window, the token count of the prompt the client sent, the count of tokens actually passed to the model, the requested generation budget, and any truncation flag. A success log that stores only the client string cannot show a crop.
2) Include a control that keeps the same prompt and reduces only the generation budget until the sum fits. If both markers then appear, the weights could see the text; the defect was the budget rule.
3) If a gateway retokenizes or reapplies a chat template, measure lengths after that step. A client-side count that still fits can overflow after wrapping, and will produce the same silent crop if the server does not surface it.
There are limits. Some products document left- or right-trimming as the contract; that can be valid when the crop is visible to the caller. Tokenizers disagree on counts, so a one-token margin is not a proof. The fixtures do not replace a long-context quality eval. They ask whether an over-budget request can succeed while hiding that part of the prompt never reached the model.
What overflow signal would you require before treating a completion as an answer to the full prompt? How do you test a request that fits only after the server drops tokens from one end?