Copilot models respond with AI_APICallError: Bad Request after a quick chat #900

Closed
opened 2026-02-16 17:28:42 -05:00 by yindo · 4 comments
Owner

Originally created by @unkn0wncode on GitHub (Jul 24, 2025).

Originally assigned to: @thdxr on GitHub.

Hey, noticed that Copilot chats end up with AI_APICallError: Bad Request after a quick chat. It doesn't happen instantly, but after few messages as in shared session below.

This happens both for Claude 4, Gemini 2.5, I think 4.1 and likely other models too.
No MCPs are connected and its a fresh brew installation. Erasing cache folders etc. has no effect.
--print-logs mostly just gives
ERROR 2025-07-24T11:46:40 +5ms service=tui message=AI_APICallError: Bad Request name=UnknownError Server error

This isn't a recent issue, it has been happening for quite a while already, so it isn't result of any latest changes.
I also think its unrelated to #678 and #739 as no MCPs are connected and it doesn't fail right away and it also happens on premium models, but after random amounts of chat, sometimes its few minutes, sometimes its few seconds as in shared session below.
Shared session: https://opencode.ai/s/y17IBo6u

Image
Originally created by @unkn0wncode on GitHub (Jul 24, 2025). Originally assigned to: @thdxr on GitHub. Hey, noticed that Copilot chats end up with AI_APICallError: Bad Request after a quick chat. It doesn't happen instantly, but after few messages as in shared session below. This happens both for Claude 4, Gemini 2.5, I think 4.1 and likely other models too. No MCPs are connected and its a fresh brew installation. Erasing cache folders etc. has no effect. --print-logs mostly just gives `ERROR 2025-07-24T11:46:40 +5ms service=tui message=AI_APICallError: Bad Request name=UnknownError Server error` This isn't a recent issue, it has been happening for quite a while already, so it isn't result of any latest changes. I also think its unrelated to #678 and #739 as no MCPs are connected and it doesn't fail right away and it also happens on premium models, but after random amounts of chat, sometimes its few minutes, sometimes its few seconds as in shared session below. Shared session: https://opencode.ai/s/y17IBo6u <img width="896" height="1174" alt="Image" src="https://github.com/user-attachments/assets/c72c6749-bf36-4ca8-80fc-00427872d991" />
yindo closed this issue 2026-02-16 17:28:42 -05:00
Author
Owner

@andrewneilson commented on GitHub (Jul 24, 2025):

This is happening very quickly in each session. Not sure what changed but I can't use opencode at the moment.

To be more specific: I have been seeing this on Gemini 2.5 Pro and Sonnet 4 via the Github Copilot provider. Just in case it's model/provider specific.

@andrewneilson commented on GitHub (Jul 24, 2025): This is happening very quickly in each session. Not sure what changed but I can't use opencode at the moment. To be more specific: I have been seeing this on Gemini 2.5 Pro and Sonnet 4 via the Github Copilot provider. Just in case it's model/provider specific.
Author
Owner

@agluck91 commented on GitHub (Jul 26, 2025):

I am also experiencing the same problem. With a different tool I saw a git issue that was talking about github possibly marking the api usage as fraudulent use and suspending accounts. Not sure if that is what is happening here, but it is making opencode unusable for me as well.

My account is not suspended like the people in that other tool though because I can still message on github.

@agluck91 commented on GitHub (Jul 26, 2025): I am also experiencing the same problem. With a different tool I saw a git issue that was talking about github possibly marking the api usage as fraudulent use and suspending accounts. Not sure if that is what is happening here, but it is making opencode unusable for me as well. My account is not suspended like the people in that other tool though because I can still message on github.
Author
Owner

@alioshr commented on GitHub (Jul 27, 2025):

I am also experiencing the same problem. With a different tool I saw a git issue that was talking about github possibly marking the api usage as fraudulent use and suspending accounts. Not sure if that is what is happening here, but it is making opencode unusable for me as well.

My account is not suspended like the people in that other tool though because I can still message on github.

cline works perfectly well on vscode with github copilot. I don't think that this is related to this talk about banning the api.

Indeed after removing the mcp servers it works well. It is probably som lack of adapting mcp config to copilot?

@alioshr commented on GitHub (Jul 27, 2025): > I am also experiencing the same problem. With a different tool I saw a git issue that was talking about github possibly marking the api usage as fraudulent use and suspending accounts. Not sure if that is what is happening here, but it is making opencode unusable for me as well. > > My account is not suspended like the people in that other tool though because I can still message on github. cline works perfectly well on vscode with github copilot. I don't think that this is related to this talk about banning the api. Indeed after removing the mcp servers it works well. It is probably som lack of adapting mcp config to copilot?
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#900