Skip to content

GPT-5 error #1814

Closed
Closed

Description

@jhartumc

Model Provider: Github Copilot
Error: AI_APICallError: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 238 instead.
Opencode version: v0.4.12

Activity

  1. rekram1-node commented on Aug 11, 2025

    @rekram1-node
    Contributor

    are you using certain mcps? That is an absurd amount of tools and not an opencode issue, that seems like a github copilot limitation

  2. self-assigned this
    on Aug 11, 2025
  3. jhartumc commented on Aug 11, 2025

    @jhartumc
    Author

    are you using certain mcps? That is an absurd amount of tools and not an opencode issue, that seems like a github copilot limitation

    Yeah, I got a lot of mcps connected. Disable mcps fixed it! Thanks a lot!

  4. mahume commented on Aug 11, 2025

    @mahume

    I've noticed this too when running copilot. I've got Docker connected with only about 5 MCPs enabled but it overloads it.

  5. rekram1-node commented on Aug 11, 2025

    @rekram1-node
    Contributor

    what mcps are yall using?? over 200 tools is kinda insane and I think your model performance is going to drop off steeply (I think I don't know lol)

  6. assigned and unassigned on Aug 12, 2025
  7. mahume commented on Aug 12, 2025

    @mahume

    what mcps are yall using?? over 200 tools is kinda insane and I think your model performance is going to drop off steeply (I think I don't know lol)

    I've got my Docker Desktop using the Beta feature MCP Toolkit. I'm using: Atlassian, Docker, Git, GitLab, and GitHub. The GitHub one has a lot of bloat. I did notice in the opencode docs about available tools, which seem to just be native to opencode. My thought would be you could do the restricting from the Frontmatter to add those external MCP tools. Something like:

    ---
    description: Reviews code for quality and best practices
    mode: subagent
    model: anthropic/claude-sonnet-4-20250514
    temperature: 0.1
    tools:
      write: false
      edit: false
      bash: false
    external_tools:
      git_create_branch: true
      git_reset: false
    ---
    

    Could cut down on your tools in the case your config has a lot of MCP connections.

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