Skip to content

Reproducible AI_APICallError: Bad Request on a particular repo and prompt #3017

Closed

Description

@tbarron-xyz

I can't run certain types of tasks on the repo https://github.com/Jimver/cuda-toolkit with grok-code-fast-1. I keep getting AI_APICallError: Bad Request after a thinking. Haven't experienced this on any other repos with opencode + grok-code-fast-1. It does succeed on simple questions in plan mode like Give me a high-level overview of the project. And this prompt does not fail on other repos.

Example prompt in Plan mode: Find where use-local-cache is set to true by default. We need to set it to false by default
https://opencode.ai/s/EsZUFXii

imageImage

Doesn't work in build mode either

imageImage

Rephrasing of that prompt: Look in the code for where "use-local-cache" is set to true by default. We need to set it to false by default
https://opencode.ai/s/m7OpgcWZ

image

Image

Activity

  1. github-actions commented on Oct 7, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

    @tbarron-xyz do you have any mcp servers by chance? Just curious what could cause this.. Ill try to reproduce when I get a chance later today

  3. self-assigned this
    on Oct 7, 2025
  4. tbarron-xyz commented on Oct 7, 2025

    @tbarron-xyz
    Author

    @rekram1-node No MCP servers, my ~/.config/opencode is an empty folder. Pretty much virgin opencode with grok-code-fast-1.

  5. OpeOginni commented on Oct 7, 2025

    @OpeOginni
    Contributor

    @tbarron-xyz what provider are you using?

  6. tbarron-xyz commented on Oct 7, 2025

    @tbarron-xyz
    Author

    It's in the second and third screenshots - opencode zen.

  7. OpeOginni commented on Oct 7, 2025

    @OpeOginni
    Contributor

    @tbarron-xyz I think I might have a solution, noticed that the model tries to get data from your massive files such as the dist and the .licenses folders, so try creating a local opencode.json and add the following there.

    {
        "$schema": "https://opencode.ai/config.json",
        "watcher": {
          "ignore": [".devcontainer", ".vscode", "licenses", "dist"]
        }
      }

    After doing this, I tested the commands you gave and they worked well on your repo.

    Image Image
    Details
  8. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

    damn what a g thx @OpeOginni

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