GPT-5 error #1232

Closed
opened 2026-02-16 17:30:06 -05:00 by yindo · 5 comments
Owner

Originally created by @jhartumc on GitHub (Aug 11, 2025).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @jhartumc on GitHub (Aug 11, 2025). Originally assigned to: @thdxr on GitHub. 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**
yindo closed this issue 2026-02-16 17:30:06 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 11, 2025):

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

@rekram1-node commented on GitHub (Aug 11, 2025): are you using certain mcps? That is an absurd amount of tools and not an opencode issue, that seems like a github copilot limitation
Author
Owner

@jhartumc commented on GitHub (Aug 11, 2025):

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!

@jhartumc commented on GitHub (Aug 11, 2025): > 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!
Author
Owner

@mahume commented on GitHub (Aug 11, 2025):

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

@mahume commented on GitHub (Aug 11, 2025): I've noticed this too when running copilot. I've got Docker connected with only about 5 MCPs enabled but it overloads it.
Author
Owner

@rekram1-node commented on GitHub (Aug 11, 2025):

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)

@rekram1-node commented on GitHub (Aug 11, 2025): 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)
Author
Owner

@mahume commented on GitHub (Aug 12, 2025):

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.

@mahume commented on GitHub (Aug 12, 2025): > 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](https://opencode.ai/docs/agents/#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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1232