parseContextOverflow
function parseContextOverflow(err, body?): | ContextOverflowInfo | undefined;Defined in: core/src/errors.ts:669
Extracts context overflow details from provider error messages.
Covers:
- Anthropic / Bedrock:
input length and \max_tokens` exceed context limit: 188059 + 20000 > 200000` - Standard / Gateway:
prompt is too long: 137500 tokens > 135000 maximum
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
err |
unknown |
body? |
string |
Returns
Section titled “Returns”| ContextOverflowInfo
| undefined