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.
Source
Thrown at crates/copilot_chat/src/model.rs:980
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(),
},
})
}
language_model::LanguageModelRequestToolInput::Custom { .. } => Err(anyhow::anyhow!(
"Copilot Chat does not support custom tools"
)),
})
.collect::<Result<Vec<_>>>()?;
Ok(CopilotChatRequest {
n: 1,
stream: model.uses_streaming(),
temperature: temperature.unwrap_or(0.1),
model: model.id().to_string(),
messages,
tools,
tool_choice: tool_choice.map(|choice| match choice {
LanguageModelToolChoice::Auto => ToolChoice::Auto,
LanguageModelToolChoice::Any => ToolChoice::Required,
LanguageModelToolChoice::None => ToolChoice::None,
}),
thinking_budget: if thinking_allowed && model.supports_thinking() {View on GitHub (pinned to f4178619ac)
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@f4178619ac (2026-08-20).
Data as JSON: /api/errors/08c031ae38336278.
Report an issue: GitHub.