@dreb/ai 2.68.0 → 2.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"overflow.d.ts","sourceRoot":"","sources":["../../src/utils/overflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA6BpD,MAAM,WAAW,sBAAsB;IACtC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAM1E;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,gBAAgB,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,GAAE,sBAA2B,GAClC,OAAO,CA4CT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C","sourcesContent":["import type { AssistantMessage } from \"../types.js\";\n\n/**\n * Regex patterns to detect context overflow errors from different providers.\n *\n * These patterns match error messages returned when the input exceeds\n * the model's context window.\n *\n * Provider-specific patterns (with example error messages):\n *\n * - Anthropic: \"prompt is too long: 213462 tokens > 200000 maximum\"\n * - OpenAI: \"Your input exceeds the context window of this model\"\n * - Google: \"The input token count (1196265) exceeds the maximum number of tokens allowed (1048575)\"\n * - xAI: \"This model's maximum prompt length is 131072 but the request contains 537812 tokens\"\n * - Groq: \"Please reduce the length of the messages or completion\"\n * - OpenRouter: \"This endpoint's maximum context length is X tokens. However, you requested about Y tokens\"\n * - llama.cpp: \"the request exceeds the available context size, try increasing it\"\n * - LM Studio: \"tokens to keep from the initial prompt is greater than the context length\"\n * - GitHub Copilot: \"prompt token count of X exceeds the limit of Y\"\n * - MiniMax: \"invalid params, context window exceeds limit\"\n * - Kimi For Coding: \"Your request exceeded model token limit: X (requested: Y)\"\n * - Cerebras: Returns \"400/413 status code (no body)\" - handled separately below\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - z.ai: May accept overflow silently - handled via full input usage > contextWindow\n * - Ollama: Silently truncates input - not detectable via error message\n */\nconst LENGTH_RETRY_EXHAUSTED_PATTERN =\n\t/^Response truncated at (?:the configured output token limit|token limit) after \\d+ attempts?(?: — output exceeded the model's maximum token budget)?(?:\\nProvider detail: .+)?$/is;\n\nexport interface ContextOverflowOptions {\n\t/** Maximum output tokens requested for the exhausted response. */\n\tmaxOutputTokens?: number;\n\t/** Estimated request-input tokens when the provider omitted usage. */\n\testimatedInputTokens?: number;\n}\n\n/** Whether the agent exhausted its bounded retries at the configured output limit. */\nexport function isOutputLimitExhaustion(message: AssistantMessage): boolean {\n\treturn (\n\t\tmessage.stopReason === \"error\" &&\n\t\ttypeof message.errorMessage === \"string\" &&\n\t\tLENGTH_RETRY_EXHAUSTED_PATTERN.test(message.errorMessage)\n\t);\n}\n\nconst OVERFLOW_PATTERNS = [\n\t/prompt is too long/i, // Anthropic\n\t/input is too long for requested model/i, // Amazon Bedrock\n\t/exceeds the context window/i, // OpenAI (Completions & Responses API)\n\t/input token count.*exceeds the maximum/i, // Google (Gemini)\n\t/maximum prompt length is \\d+/i, // xAI (Grok)\n\t/reduce the length of the messages/i, // Groq\n\t/maximum context length is \\d+ tokens/i, // OpenRouter (all backends)\n\t/exceeds the limit of \\d+/i, // GitHub Copilot\n\t/exceeds the available context size/i, // llama.cpp server\n\t/greater than the context length/i, // LM Studio\n\t/context window exceeds limit/i, // MiniMax\n\t/exceeded model token limit/i, // Kimi For Coding\n\t/too large for model with \\d+ maximum context length/i, // Mistral\n\t/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text\n\t/context[_ ]length[_ ]exceeded/i, // Generic fallback\n\t/too many tokens/i, // Generic fallback\n\t/token limit exceeded/i, // Generic fallback\n];\n\n/**\n * Check if an assistant message represents a context overflow error.\n *\n * This handles three cases:\n * 1. Error-based overflow: Most providers return stopReason \"error\" with a\n * specific error message pattern.\n * 2. Context-constrained truncation: dreb exhausted its length retries and the\n * provider signal or input-plus-configured-output budget indicates that the\n * response may not have fit in the remaining context window.\n * 3. Silent overflow: Some providers accept requests beyond the configured window\n * and return successfully (the server's hard limit may be higher). For these,\n * we compare input + cacheRead + cacheWrite against the configured window;\n * output tokens are not part of the input size.\n *\n * ## Reliability by Provider\n *\n * **Reliable detection (returns error with detectable message):**\n * - Anthropic: \"prompt is too long: X tokens > Y maximum\"\n * - OpenAI (Completions & Responses): \"exceeds the context window\"\n * - Google Gemini: \"input token count exceeds the maximum\"\n * - xAI (Grok): \"maximum prompt length is X but request contains Y\"\n * - Groq: \"reduce the length of the messages\"\n * - Cerebras: 400/413 status code (no body)\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - OpenRouter (all backends): \"maximum context length is X tokens\"\n * - llama.cpp: \"exceeds the available context size\"\n * - LM Studio: \"greater than the context length\"\n * - Kimi For Coding: \"exceeded model token limit: X (requested: Y)\"\n *\n * **Unreliable detection:**\n * - z.ai: Sometimes accepts overflow silently, sometimes returns rate limit errors.\n * - GitHub Copilot: May accept input beyond a conservative configured window.\n * Pass contextWindow to detect these cases using input + cacheRead + cacheWrite.\n * - Ollama: Silently truncates input without error. Cannot be detected via this function.\n * The response will have usage.input < expected, but we don't know the expected value.\n *\n * ## Custom Providers\n *\n * If you've added custom models via settings.json, this function may not detect\n * overflow errors from those providers. To add support:\n *\n * 1. Send a request that exceeds the model's context window\n * 2. Check the errorMessage in the response\n * 3. Create a regex pattern that matches the error\n * 4. The pattern should be added to OVERFLOW_PATTERNS in this file, or\n * check the errorMessage yourself before calling this function\n *\n * @param message - The assistant message to check\n * @param contextWindow - Optional configured window for usage-based overflow detection\n * @param options - Output limit and input estimate used only after bounded length retries are exhausted\n * @returns true if the message indicates a context overflow\n */\nexport function isContextOverflow(\n\tmessage: AssistantMessage,\n\tcontextWindow?: number,\n\toptions: ContextOverflowOptions = {},\n): boolean {\n\t// Case 1: Check error message patterns\n\tif (message.stopReason === \"error\" && message.errorMessage) {\n\t\t// Check known patterns\n\t\tif (OVERFLOW_PATTERNS.some((p) => p.test(message.errorMessage!))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Cerebras returns 400/413 with no body for context overflow\n\t\t// Note: 429 is rate limiting (requests/tokens per time), NOT context overflow\n\t\tif (/^4(00|13)\\s*(status code)?\\s*\\(no body\\)/i.test(message.errorMessage)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A provider can report finish_reason \"length\" when the response ran out of\n\t\t// context rather than output allowance. dreb turns an exhausted retry sequence\n\t\t// into this error. Classify it as overflow only when actual usage reaches the\n\t\t// context ceiling or the configured output could not fit beside the request.\n\t\tif (contextWindow && isOutputLimitExhaustion(message)) {\n\t\t\tconst usageTokens =\n\t\t\t\tmessage.usage.totalTokens ||\n\t\t\t\tmessage.usage.input + message.usage.output + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tif (usageTokens >= contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst recordedInput = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tconst inputTokens = recordedInput || options.estimatedInputTokens || 0;\n\t\t\tif (options.maxOutputTokens && inputTokens + options.maxOutputTokens > contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Case 3: Successful response whose full input usage exceeds the configured window.\n\t// Anthropic-style usage reports cache creation separately from uncached input.\n\tif (contextWindow && message.stopReason === \"stop\") {\n\t\tconst inputTokens = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\tif (inputTokens > contextWindow) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Get the overflow patterns for testing purposes.\n */\nexport function getOverflowPatterns(): RegExp[] {\n\treturn [...OVERFLOW_PATTERNS];\n}\n"]}
1
+ {"version":3,"file":"overflow.d.ts","sourceRoot":"","sources":["../../src/utils/overflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA8BpD,MAAM,WAAW,sBAAsB;IACtC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAM1E;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,gBAAgB,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,GAAE,sBAA2B,GAClC,OAAO,CA4CT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C","sourcesContent":["import type { AssistantMessage } from \"../types.js\";\n\n/**\n * Regex patterns to detect context overflow errors from different providers.\n *\n * These patterns match error messages returned when the input exceeds\n * the model's context window.\n *\n * Provider-specific patterns (with example error messages):\n *\n * - Anthropic: \"prompt is too long: 213462 tokens > 200000 maximum\"\n * - OpenAI: \"Your input exceeds the context window of this model\"\n * - Google: \"The input token count (1196265) exceeds the maximum number of tokens allowed (1048575)\"\n * - xAI: \"This model's maximum prompt length is 131072 but the request contains 537812 tokens\"\n * - Groq: \"Please reduce the length of the messages or completion\"\n * - OpenRouter: \"This endpoint's maximum context length is X tokens. However, you requested about Y tokens\"\n * - llama.cpp: \"the request exceeds the available context size, try increasing it\"\n * - LM Studio: \"tokens to keep from the initial prompt is greater than the context length\"\n * - GitHub Copilot: \"prompt token count of X exceeds the limit of Y\", or an HTTP\n * \"413 Request Entity Too Large\" when the request body is rejected before tokenization\n * - MiniMax: \"invalid params, context window exceeds limit\"\n * - Kimi For Coding: \"Your request exceeded model token limit: X (requested: Y)\"\n * - Cerebras: Returns \"400/413 status code (no body)\" - handled separately below\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - z.ai: May accept overflow silently - handled via full input usage > contextWindow\n * - Ollama: Silently truncates input - not detectable via error message\n */\nconst LENGTH_RETRY_EXHAUSTED_PATTERN =\n\t/^Response truncated at (?:the configured output token limit|token limit) after \\d+ attempts?(?: — output exceeded the model's maximum token budget)?(?:\\nProvider detail: .+)?$/is;\n\nexport interface ContextOverflowOptions {\n\t/** Maximum output tokens requested for the exhausted response. */\n\tmaxOutputTokens?: number;\n\t/** Estimated request-input tokens when the provider omitted usage. */\n\testimatedInputTokens?: number;\n}\n\n/** Whether the agent exhausted its bounded retries at the configured output limit. */\nexport function isOutputLimitExhaustion(message: AssistantMessage): boolean {\n\treturn (\n\t\tmessage.stopReason === \"error\" &&\n\t\ttypeof message.errorMessage === \"string\" &&\n\t\tLENGTH_RETRY_EXHAUSTED_PATTERN.test(message.errorMessage)\n\t);\n}\n\nconst OVERFLOW_PATTERNS = [\n\t/prompt is too long/i, // Anthropic\n\t/input is too long for requested model/i, // Amazon Bedrock\n\t/exceeds the context window/i, // OpenAI (Completions & Responses API)\n\t/input token count.*exceeds the maximum/i, // Google (Gemini)\n\t/maximum prompt length is \\d+/i, // xAI (Grok)\n\t/reduce the length of the messages/i, // Groq\n\t/maximum context length is \\d+ tokens/i, // OpenRouter (all backends)\n\t/exceeds the limit of \\d+/i, // GitHub Copilot\n\t/^413\\b.*request entity too large/i, // GitHub Copilot (body rejected before token check)\n\t/exceeds the available context size/i, // llama.cpp server\n\t/greater than the context length/i, // LM Studio\n\t/context window exceeds limit/i, // MiniMax\n\t/exceeded model token limit/i, // Kimi For Coding\n\t/too large for model with \\d+ maximum context length/i, // Mistral\n\t/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text\n\t/context[_ ]length[_ ]exceeded/i, // Generic fallback\n\t/too many tokens/i, // Generic fallback\n\t/token limit exceeded/i, // Generic fallback\n];\n\n/**\n * Check if an assistant message represents a context overflow error.\n *\n * This handles three cases:\n * 1. Error-based overflow: Most providers return stopReason \"error\" with a\n * specific error message pattern.\n * 2. Context-constrained truncation: dreb exhausted its length retries and the\n * provider signal or input-plus-configured-output budget indicates that the\n * response may not have fit in the remaining context window.\n * 3. Silent overflow: Some providers accept requests beyond the configured window\n * and return successfully (the server's hard limit may be higher). For these,\n * we compare input + cacheRead + cacheWrite against the configured window;\n * output tokens are not part of the input size.\n *\n * ## Reliability by Provider\n *\n * **Reliable detection (returns error with detectable message):**\n * - Anthropic: \"prompt is too long: X tokens > Y maximum\"\n * - OpenAI (Completions & Responses): \"exceeds the context window\"\n * - Google Gemini: \"input token count exceeds the maximum\"\n * - xAI (Grok): \"maximum prompt length is X but request contains Y\"\n * - Groq: \"reduce the length of the messages\"\n * - Cerebras: 400/413 status code (no body)\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - OpenRouter (all backends): \"maximum context length is X tokens\"\n * - llama.cpp: \"exceeds the available context size\"\n * - LM Studio: \"greater than the context length\"\n * - Kimi For Coding: \"exceeded model token limit: X (requested: Y)\"\n *\n * **Unreliable detection:**\n * - z.ai: Sometimes accepts overflow silently, sometimes returns rate limit errors.\n * - GitHub Copilot: May accept input beyond a conservative configured window.\n * Pass contextWindow to detect these cases using input + cacheRead + cacheWrite.\n * - Ollama: Silently truncates input without error. Cannot be detected via this function.\n * The response will have usage.input < expected, but we don't know the expected value.\n *\n * ## Custom Providers\n *\n * If you've added custom models via settings.json, this function may not detect\n * overflow errors from those providers. To add support:\n *\n * 1. Send a request that exceeds the model's context window\n * 2. Check the errorMessage in the response\n * 3. Create a regex pattern that matches the error\n * 4. The pattern should be added to OVERFLOW_PATTERNS in this file, or\n * check the errorMessage yourself before calling this function\n *\n * @param message - The assistant message to check\n * @param contextWindow - Optional configured window for usage-based overflow detection\n * @param options - Output limit and input estimate used only after bounded length retries are exhausted\n * @returns true if the message indicates a context overflow\n */\nexport function isContextOverflow(\n\tmessage: AssistantMessage,\n\tcontextWindow?: number,\n\toptions: ContextOverflowOptions = {},\n): boolean {\n\t// Case 1: Check error message patterns\n\tif (message.stopReason === \"error\" && message.errorMessage) {\n\t\t// Check known patterns\n\t\tif (OVERFLOW_PATTERNS.some((p) => p.test(message.errorMessage!))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Cerebras returns 400/413 with no body for context overflow\n\t\t// Note: 429 is rate limiting (requests/tokens per time), NOT context overflow\n\t\tif (/^4(00|13)\\s*(status code)?\\s*\\(no body\\)/i.test(message.errorMessage)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A provider can report finish_reason \"length\" when the response ran out of\n\t\t// context rather than output allowance. dreb turns an exhausted retry sequence\n\t\t// into this error. Classify it as overflow only when actual usage reaches the\n\t\t// context ceiling or the configured output could not fit beside the request.\n\t\tif (contextWindow && isOutputLimitExhaustion(message)) {\n\t\t\tconst usageTokens =\n\t\t\t\tmessage.usage.totalTokens ||\n\t\t\t\tmessage.usage.input + message.usage.output + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tif (usageTokens >= contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst recordedInput = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tconst inputTokens = recordedInput || options.estimatedInputTokens || 0;\n\t\t\tif (options.maxOutputTokens && inputTokens + options.maxOutputTokens > contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Case 3: Successful response whose full input usage exceeds the configured window.\n\t// Anthropic-style usage reports cache creation separately from uncached input.\n\tif (contextWindow && message.stopReason === \"stop\") {\n\t\tconst inputTokens = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\tif (inputTokens > contextWindow) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Get the overflow patterns for testing purposes.\n */\nexport function getOverflowPatterns(): RegExp[] {\n\treturn [...OVERFLOW_PATTERNS];\n}\n"]}
@@ -14,7 +14,8 @@
14
14
  * - OpenRouter: "This endpoint's maximum context length is X tokens. However, you requested about Y tokens"
15
15
  * - llama.cpp: "the request exceeds the available context size, try increasing it"
16
16
  * - LM Studio: "tokens to keep from the initial prompt is greater than the context length"
17
- * - GitHub Copilot: "prompt token count of X exceeds the limit of Y"
17
+ * - GitHub Copilot: "prompt token count of X exceeds the limit of Y", or an HTTP
18
+ * "413 Request Entity Too Large" when the request body is rejected before tokenization
18
19
  * - MiniMax: "invalid params, context window exceeds limit"
19
20
  * - Kimi For Coding: "Your request exceeded model token limit: X (requested: Y)"
20
21
  * - Cerebras: Returns "400/413 status code (no body)" - handled separately below
@@ -38,6 +39,7 @@ const OVERFLOW_PATTERNS = [
38
39
  /reduce the length of the messages/i, // Groq
39
40
  /maximum context length is \d+ tokens/i, // OpenRouter (all backends)
40
41
  /exceeds the limit of \d+/i, // GitHub Copilot
42
+ /^413\b.*request entity too large/i, // GitHub Copilot (body rejected before token check)
41
43
  /exceeds the available context size/i, // llama.cpp server
42
44
  /greater than the context length/i, // LM Studio
43
45
  /context window exceeds limit/i, // MiniMax
@@ -1 +1 @@
1
- {"version":3,"file":"overflow.js","sourceRoot":"","sources":["../../src/utils/overflow.ts"],"names":[],"mappings":"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","sourcesContent":["import type { AssistantMessage } from \"../types.js\";\n\n/**\n * Regex patterns to detect context overflow errors from different providers.\n *\n * These patterns match error messages returned when the input exceeds\n * the model's context window.\n *\n * Provider-specific patterns (with example error messages):\n *\n * - Anthropic: \"prompt is too long: 213462 tokens > 200000 maximum\"\n * - OpenAI: \"Your input exceeds the context window of this model\"\n * - Google: \"The input token count (1196265) exceeds the maximum number of tokens allowed (1048575)\"\n * - xAI: \"This model's maximum prompt length is 131072 but the request contains 537812 tokens\"\n * - Groq: \"Please reduce the length of the messages or completion\"\n * - OpenRouter: \"This endpoint's maximum context length is X tokens. However, you requested about Y tokens\"\n * - llama.cpp: \"the request exceeds the available context size, try increasing it\"\n * - LM Studio: \"tokens to keep from the initial prompt is greater than the context length\"\n * - GitHub Copilot: \"prompt token count of X exceeds the limit of Y\"\n * - MiniMax: \"invalid params, context window exceeds limit\"\n * - Kimi For Coding: \"Your request exceeded model token limit: X (requested: Y)\"\n * - Cerebras: Returns \"400/413 status code (no body)\" - handled separately below\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - z.ai: May accept overflow silently - handled via full input usage > contextWindow\n * - Ollama: Silently truncates input - not detectable via error message\n */\nconst LENGTH_RETRY_EXHAUSTED_PATTERN =\n\t/^Response truncated at (?:the configured output token limit|token limit) after \\d+ attempts?(?: — output exceeded the model's maximum token budget)?(?:\\nProvider detail: .+)?$/is;\n\nexport interface ContextOverflowOptions {\n\t/** Maximum output tokens requested for the exhausted response. */\n\tmaxOutputTokens?: number;\n\t/** Estimated request-input tokens when the provider omitted usage. */\n\testimatedInputTokens?: number;\n}\n\n/** Whether the agent exhausted its bounded retries at the configured output limit. */\nexport function isOutputLimitExhaustion(message: AssistantMessage): boolean {\n\treturn (\n\t\tmessage.stopReason === \"error\" &&\n\t\ttypeof message.errorMessage === \"string\" &&\n\t\tLENGTH_RETRY_EXHAUSTED_PATTERN.test(message.errorMessage)\n\t);\n}\n\nconst OVERFLOW_PATTERNS = [\n\t/prompt is too long/i, // Anthropic\n\t/input is too long for requested model/i, // Amazon Bedrock\n\t/exceeds the context window/i, // OpenAI (Completions & Responses API)\n\t/input token count.*exceeds the maximum/i, // Google (Gemini)\n\t/maximum prompt length is \\d+/i, // xAI (Grok)\n\t/reduce the length of the messages/i, // Groq\n\t/maximum context length is \\d+ tokens/i, // OpenRouter (all backends)\n\t/exceeds the limit of \\d+/i, // GitHub Copilot\n\t/exceeds the available context size/i, // llama.cpp server\n\t/greater than the context length/i, // LM Studio\n\t/context window exceeds limit/i, // MiniMax\n\t/exceeded model token limit/i, // Kimi For Coding\n\t/too large for model with \\d+ maximum context length/i, // Mistral\n\t/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text\n\t/context[_ ]length[_ ]exceeded/i, // Generic fallback\n\t/too many tokens/i, // Generic fallback\n\t/token limit exceeded/i, // Generic fallback\n];\n\n/**\n * Check if an assistant message represents a context overflow error.\n *\n * This handles three cases:\n * 1. Error-based overflow: Most providers return stopReason \"error\" with a\n * specific error message pattern.\n * 2. Context-constrained truncation: dreb exhausted its length retries and the\n * provider signal or input-plus-configured-output budget indicates that the\n * response may not have fit in the remaining context window.\n * 3. Silent overflow: Some providers accept requests beyond the configured window\n * and return successfully (the server's hard limit may be higher). For these,\n * we compare input + cacheRead + cacheWrite against the configured window;\n * output tokens are not part of the input size.\n *\n * ## Reliability by Provider\n *\n * **Reliable detection (returns error with detectable message):**\n * - Anthropic: \"prompt is too long: X tokens > Y maximum\"\n * - OpenAI (Completions & Responses): \"exceeds the context window\"\n * - Google Gemini: \"input token count exceeds the maximum\"\n * - xAI (Grok): \"maximum prompt length is X but request contains Y\"\n * - Groq: \"reduce the length of the messages\"\n * - Cerebras: 400/413 status code (no body)\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - OpenRouter (all backends): \"maximum context length is X tokens\"\n * - llama.cpp: \"exceeds the available context size\"\n * - LM Studio: \"greater than the context length\"\n * - Kimi For Coding: \"exceeded model token limit: X (requested: Y)\"\n *\n * **Unreliable detection:**\n * - z.ai: Sometimes accepts overflow silently, sometimes returns rate limit errors.\n * - GitHub Copilot: May accept input beyond a conservative configured window.\n * Pass contextWindow to detect these cases using input + cacheRead + cacheWrite.\n * - Ollama: Silently truncates input without error. Cannot be detected via this function.\n * The response will have usage.input < expected, but we don't know the expected value.\n *\n * ## Custom Providers\n *\n * If you've added custom models via settings.json, this function may not detect\n * overflow errors from those providers. To add support:\n *\n * 1. Send a request that exceeds the model's context window\n * 2. Check the errorMessage in the response\n * 3. Create a regex pattern that matches the error\n * 4. The pattern should be added to OVERFLOW_PATTERNS in this file, or\n * check the errorMessage yourself before calling this function\n *\n * @param message - The assistant message to check\n * @param contextWindow - Optional configured window for usage-based overflow detection\n * @param options - Output limit and input estimate used only after bounded length retries are exhausted\n * @returns true if the message indicates a context overflow\n */\nexport function isContextOverflow(\n\tmessage: AssistantMessage,\n\tcontextWindow?: number,\n\toptions: ContextOverflowOptions = {},\n): boolean {\n\t// Case 1: Check error message patterns\n\tif (message.stopReason === \"error\" && message.errorMessage) {\n\t\t// Check known patterns\n\t\tif (OVERFLOW_PATTERNS.some((p) => p.test(message.errorMessage!))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Cerebras returns 400/413 with no body for context overflow\n\t\t// Note: 429 is rate limiting (requests/tokens per time), NOT context overflow\n\t\tif (/^4(00|13)\\s*(status code)?\\s*\\(no body\\)/i.test(message.errorMessage)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A provider can report finish_reason \"length\" when the response ran out of\n\t\t// context rather than output allowance. dreb turns an exhausted retry sequence\n\t\t// into this error. Classify it as overflow only when actual usage reaches the\n\t\t// context ceiling or the configured output could not fit beside the request.\n\t\tif (contextWindow && isOutputLimitExhaustion(message)) {\n\t\t\tconst usageTokens =\n\t\t\t\tmessage.usage.totalTokens ||\n\t\t\t\tmessage.usage.input + message.usage.output + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tif (usageTokens >= contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst recordedInput = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tconst inputTokens = recordedInput || options.estimatedInputTokens || 0;\n\t\t\tif (options.maxOutputTokens && inputTokens + options.maxOutputTokens > contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Case 3: Successful response whose full input usage exceeds the configured window.\n\t// Anthropic-style usage reports cache creation separately from uncached input.\n\tif (contextWindow && message.stopReason === \"stop\") {\n\t\tconst inputTokens = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\tif (inputTokens > contextWindow) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Get the overflow patterns for testing purposes.\n */\nexport function getOverflowPatterns(): RegExp[] {\n\treturn [...OVERFLOW_PATTERNS];\n}\n"]}
1
+ {"version":3,"file":"overflow.js","sourceRoot":"","sources":["../../src/utils/overflow.ts"],"names":[],"mappings":"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","sourcesContent":["import type { AssistantMessage } from \"../types.js\";\n\n/**\n * Regex patterns to detect context overflow errors from different providers.\n *\n * These patterns match error messages returned when the input exceeds\n * the model's context window.\n *\n * Provider-specific patterns (with example error messages):\n *\n * - Anthropic: \"prompt is too long: 213462 tokens > 200000 maximum\"\n * - OpenAI: \"Your input exceeds the context window of this model\"\n * - Google: \"The input token count (1196265) exceeds the maximum number of tokens allowed (1048575)\"\n * - xAI: \"This model's maximum prompt length is 131072 but the request contains 537812 tokens\"\n * - Groq: \"Please reduce the length of the messages or completion\"\n * - OpenRouter: \"This endpoint's maximum context length is X tokens. However, you requested about Y tokens\"\n * - llama.cpp: \"the request exceeds the available context size, try increasing it\"\n * - LM Studio: \"tokens to keep from the initial prompt is greater than the context length\"\n * - GitHub Copilot: \"prompt token count of X exceeds the limit of Y\", or an HTTP\n * \"413 Request Entity Too Large\" when the request body is rejected before tokenization\n * - MiniMax: \"invalid params, context window exceeds limit\"\n * - Kimi For Coding: \"Your request exceeded model token limit: X (requested: Y)\"\n * - Cerebras: Returns \"400/413 status code (no body)\" - handled separately below\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - z.ai: May accept overflow silently - handled via full input usage > contextWindow\n * - Ollama: Silently truncates input - not detectable via error message\n */\nconst LENGTH_RETRY_EXHAUSTED_PATTERN =\n\t/^Response truncated at (?:the configured output token limit|token limit) after \\d+ attempts?(?: — output exceeded the model's maximum token budget)?(?:\\nProvider detail: .+)?$/is;\n\nexport interface ContextOverflowOptions {\n\t/** Maximum output tokens requested for the exhausted response. */\n\tmaxOutputTokens?: number;\n\t/** Estimated request-input tokens when the provider omitted usage. */\n\testimatedInputTokens?: number;\n}\n\n/** Whether the agent exhausted its bounded retries at the configured output limit. */\nexport function isOutputLimitExhaustion(message: AssistantMessage): boolean {\n\treturn (\n\t\tmessage.stopReason === \"error\" &&\n\t\ttypeof message.errorMessage === \"string\" &&\n\t\tLENGTH_RETRY_EXHAUSTED_PATTERN.test(message.errorMessage)\n\t);\n}\n\nconst OVERFLOW_PATTERNS = [\n\t/prompt is too long/i, // Anthropic\n\t/input is too long for requested model/i, // Amazon Bedrock\n\t/exceeds the context window/i, // OpenAI (Completions & Responses API)\n\t/input token count.*exceeds the maximum/i, // Google (Gemini)\n\t/maximum prompt length is \\d+/i, // xAI (Grok)\n\t/reduce the length of the messages/i, // Groq\n\t/maximum context length is \\d+ tokens/i, // OpenRouter (all backends)\n\t/exceeds the limit of \\d+/i, // GitHub Copilot\n\t/^413\\b.*request entity too large/i, // GitHub Copilot (body rejected before token check)\n\t/exceeds the available context size/i, // llama.cpp server\n\t/greater than the context length/i, // LM Studio\n\t/context window exceeds limit/i, // MiniMax\n\t/exceeded model token limit/i, // Kimi For Coding\n\t/too large for model with \\d+ maximum context length/i, // Mistral\n\t/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text\n\t/context[_ ]length[_ ]exceeded/i, // Generic fallback\n\t/too many tokens/i, // Generic fallback\n\t/token limit exceeded/i, // Generic fallback\n];\n\n/**\n * Check if an assistant message represents a context overflow error.\n *\n * This handles three cases:\n * 1. Error-based overflow: Most providers return stopReason \"error\" with a\n * specific error message pattern.\n * 2. Context-constrained truncation: dreb exhausted its length retries and the\n * provider signal or input-plus-configured-output budget indicates that the\n * response may not have fit in the remaining context window.\n * 3. Silent overflow: Some providers accept requests beyond the configured window\n * and return successfully (the server's hard limit may be higher). For these,\n * we compare input + cacheRead + cacheWrite against the configured window;\n * output tokens are not part of the input size.\n *\n * ## Reliability by Provider\n *\n * **Reliable detection (returns error with detectable message):**\n * - Anthropic: \"prompt is too long: X tokens > Y maximum\"\n * - OpenAI (Completions & Responses): \"exceeds the context window\"\n * - Google Gemini: \"input token count exceeds the maximum\"\n * - xAI (Grok): \"maximum prompt length is X but request contains Y\"\n * - Groq: \"reduce the length of the messages\"\n * - Cerebras: 400/413 status code (no body)\n * - Mistral: \"Prompt contains X tokens ... too large for model with Y maximum context length\"\n * - OpenRouter (all backends): \"maximum context length is X tokens\"\n * - llama.cpp: \"exceeds the available context size\"\n * - LM Studio: \"greater than the context length\"\n * - Kimi For Coding: \"exceeded model token limit: X (requested: Y)\"\n *\n * **Unreliable detection:**\n * - z.ai: Sometimes accepts overflow silently, sometimes returns rate limit errors.\n * - GitHub Copilot: May accept input beyond a conservative configured window.\n * Pass contextWindow to detect these cases using input + cacheRead + cacheWrite.\n * - Ollama: Silently truncates input without error. Cannot be detected via this function.\n * The response will have usage.input < expected, but we don't know the expected value.\n *\n * ## Custom Providers\n *\n * If you've added custom models via settings.json, this function may not detect\n * overflow errors from those providers. To add support:\n *\n * 1. Send a request that exceeds the model's context window\n * 2. Check the errorMessage in the response\n * 3. Create a regex pattern that matches the error\n * 4. The pattern should be added to OVERFLOW_PATTERNS in this file, or\n * check the errorMessage yourself before calling this function\n *\n * @param message - The assistant message to check\n * @param contextWindow - Optional configured window for usage-based overflow detection\n * @param options - Output limit and input estimate used only after bounded length retries are exhausted\n * @returns true if the message indicates a context overflow\n */\nexport function isContextOverflow(\n\tmessage: AssistantMessage,\n\tcontextWindow?: number,\n\toptions: ContextOverflowOptions = {},\n): boolean {\n\t// Case 1: Check error message patterns\n\tif (message.stopReason === \"error\" && message.errorMessage) {\n\t\t// Check known patterns\n\t\tif (OVERFLOW_PATTERNS.some((p) => p.test(message.errorMessage!))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Cerebras returns 400/413 with no body for context overflow\n\t\t// Note: 429 is rate limiting (requests/tokens per time), NOT context overflow\n\t\tif (/^4(00|13)\\s*(status code)?\\s*\\(no body\\)/i.test(message.errorMessage)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A provider can report finish_reason \"length\" when the response ran out of\n\t\t// context rather than output allowance. dreb turns an exhausted retry sequence\n\t\t// into this error. Classify it as overflow only when actual usage reaches the\n\t\t// context ceiling or the configured output could not fit beside the request.\n\t\tif (contextWindow && isOutputLimitExhaustion(message)) {\n\t\t\tconst usageTokens =\n\t\t\t\tmessage.usage.totalTokens ||\n\t\t\t\tmessage.usage.input + message.usage.output + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tif (usageTokens >= contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst recordedInput = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\t\tconst inputTokens = recordedInput || options.estimatedInputTokens || 0;\n\t\t\tif (options.maxOutputTokens && inputTokens + options.maxOutputTokens > contextWindow) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Case 3: Successful response whose full input usage exceeds the configured window.\n\t// Anthropic-style usage reports cache creation separately from uncached input.\n\tif (contextWindow && message.stopReason === \"stop\") {\n\t\tconst inputTokens = message.usage.input + message.usage.cacheRead + message.usage.cacheWrite;\n\t\tif (inputTokens > contextWindow) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Get the overflow patterns for testing purposes.\n */\nexport function getOverflowPatterns(): RegExp[] {\n\treturn [...OVERFLOW_PATTERNS];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/ai",
3
- "version": "2.68.0",
3
+ "version": "2.69.0",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",