zed-industries/zed · error · anyhow::Error
Copilot Chat does not support custom tools
Error message
Copilot Chat does not support custom tools
What it means
While converting the request's tools to Copilot Chat format, a tool whose input is not a plain function (e.g. an MCP-style tool) was found; Copilot Chat only accepts function tools, so the request is rejected before it is sent.
Solutions
- Exclude non-function tools from Copilot Chat requests
- Use a model provider that supports the required tool types
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/copilot_chat/src/model.rs:980 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/08c031ae38336278.
Report an issue: GitHub.
Appendix: source
Thrown at crates/copilot_chat/src/model.rs:999
.and_then(|v| v.as_str())
.map(|s| s.to_string());
(opaque, text)
} else {
(None, None)
};
messages.push(ChatMessage::Assistant {
content: if text_content.is_empty() {
ChatMessageContent::empty()
} else {
text_content.into()
},
tool_calls,
reasoning_opaque,
reasoning_text,
});
}
Role::System => messages.push(ChatMessage::System {
content: message.string_contents(),
}),
}
}
let tools = request
.tools
.iter()
.map(|tool| match &tool.input {
language_model::LanguageModelRequestToolInput::Function { input_schema, .. } => {
Ok(Tool::Function {
function: Function {
name: tool.name.clone(),
description: tool.description.clone(),
parameters: input_schema.clone(),
},
})
}View on GitHub (pinned to 916fc2b8cb)