zed-industries/zed · error
Received incomplete tool call: missing id or name
Error message
Received incomplete tool call: missing id or name
What it means
Guard in process_tool_calls: after assembling streamed tool-call deltas by index, a tool call still lacks an id or name, so it cannot be emitted as a valid ToolUse event. Indicates the provider sent a truncated or malformed tool-call stream.
Source
Thrown at crates/language_models/src/provider/mistral.rs:737
}
unexpected => {
log::error!("Unexpected Mistral stop_reason: {unexpected:?}");
events.push(Ok(LanguageModelCompletionEvent::Stop(StopReason::EndTurn)));
}
}
}
events
}
fn process_tool_calls(
&mut self,
) -> Vec<Result<LanguageModelCompletionEvent, LanguageModelCompletionError>> {
let mut results = Vec::new();
for (_, tool_call) in self.tool_calls_by_index.drain() {
if tool_call.id.is_empty() || tool_call.name.is_empty() {
results.push(Err(LanguageModelCompletionError::from(anyhow!(
"Received incomplete tool call: missing id or name"
))));
continue;
}
match parse_tool_arguments(&tool_call.arguments) {
Ok(input) => results.push(Ok(LanguageModelCompletionEvent::ToolUse(
LanguageModelToolUse {
id: tool_call.id.into(),
name: tool_call.name.into(),
is_input_complete: true,
input: language_model::LanguageModelToolUseInput::Json(input),
raw_input: tool_call.arguments,
thought_signature: None,
},
))),
Err(error) => {
results.push(Ok(LanguageModelCompletionEvent::ToolUseJsonParseError {View on GitHub (pinned to f4178619ac)
Solutions
- Retry the completion; streaming truncation is usually transient
- Reduce response length or disable tool use if it recurs on long tool calls
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/language_models/src/provider/mistral.rs:737 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/b57f5870c610168c.
Report an issue: GitHub.