Skip to content

Commit e26b6ee

Browse files
authored
Merge pull request #127 from browser-use/fireworks-image-overflow
fix(llm): compact on provider image limits
2 parents 00781d5 + 2968a2a commit e26b6ee

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/llm/src/provider-error.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const patterns = [
2929
/model_context_window_exceeded/i,
3030
/too many tokens/i,
3131
/token limit exceeded/i,
32+
/too many images (?:were )?provided/i,
3233
]
3334

3435
const exclusions = [/^(throttling error|service unavailable):/i, /rate limit/i, /too many requests/i]

‎packages/llm/test/provider-error.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe("provider error classification", () => {
1313
"Prompt has 5,958,968 tokens, but the configured context size is 256,000 tokens",
1414
"Too many tokens",
1515
"Token limit exceeded",
16+
"Too many images were provided, we currently limit the number of images per conversation to 60",
1617
]
1718

1819
expect(messages.every(isContextOverflow)).toBe(true)

‎packages/opencode/test/session/message-v2.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ describe("session.message-v2.fromError", () => {
14621462
"Please reduce the length of the messages or completion",
14631463
"400 status code (no body)",
14641464
"413 status code (no body)",
1465+
"Too many images were provided, we currently limit the number of images per conversation to 60",
14651466
]
14661467

14671468
cases.forEach((message) => {

0 commit comments

Comments
 (0)