zed-industries/zed · error · anyhow::Error
Copilot Chat does not support custom tool calls
Error message
Copilot Chat does not support custom tool calls
What it means
While converting Zed chat messages to Copilot Chat format, a tool-use content part was encountered; Copilot Chat's API does not support custom tool calls, so the request is rejected up front with this capability sentinel.
Source
Thrown at crates/copilot_chat/src/model.rs:902
},
});
}
_ => {}
}
}
if !content_parts.is_empty() {
messages.push(ChatMessage::User {
content: content_parts.into(),
});
}
}
Role::Assistant => {
let mut tool_calls = Vec::new();
for content in &message.content {
if let MessageContent::ToolUse(tool_use) = content {
let input = tool_use.input.as_json().ok_or_else(|| {
anyhow!("Copilot Chat does not support custom tool calls")
})?;
tool_calls.push(ToolCall {
id: tool_use.id.to_string(),
content: ToolCallContent::Function {
function: FunctionContent {
name: tool_use.name.to_string(),
arguments: serde_json::to_string(input)?,
thought_signature: tool_use.thought_signature.clone(),
},
},
});
}
}
let text_content = {
let mut buffer = String::new();
for string in message.content.iter().filter_map(|content| match content {
MessageContent::Text(text) => Some(text.as_str()),View on GitHub (pinned to f4178619ac)
Solutions
- Remove custom tools/tool-use content from requests routed to Copilot Chat
- Use a provider that supports tool calling for agentic workflows
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/copilot_chat/src/model.rs:902 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/8d8e2b173363b337.
Report an issue: GitHub.