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

Community site session details

Session Id :
Copilot Studio - Copilot Studio pre-built Agent...
Suggested answer

Error in Custom Prompt – AIModelActionBadRequest (400)

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I’ve created an agent in Copilot Studio and added a topic flow where the goal is to generate a user story from meeting notes using a Custom Prompt. However, I’m consistently getting the following error

Error Message: The prompt 'Custom prompt 09/08/2025, 03:56:07 PM' ('0f4ec4e3-4029-4e3b-98d7-cc6cec0dfe10') failed to run with response code '400'.  
Error Code: AIModelActionBadRequest  
Conversation Id: cb93a68c-5417-47fc-a55e-f814a45f507f  
Time (UTC): 2025-09-09T05:34:49.005Z

I’ve already tried:

  • Reducing the input size

  • Using plain text instead of JSON

  • Testing the prompt in Prompt Builder (which works fine)

I have the same question (0)
  • Suggested answer
    Jerry-IN Profile Picture
    116 on at
    Error in Custom Prompt – AIModelActionBadRequest (400)
     
    This is a common issue. The fact that your prompt works in the builder but not in the topic almost always means the input data is the problem.
     
    The AIModelActionBadRequest error usually happens because the variable you're feeding into your prompt (the meeting notes) is blank when the topic runs. The prompt gets an empty input and fails.
     
    Here’s the quickest way to check:
    • In your topic, add a "Send a message" action right before the custom prompt action.
    • In this message, just display the variable that holds your meeting notes.
    When you test it again, you'll likely see a blank message from the bot. That confirms the variable is empty, and you just need to trace back and see why it's not being filled correctly earlier in your flow.
     
    Best Regards,
    Jerald Felix

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 420 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 141 Super User 2025 Season 2

#3
Jerry-IN Profile Picture

Jerry-IN 68

Last 30 days Overall leaderboard