mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 20:21:39 +03:00
fix(ai): classify Together input token rejections as context overflow (#52133)
This commit is contained in:
committed by
GitHub
Unverified
parent
e2948f5a51
commit
5d707f1a2b
@@ -35,6 +35,8 @@ const patterns = [
|
||||
/exceeds the limit of \d+/i,
|
||||
/exceeds the available context size/i,
|
||||
/greater than the context length/i,
|
||||
// Hugging Face Text Generation Inference, e.g. Together
|
||||
/`inputs` tokens \+ `max_new_tokens` must be <= \d+/i,
|
||||
/context window exceeds limit/i,
|
||||
/exceeded model token limit/i,
|
||||
/context[_ ]length[_ ]exceeded/i,
|
||||
|
||||
@@ -15,6 +15,7 @@ describe("provider error classification", () => {
|
||||
"Prompt has 5,958,968 tokens, but the configured context size is 256,000 tokens",
|
||||
"Range of input length should be [1, 129024]",
|
||||
"Too many tokens",
|
||||
"Input validation error: `inputs` tokens + `max_new_tokens` must be <= 131073. Given: 600035 `inputs` tokens and 16 `max_new_tokens`",
|
||||
"Token limit exceeded",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user