Repository navigation
LiteLLM Bots: one rule for steps with no words, and no placeholder lines on Langroid - #2449
Merged
Merged
Conversation
…nes on Langroid LiteLLM sends Claude every empty user or assistant turn as "[System: Empty message content sanitised to satisfy protocol]" (BerriAI/litellm#24498). When a Bot writes a step that only called a tool with "" for its words, Claude reads that line as its own, says it to the person, and each copy restarts the progress reminder's count. Checked live on every Bot that reaches its model through LiteLLM, on the 30-step ledger job with Claude Sonnet 5.5. Langroid had it: 4 and 5 placeholder lines shown in two runs. Google ADK, CrewAI and Strands showed none, and no Bot showed a line twice. The rule Agno and LlamaIndex each carried now lives once, in shared/empty_turns.py: a step that only called a tool is sent as just that call, a message of the model's with neither words nor calls is left out, and the placeholder in a thread from before is taken out. Every LiteLLM Bot sends its model calls through it: Agno, ADK and CrewAI before the progress reminder is placed, Strands on the request it formats, Langroid on the request it prepares (which fixes it), and LlamaIndex reads each step's words through it. Only what each call sends changes; threads, events and what the person sees are left as they were.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 29, 2026 03:22
lorenzejay
added a commit
to lorenzejay/OpenBot
that referenced
this pull request
Dec 1, 2026
The CrewAI Bot's main.py takes this branch's side; the next commit carries main's Gemini thought signatures (CopilotKit#2397), progress reminders (CopilotKit#2436, CopilotKit#2443) and empty-turn rule (CopilotKit#2449) into it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lorenzejay
added a commit
to lorenzejay/OpenBot
that referenced
this pull request
Dec 1, 2026
…ain's Gemini and reminder rules The conversational Agent now does what the Bot on main did: - A tool whose name CrewAI changes for the model (`showNote`, `askApproval`, `mcp__...`) is handed back under the server's name. The model calls it by `sanitize_tool_name`, and the hand-back looked it up by the server's name, so the turn answered "Handed to the caller to run." - A handed-back call leaves out the `null`s its own schema did not ask for. CrewAI offers tools in strict mode, so every optional field came back as `null`. - A `developer` message is kept as an instruction and left out of CrewAI's session, whose messages have no such role. It refused the whole run. - An empty `OPENAI_BASE_URL` or `ANTHROPIC_BASE_URL` is unset. The providers' own SDKs took `""` as the address, and every OpenAI run failed with `APIConnectionError`. - The model runs on CrewAI's own client for OpenAI, Anthropic and Google, whatever it is called. CrewAI sent a model it has not heard of (Gemini on the model gateway, `qwen/qwen3-8b`) to LiteLLM, which offered it no tools. - The words the model said in a step that called tools are the reply's content. CrewAI keeps that step with none, so a line on a long job never reached the person. From main: Gemini's thought signature goes out on the handed-back call's `encryptedValue` and back to Gemini, with Google's placeholder only for a call the thread has none for (CopilotKit#2397); the progress reminder after five silent steps (CopilotKit#2436, CopilotKit#2443), added to the latest result where CrewAI would take a note in the person's turn for the request; the empty-turn rule (CopilotKit#2449); `google` as `gemini/`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
No LiteLLM Bot sends Claude a step with no words as words any more, and the rule that makes sure of it lives in one place.
LiteLLM sends Claude every empty user or assistant turn as "[System: Empty message content sanitised to satisfy protocol]" (BerriAI/litellm#24498). When a Bot writes a step that only called a tool with
""for its words, Claude reads that line as its own, says it to the person, and each copy restarts the progress reminder's count. Agno (#2442) and LlamaIndex (#2441) were fixed today, each with its own copy of the rule.""for its words: Langroid passes""on as an empty turn (and leaves the turn's words out when they are absent). OpenBot's own server sends such a step with nocontentat all, live and after a reload (recorded on the box below), so in the web app main's Langroid Bot did not show it; a caller that sends"", as the engine-level drive below does, gets 4 or 5 placeholder lines a job. ADK, CrewAI and Strands showed none either way. No Bot showed a line twice.shared/empty_turns.py. A step that only called a tool is sent as just that call (None), a message of the model's with neither words nor calls is left out, and the placeholder in a thread from before is taken out. Same behaviour as Agno'ssent.py, now shared.Tests
Engine level, real LiteLLM and real framework, only the provider's HTTP scripted, driven run by run as the server drives a job:
test_a_silent_step_reaches_claude_as_its_tool_call_and_nothing_said: a 7-step job reaches Claude with each silent step as just itstool_use, no placeholder in any request, and the stretch is still reminded once.test_a_step_with_no_words_reaches_claude_as_its_tool_call_and_nothing_said: the same job after an earlier step saved with the placeholder; that step and each silent step reach Claude as just their calls.Red on main (all four fail on the placeholder in a request), green with this change. Full suites: ADK 42, CrewAI 33, Strands 29, Langroid 34, Agno 42, LlamaIndex 20, all passing; Agno's and LlamaIndex's tests are unchanged.
Live: the 30-step ledger job, Claude Sonnet 5.5
Each step a run of its own, its call handed back and answered, the whole thread sent back, with a step that only called a tool sent back with
""for its words.L= a real line,.= a silent step,J= a step whose only words were the placeholder.L.....L.....L...JJ.J...JLL....L.....L....J.....L....JJJ...J.L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....every sixth stepL.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....every sixth step, or seventhL.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....L.....In the web app
A full OpenBot stack on a throwaway box (back end and app at main, local Intelligence), with one Bot on main's Langroid engine and one on this branch's, each given a 25-page job.
content, in a live job and in the thread restored after the reload, which is why main's Langroid Bot shows no placeholder in the app.