agnes-3.0-flash: undocumented hard limit of 4 images per request breaks conversations permanently
Summary
The agnes-3.0-flash text/multimodal chat endpoint rejects any request that carries more than 4 images, with an undocumented 400 error. This limit is not mentioned anywhere in the official docs. Because chat clients resend the whole conversation history (including images) on every turn, once a conversation accumulates a 5th image every subsequent turn fails permanently — the conversation cannot be recovered without starting over.
Environment
- Base URL:
https://apihub.agnes-ai.com/v1(OpenAI-compatible) - Endpoint:
POST /v1/chat/completions - Model:
agnes-3.0-flash - Tested with 64x64 PNG images sent as
image_url(data URI), 5 distinct images
Steps to reproduce
- Send
POST /v1/chat/completionswithmodel: agnes-3.0-flashand ausermessage whosecontentarray contains:- one
{"type":"text",...}block - N
{"type":"image_url","image_url":{"url":"data:image/png;base64,..."}}blocks
- one
- Repeat with N = 4 and N = 5.
Expected vs actual
| N (images in one request) | Result |
|---|---|
| 4 | 200 OK (works) |
| 5 | 400 Bad Request |
Actual response at N = 5:
{
"error": {
"code": "400",
"message": "Agnes: ***.BadRequestError: OpenAIException - {\"object\":\"error\",\"message\":\"Image count 5 exceeds limit 4 per request.\",\"type\":\"BadRequestError\",\"param\":null,\"code\":400}",
"param": null,
"type": "invalid_request_error"
}
}
Why this is a problem
- The limit is 4 images per request, but this is undocumented (absent from the model page, error-code page, and Token Plan FAQ).
- Standard chat/agent clients (OpenAI-compatible SDKs, agent harnesses) resend all prior images in history on each turn. So a conversation that ever holds 5 images gets stuck in a permanent
400loop; the only workaround a client can apply is to drop/offload older images — which it cannot do correctly without knowing the limit up front. - Note this is a per-request count, and it also counts images resent from history, not just newly attached ones.
Suggestions
- Document the limit on the
agnes-3.0-flashmodel page and the error-code page (state clearly that it counts images resent in history too). - Preferably, raise or make the limit configurable — 4 is very low for agent/multi-image workflows.
- Return a distinct, machine-readable error code (e.g.
image_count_exceededwithmax_images/actual_imagesfields) so clients can detect it and auto-offload older images instead of treating it as a generic prepended-string 400.
Thank you!
Thank you for the detailed feedback and suggestions. We’ve noted your comments on the image limit, documentation, and error handling, and will share them with our product and engineering teams for review. We appreciate your input and support.