web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / OpenAIMaxTokenLengthEx...
Copilot Studio
Suggested Answer

OpenAIMaxTokenLengthExceeded error

(0) ShareShare
ReportReport
Posted on by 10
Hi,
I have created an agent that utilizes multiple topics and agents. When I provide a query that uses multiple topics or agents (or sometimes just using single topic), it gives the following error:
Error Message: The request is resulting in a response that is too large to handle, please try re-phrasing the question to be more precise. Error Code: OpenAIMaxTokenLengthExceeded
 
Now I understand what this error means, its that the model/agent that is running is somehow exceeding the token limit that it operates on (judging by the response message, the output tokens limit is exceeded). But the problem that I am facing is that I dont see it anywhere in the documentation of copilot studio or copilot agents about what exactly are the token limits for each agent call. And even in the error codes documentation provided, OpenAIMaxTokenLengthExceeded is not even mentioned. My use case requires somewhat of a large input, and when I use regular API call to openAI gpt-4o-mini, it is able to easily provide me with the output. For me, right now this seems like a dead end
Categories:
Screenshot 2025-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,504 Super User 2025 Season 2 on at
     
    Totally get your concern and I cannot tell you what it is. What I can say though, that if your prompt is triggering many different Topics you are going to get this. You have to make sure your topics are not overlapping, or doing massive fallbacks or conversation boosting.
     
    I get you have a large input, but if you turn off all topic except the one you WANT to give the answer, do you still get the issue?
     
    and I do mean turn off ALL prompts, system and custom, but one and try again
  • PS-25060612-0 Profile Picture
    10 on at
    Hi Michael,

    Thanks for responding. I have tried to do my entire steps in one single topic and it does work. But for me that just defeats the point of having an "agent" with multiple tools, topics or other agent access (Plus it seems there is no native support to run some steps parallelly/asynchronously in topics). And this is the reason I was looking for the token limit for the models that are used for my agents to get a better clarity on things, as to what usecases does copilot agent allow and where it has its shortcomings. And this is also suprising since we have used these LLM models in our webapp based solutions (not specifically agents but simple LLM calls) and there we have rarely encountered token limit exceeded errors (with >128k total tokens limit and >16k output token limit). I highly doubt that the context we are working with here are that large (markdown based webpage content), and there is limited information as how does the copilot agent manages memory for multiple topic/tools/agent calls, or memory for further user queries
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,504 Super User 2025 Season 2 on at
     
    Without seeing your actual architecture, Topics, triggers etc etc you could be literally retriggering Topics without intending too, overlapping sessions, who knows.
     
    I've never run into the limit myself, you are the first post to ask about hitting it specifically, although I am sure it happens to folks.
     
    So you would have to look at your analytics for each, also looking at it, I see plenty of statements that its 4096 but that some models can do more. each individual 128K total is in effect still but total.
     
    Take a look here
     
    Also here
     
    If this resolves your issue (not helps you fix your design or usage) but answers the limits questions, please mark as such and maybe a like.
     
    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 279 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 200 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 94 Moderator

Last 30 days Overall leaderboard