Change8
Error1 reports

Fix ContextWindowExceededError

in AutoGen

Solution

The ContextWindowExceededError in autogen usually happens when the total length of the prompt, messages, and tool outputs exceeds the model's token limit. Reduce the size of your messages by summarizing previous conversations, shortening tool names and descriptions, or limiting the number of tools involved. Consider using a model with a larger context window if message length cannot be reduced.

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Apr 23, 2025
Last reported:Apr 23, 2025

Need More Help?

View the full changelog and migration guides for AutoGen

View AutoGen Changelog