{"record":{"id":"319d1efcf74224a5","repo":"plandex-ai/plandex","slug":"no-describeplan-function-call-found-in-response","errorCode":null,"errorMessage":"no describePlan function call found in response","messagePattern":"no describePlan function call found in response","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"app/server/model/plan/commit_msg.go","lineNumber":145,"sourceCode":"\tvar commitMsg string\n\n\tif baseModelConfig.PreferredOutputFormat == shared.ModelOutputFormatXml {\n\t\tcommitMsg = utils.GetXMLContent(content, \"commitMsg\")\n\t\tif commitMsg == \"\" {\n\t\t\tgo notify.NotifyErr(notify.SeverityError, fmt.Errorf(\"no commitMsg tag found in XML response\"))\n\n\t\t\treturn nil, &shared.ApiError{\n\t\t\t\tType:   shared.ApiErrorTypeOther,\n\t\t\t\tStatus: http.StatusInternalServerError,\n\t\t\t\tMsg:    \"No commitMsg tag found in XML response\",\n\t\t\t}\n\t\t}\n\t} else {\n\n\t\tif content == \"\" {\n\t\t\tfmt.Println(\"no describePlan function call found in response\")\n\n\t\t\tgo notify.NotifyErr(notify.SeverityError, fmt.Errorf(\"no describePlan function call found in response\"))\n\n\t\t\treturn nil, &shared.ApiError{\n\t\t\t\tType:   shared.ApiErrorTypeOther,\n\t\t\t\tStatus: http.StatusInternalServerError,\n\t\t\t\tMsg:    \"No describePlan function call found in response. The model failed to generate a valid response.\",\n\t\t\t}\n\t\t}\n\n\t\tvar desc shared.ConvoMessageDescription\n\t\terr = json.Unmarshal([]byte(content), &desc)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"Error unmarshalling plan description response: %v\\n\", err)\n\n\t\t\tgo notify.NotifyErr(notify.SeverityError, fmt.Errorf(\"error unmarshalling plan description response: %v\", err))\n\n\t\t\treturn nil, &shared.ApiError{\n\t\t\t\tType:   shared.ApiErrorTypeOther,\n\t\t\t\tStatus: http.StatusInternalServerError,","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/model/plan/commit_msg.go#L127-L163","documentation":"In the non-XML path, genPlanDescription forces a describePlan function/tool call; if the model returns empty content (no tool call payload), the server reports that no describePlan function call was found and returns a 500 ApiError. This indicates the provider never produced the forced tool invocation.","triggerScenarios":"The model provider doesn't support forced tool_choice for the configured model; the response stream ended with empty content due to a provider error, content filter, or max_tokens=0-like truncation; the model pack's CommitMsg entry is misconfigured with a chat model lacking tool support.","commonSituations":"Using a model (e.g., older open-source endpoints, some proxies/gateways) that silently drops the tools parameter; proxy stripping function-calling fields; provider returning empty completions during incidents.","solutions":["Verify the CommitMsg model supports function calling and tool_choice forced invocation","Bypass proxies/gateways that may strip the tools/tool_choice fields and retry","Check provider status/incidents for empty-completion behavior","Switch the CommitMsg model to one with known tool-calling support"],"exampleFix":"// before: model without tool support\n\"CommitMsg\": {\"ModelName\": \"some-legacy-completion-model\"}\n// after: tool-calling capable model\n\"CommitMsg\": {\"ModelName\": \"gpt-4o-mini\"}","handlingStrategy":"fallback","validationCode":"// confirm the model supports tool calls before wiring it into the CommitMsg pack\nsupportsTools, err := providerSupportsFunctionCalling(modelName)\nif err != nil || !supportsTools { log.Fatal(\"CommitMsg model must support function calling\") }","typeGuard":null,"tryCatchPattern":"desc, apiErr := genPlanDescription(...)\nif apiErr != nil && strings.Contains(apiErr.Msg, \"describePlan function call\") {\n    // use a locally generated summary instead of the LLM one\n    return localCommitMsg(currentPlanState), nil\n}","preventionTips":["Choose CommitMsg models with documented tool-calling support","Avoid proxies that strip tools/tool_choice fields","Monitor for empty completions per provider and alert on spikes","Pin model versions to avoid silent deprecation of tool support"],"tags":["llm","function-calling","empty-response"],"backgroundTag":"llm-tool-call-missing","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}