Skip to content

AI: Getting error with OpenAI api "array too long" #32946

Closed
@kurokirasama

Description

@kurokirasama

Summary

Getting this error lately:

Error interacting with language model
Failed to connect to OpenAI API: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 158 instead.

Description

Steps to trigger the problem:

  1. Any prompt using openai api.

Expected Behavior:
No error.

Model Provider Details

  • Provider: (Anthropic via ZedPro, Anthropic via API key, Copilot Chat, Mistral, OpenAI, etc) OpenAI api.
  • Model Name: all of them
  • Mode: (Agent Panel, Inline Assistant, Terminal Assistant or Text Threads) Agen Panel
  • Other Details (MCPs, other settings, etc):

Installed extensions:

basher
blackrain-theme
colored-zed-icons-theme
git-firefly
html
ini
json5
latex
log
lua
make
markdown-oxide
marksman
matlab
mcp-server-brave-search
mcp-server-byterover
mcp-server-context7
mcp-server-firecrawl
mcp-server-github
mcp-server-sequential-thinking
mermaid
nu
php
powershell
python-requirements
r
ruff
scheme
sql
toml
xml

Zed Version and System Specs

Zed: v0.190.6 (Zed)
OS: Linux X11 ubuntu 24.04
Memory: 62 GiB
Architecture: x86_64
GPU: AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO) || radv || Mesa 24.2.8-1ubuntu1~24.04.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiImprovement related to Assistant, Copilot, or other AI features

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions