Repository navigation
One progress reminder rule for every Python Bot - #2443
Merged
Merged
Conversation
The reminder to say a line after five silent tool steps lived four times over: shared/progress_reminder.py, shared/silent_steps.py, shared/litellm_progress_reminder.py and the LangGraph engine's own copy. Each had the same words, the same threshold of five and the same counting and reset rules, written out again. They now live once, in shared/progress_reminder.py, which the image of every Python engine that reminds copies. The engines keep only what bridges to their framework: how its messages read as steps and where the reminder goes in. The CrewAI, Agno and Google ADK engines share the LiteLLM reader there. No behaviour changes. The copies differed in small ways, and each engine keeps its own: whether a step's words and calls in two messages count as one step, whether a reminder may follow a call that was never answered, and whether a system row after the results drops it. These are options on the one rule. An old-against-new run over several hundred thousand random threads gives the same places, words and forms for every engine. shared/silent_steps.py stays as a name the AG2 and Langroid tests import the words by; no image carries it.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 29, 2026 02:12
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
The progress reminder (after five silent tool steps, the model is reminded to say a line) was written out four times in the Python engines:
shared/progress_reminder.py(Pydantic AI, Microsoft Agent Framework, Strands),shared/silent_steps.py(AG2, Langroid),shared/litellm_progress_reminder.py(CrewAI, Agno, Google ADK) andagent-langgraph-agui/src/progress_reminder.py. Each had the same words, the threshold of five, and the same counting and reset rules.Now the words, the threshold, the count and the decision of where a reminder goes live once, in
shared/progress_reminder.py. Each engine keeps only its bridge to its framework: how its messages read as steps, and how the reminder goes into what its model is sent (middleware, capability, hook). The LiteLLM reader the CrewAI, Agno and Google ADK engines share lives in the same module (with_litellm_reminders).shared/litellm_progress_reminder.pyis deleted;shared/silent_steps.pykeeps only a re-export of the words, because the AG2 and Langroid tests import them by that name. No image copies it.src/progress_reminder.pykeeps what is LangGraph's own (the form per LangChain chat model, the refused-system fallback, keeping the reminder out of the RAW events) and takes the rule and words fromshared/.shared/progress_reminder.pyin place of the deleted files; langgraph-agui now copies it too.TypeScript engines are not touched.
No behaviour change
The four copies were not quite the same, and each engine keeps exactly what it had, as options on the one rule:
Harmonising these would change what some Bots send, so it is left for a separate decision.
Checked old against new, outside the repo: the three old shared modules and the old LangGraph module, from main, run side by side with the new code.
is_openai_modelwith and without a provider prefix on 30 ids, the LiteLLM form on 14 ids, the LangGraph form on 10 chat models: identical.Tests
No test file is changed. Each engine's suite, run as CI runs it (
python -m pytest "$HARNESS/tests" -q), on main and on this branch:The two LangGraph failures are the two ChatGPT token-file tests that need a Docker daemon, which was not running on the machine; they fail the same way on main and run in CI.
Images: each of the nine engines was laid out as its Dockerfile lays it out (
/app/srcand only the shared files itsCOPYnames) andsrc.mainimported there, then a reminder place worked out through the copied module. CI's Dockerfile builds run on this PR as well.