Repository navigation
fix(crewai): preserve legacy input wrapper compatibility - #3522
Conversation
Python Preview PackagesVersion
Install with uvAdd the TestPyPI index to your [[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = trueThen install the packages you need: # Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1796152055' --index testpypi
# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1796152055' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1796152055' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1796152055' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1796152055' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1796152055' --index testpypiInstall with pippip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
ag-ui-protocol==0.0.0.dev1796152055
Commit: d6f7a6d |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/a2a
@ag-ui/adk-js
@ag-ui/adk
@ag-ui/ag2
@ag-ui/agno
@ag-ui/antigravity
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/claude-managed-agents
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/openai-agents
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/cloudflare-agents
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
|
Hey @davidmckayv, could you review and approve this fix before we release Additional testing with the staged 1.1.0 build exposed a crash before the first model call in both OpenBot CrewAI engines. The adapter passed a new keyword to their input wrappers, which still use the 1.0 signature. This patch preserves that signature for runs without guidance. Both regression cases reproduced the crash before the fix, and the patched wheel passed the CrewAI suites on OpenBot We want to land this before merging the release PR (#3521). |
davidmckayv
left a comment
There was a problem hiding this comment.
Approved at 683f78d. The fix is right. With guidance off, the call is now exactly the 1.0 call: strip_leading_system is left out, and its default is True, which matches the old guidance is None value. So wrappers written against the 1.0 signature, like OpenBot's bundled CrewAI engines, work again. With guidance on, it still passes strip_leading_system=False, as it should. The new test wraps the helper with the exact 1.0 signature and covers both the regular and conversational flows. CI is green.
One nit, not blocking: a 1.0-style wrapper on an endpoint with guidance turned on would still get the new keyword and fail. A line in the changelog or README telling wrappers to accept **kwargs before turning guidance on would help.
Summary
AG-UI #3513 started passing
strip_leading_systemtocrewai_prepare_inputson every run. OpenBot's regular and conversational CrewAI engines wrap that helper with its 1.0 signature. Both reject the keyword with aTypeErrorbefore reaching the model. OpenBot regular engine wrapper · OpenBot conversational engine wrapperKeep the original helper call for requests without run guidance. When a request carries prepared guidance, pass
strip_leading_system=Falseto preserve the remaining system messages after guidance extraction.Verification
TypeErrorbefore the fix and now finish the run and reach the model stub. All 18 run-guidance tests passed.ag-ui-crewai==1.1.0wheel using the staged release metadata and this patch. OpenBot's CrewAI suite passed on main (36 tests) and on the #2636 head (51 tests). These suites exercise instruction delivery and tool hand-back through local provider endpoints.Release
Merge this fix before publishing
ag-ui-crewai==1.1.0. After this PR lands, updaterelease/nextfrommainto include it in the existing release PR #3521. A local merge preview confirmed that the adapter still has version1.1.0.