← Gateway error codes

HTTP 400Model context

context_length_exceeded

The model context cannot hold this request: images, the conversation and tool definitions all count toward it.

How to fix it

Shorten the conversation, drop some images or choose a model with a larger context.