mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-08-24 10:53:12 -04:00
[PR #330] docs: add tool-call parser troubleshooting for custom LLM backends #323
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/330
Author: @mason5052
Created: 6/3/2026
Status: 🔄 Open
Base:
main← Head:codex/issue-313-tool-call-parser-troubleshooting📝 Commits (1)
12f3d19docs: add tool-call parser troubleshooting for custom LLM backends📊 Changes
1 file changed (+20 additions, -0 deletions)
View changed files
📝
README.md(+20 -0)📄 Description
Summary
Add a troubleshooting subsection under Custom LLM Provider Configuration explaining why tool-call (function-call) parser problems on self-hosted OpenAI-compatible backends (llama.cpp / SGLang / vLLM, often behind LiteLLM) cause stalled flows, and how to diagnose them. Docs only.
Problem
Issue #313 reported that flows stop responding after a few steps when running a custom backend configured through
LLM_SERVER_*(LiteLLM in front of llama.cpp servingqwen3.6-35b). The logs showed:surfaced through LiteLLM as an HTTP 500, followed by cascading retries and a 429. The maintainer confirmed the stall was fixed in the latest build by sanitizing malformed function-call arguments, and that the root cause was the model side returning corrupted tool-call arguments.
There is currently no documentation that explains this class of failure, even though it is a common pitfall with self-hosted backends and is closely related to the image-chooser failure (a flow's first action is an LLM tool call to pick the container image).
Solution
Add a
#### Troubleshooting: tool-call (function-call) parser errorssubsection right after the Custom LLM Provider Configuration content, covering:Failed to parse tool call arguments as JSON, a flow that stalls after a few steps, looping tool calls, the start-of-flowfailed to select primary docker image via llm callerror, and unexpected backend 5xx/4xx responses.ctesterbefore a full flow, confirm the parser/chat template match the model, and update PentAGI (recent builds sanitize malformed function-call arguments).The new content links only to the existing Testing LLM Agents section and references the image-chooser error in prose (no new anchor), so it stands on its own against
main.User Impact
Failed to parse tool call arguments as JSONstall.ctesterfor pre-flight validation and at the update that sanitizes malformed arguments.Test Plan
git diff --checkclean.README.md(+20 lines). No tool-call parser code, provider runtime, schema, migration, or config-default changes.failed to select primary docker image via llm callexists inbackend/pkg/providers/providers.goonmain.LLM_SERVER_URL/LLM_SERVER_KEY/LLM_SERVER_MODEL/LLM_SERVER_PROVIDERexist in.env.example.ctesterutility exists and tests tool-calling agent types, and that the#testing-llm-agentsanchor resolves.Refs #313
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.