fix(pipecat-moss): fix compatibility with pipecat-ai 1.1.0#191
fix(pipecat-moss): fix compatibility with pipecat-ai 1.1.0#191rohanshrma222 wants to merge 7 commits intousemoss:mainfrom
Conversation
| if isinstance(frame, LLMContextFrame): | ||
| context = frame.context | ||
| elif isinstance(frame, LLMMessagesFrame): | ||
| elif isinstance(frame, LLMMessagesUpdateFrame): | ||
| messages = frame.messages | ||
| context = LLMContext(messages) |
There was a problem hiding this comment.
🚩 Example apps monkey-patch references removed OpenAILLMContextFrame
The example apps at apps/pipecat-moss/ollama-local/ollama_bot.py:102-116 and apps/pipecat-moss/hume-ollama-local/hume_ollama_bot.py:101-115 monkey-patch MossIndexProcessor.process_frame to check for OpenAILLMContextFrame. With pipecat-ai bumped to >=1.1.0 (where OpenAILLMContextFrame may no longer exist), and the library code no longer handling that frame type, these example apps will likely break at runtime. These apps depend on pipecat-moss>=0.0.1 which would resolve to the new 0.1.0, pulling in pipecat-ai>=1.1.0. The monkey-patches should be updated or removed as part of this migration.
Was this helpful? React with 👍 or 👎 to provide feedback.
| await self.push_frame(LLMMessagesFrame(context.get_messages())) | ||
| elif isinstance(frame, (LLMContextFrame, OpenAILLMContextFrame)): | ||
| await self.push_frame(type(frame)(context=context)) # type: ignore[arg-type] | ||
| await self.push_frame(LLMMessagesUpdateFrame(messages=context.get_messages())) |
There was a problem hiding this comment.
🚩 LLMMessagesUpdateFrame fields beyond 'messages' are not propagated
In moss_index_processor.py:92-94, when an LLMMessagesUpdateFrame is received, only frame.messages is extracted. At line 130, a brand-new LLMMessagesUpdateFrame(messages=context.get_messages()) is pushed, potentially dropping any other fields the original frame carried. The old code did the same with LLMMessagesFrame, so this is pre-existing behavior, not a regression. However, if LLMMessagesUpdateFrame in pipecat 1.1.0 has additional fields (like run_llm seen on LLMMessagesAppendFrame in the example), those would be silently lost. Worth verifying against the pipecat 1.1.0 frame definitions.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Please review this PR so that we can move quickly and merge this PR. |
yatharthk2
left a comment
There was a problem hiding this comment.
can you please update the changelog. Can be a very generic update message
| [project] | ||
| name = "pipecat-moss" | ||
| version = "0.0.3" | ||
| version = "0.1.0" |
There was a problem hiding this comment.
can you please make it 0.0.4
|
can you please provide quick loom video that runs the pipecat-moss/examples |
Fix Summary Table
2026-05-01.10-08-38.mp4 |
|
I made changes in the example demo also, it was following the older version |
There was a problem hiding this comment.
🚩 Error path in process_frame swallows the original frame
In moss_index_processor.py:136-138, if an exception occurs during retrieval processing, the original frame (LLMContextFrame or LLMMessagesUpdateFrame) is consumed but never forwarded — only an ErrorFrame is pushed. This means the LLM will never receive the user's message, and the conversation will appear to hang. A more robust approach would be to fall back to pushing the original unaugmented frame so the LLM can still respond (just without retrieval context). This is a pre-existing issue not introduced by this PR, but worth noting since the surrounding code was touched.
(Refers to lines 136-138)
Was this helpful? React with 👍 or 👎 to provide feedback.
| Frame, | ||
| LLMContextFrame, | ||
| LLMMessagesFrame, | ||
| LLMMessagesUpdateFrame, |
There was a problem hiding this comment.
🚩 Semantic difference between LLMMessagesUpdateFrame and old LLMMessagesFrame is unverified
The PR replaces LLMMessagesFrame with LLMMessagesUpdateFrame (moss_index_processor.py:20,92,130). If LLMMessagesUpdateFrame carries different semantics (e.g., a delta/update vs full message list), the logic of creating a new LLMContext from frame.messages and then pushing a new LLMMessagesUpdateFrame(messages=context.get_messages()) could be incorrect. The CHANGELOG describes this as a direct replacement of a removed class, and the uv.lock confirms pipecat-ai 1.1.0 is resolved, so this is likely safe — but it would be worth verifying against the pipecat 1.1.0 release notes or source.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Yes, i have verified it by running a internal test for it.
|
can you please address the devin comments ? |
|
Your Name seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Pull Request Checklist
Please ensure that your PR meets the following requirements:
Description
This PR fixes a complete import failure in
pipecat-mosswhen used withpipecat-ai 1.1.0(the current latest release).Pipecat 1.1.0 introduced two breaking API removals that
moss_index_processor.pydepended on:LLMMessagesFramewas removed — split intoLLMMessagesAppendFrame,LLMMessagesUpdateFrame, andLLMMessagesTransformFrame. Replaced withLLMMessagesUpdateFramewhich matches the original behaviour of carrying a full messages list to replace the current context.OpenAILLMContextFrameand its entire module were deleted — Pipecat unified all provider-specific context frame subclasses into the baseLLMContextFrame, with provider formatting handled internally by LLM service adapters. Removed the import and simplified allisinstancechecks to useLLMContextFramedirectly.The
pyproject.tomlversion constraint is also tightened from>=0.0.99to>=1.1.0to make the supported Pipecat version explicit and prevent silent breakage for users.Fixes #190
Type of Change