Skip to content

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

Closed

Description

@unkn0wncode

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

Activity

  1. andrewneilson commented on Jul 24, 2025

    @andrewneilson

    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.

  2. self-assigned this
    on Jul 25, 2025
  3. agluck91 commented on Jul 26, 2025

    @agluck91

    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.

  4. alioshr commented on Jul 27, 2025

    @alioshr

    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?

  5. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions