plandex-ai/plandex · error
No nameNote function call found in response. The model faile
Error message
No nameNote function call found in response. The model failed to generate a valid response.
What it means
GenNoteName, in the non-XML path, expects a nameNote function call whose content is JSON for prompts.NoteNameRes. When the response Content is empty — i.e. the model made no nameNote function call — this error is returned, meaning no structured name was produced.
Source
Thrown at app/server/model/name.go:310
})
if err != nil {
fmt.Printf("Error during note name model call: %v\n", err)
return "", err
}
var name string
content := modelRes.Content
if baseModelConfig.PreferredOutputFormat == shared.ModelOutputFormatXml {
name = utils.GetXMLContent(content, "name")
if name == "" {
return "", fmt.Errorf("No name tag found in XML response")
}
} else {
if content == "" {
fmt.Println("no nameNote function call found in response")
return "", fmt.Errorf("No nameNote function call found in response. The model failed to generate a valid response.")
}
var nameRes prompts.NoteNameRes
err = json.Unmarshal([]byte(content), &nameRes)
if err != nil {
fmt.Printf("Error unmarshalling note name response: %v\n", err)
return "", err
}
name = nameRes.Name
}
return name, nil
}
View on GitHub (pinned to e2d772072e)
Solutions
- Retry the request once before failing the operation.
- Set tool_choice to force the nameNote function.
- Verify nameNote is registered in the tools list with a valid schema.
- Raise max_tokens and keep format instructions explicit.
- Prefer models with reliable native function calling.
Example fix
// before
modelReq{Prompt: prompt, Tools: tools}
// after
modelReq{Prompt: prompt, Tools: tools, ToolChoice: {Type: "function", Function: {Name: "nameNote"}}} Defensive patterns
Strategy: try-catch
Type guard
func hasContent(res *shared.ModelRes) bool { return res != nil && res.Content != "" } Try / catch
name, err := model.GenNoteName(ctx, req)
if err != nil {
if strings.Contains(err.Error(), "No nameNote function call found") {
name, err = model.GenNoteName(ctx, req) // one retry
}
if err != nil { return fmt.Errorf("note naming failed: %w", err) }
} Prevention
- Force tool_choice to nameNote
- Verify tools registration and JSON schema for nameNote
- Avoid prompts that encourage free-form answers
- Use temperature 0-0.3 for structured naming tasks
When it happens
Trigger: PreferredOutputFormat != XML and the LLM response lacks a nameNote function call: plain-text answer, refusal, missing/misconfigured tools, or provider silently dropping tool_call fields.
Common situations: Switching to models with weaker function calling, API version drift changing tool_call shape, prompts encouraging direct answers, or token truncation before the tool call.
Related errors
- No namePlan function call found in response. The model faile
- No namePipedData function call found in response. The model
- No name tag found in XML response
- no describePlan function call found in response
- client not found for provider composite: %s
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/17ad4ffc7a07b5a5.
Report an issue: GitHub.