Repository navigation
fix: move off the LLM context frames pipecat removed in 1.8 - #5
Open
Rehansanjay wants to merge 1 commit into
Open
Rehansanjay wants to merge 1 commit into
Rehansanjay wants to merge 1 commit into
Conversation
LLMMessagesFrame and OpenAILLMContextFrame (with the whole openai_llm_context module) were removed in pipecat-ai 1.8; LLMContextFrame and LLMContext replace them. The processor imported all three, so it raised ImportError on any pipecat the dependency allowed above 1.8. The two dead branches are gone rather than ported: nothing can emit a frame type that no longer exists. What remains is the LLMContextFrame path, which is what pipecat sends now. The augmented frame is also forwarded as it arrived instead of being rebuilt. Rebuilding dropped every field except the context, including speculation -- a provisional inference would have reached the service looking like a real turn. Raises the pipecat-ai floor to 1.8, the first release with LLMContextFrame.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: Comment |
rafaelbeckel
added a commit
to usemoss/moss
that referenced
this pull request
Oct 23, 2026
…ed (#562) ## Summary `pipecat-moss` 0.0.3, the version on PyPI, cannot be imported on a fresh install. It pins `inferedge-moss`, which no longer exports `AddDocumentsOptions`, and it imports the `openai_llm_context` module that `pipecat-ai` 1.8 removed. The source here already moved to `moss` and `LLMContextFrame` but was never released. This PR adds what the docs need to teach one service per process, and fixes a frame bug. - **`cache_path`** on `MossRetrievalService`, passed to the `MossClient`. A load in a new process reads an unchanged index from disk instead of downloading it. Requires `moss` 1.14.0 or later; the lock moves to 1.19.0. - **`load_index` takes `auto_refresh`** and passes every call through to `MossClient.load_index`, which loads the index or checks a loaded one for a newer cloud version, and where the backend checks a paused or over-credit org. The README and the demo leave `auto_refresh` off: its periodic refresh counts as session time, so a long-running process with it on is billed around the clock. - **Frames are forwarded unchanged.** The processor rebuilt `LLMContextFrame` and `LLMMessagesUpdateFrame`, dropping `speculation` (a speculative run then reaches the LLM as a normal turn) and `run_llm`. It now pushes the frame it received. This issue was first reported in usemoss/pipecat-moss#5. - **Credentials fall back to `MOSS_PROJECT_ID` and `MOSS_PROJECT_KEY`** as the README says. Missing credentials raise `ValueError` instead of failing inside the native client. - The example creates one service per process and awaits `load_index` in each bot. The README and CHANGELOG (under Unreleased) are updated. ## Notes - Releasing needs a version above 0.0.5 or a publish of 0.0.5. Neither is part of this PR. - usemoss/pipecat-moss is an older copy of this package, and its open PRs target that repo. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/usemoss/moss/pull/562?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/usemoss/moss/562?returnTo=https%3A%2F%2Fgithub.com%2Fusemoss%2Fmoss%2Fpull%2F562&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added persistent caching for Moss indexes with optional automatic refresh. * Concurrent requests for the same index now share one loading operation. * Added environment-variable fallbacks for Moss credentials and clearer missing-credential errors. * **Bug Fixes** * Index-loading failures now propagate correctly and can be retried. * Preserved message context and frame properties during retrieval processing. * **Documentation** * Updated setup guidance, configuration options, usage examples, and compatibility requirements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
MossIndexProcessorcannot be imported on any current pipecat:pipecat-ai 1.8 removed
LLMMessagesFrame, and removedOpenAILLMContext,OpenAILLMContextFrameand the wholeopenai_llm_contextmodule with it (#4215).LLMContextFrameandLLMContextare the replacements, and all services use the universalLLMContextnow.The dependency allows
pipecat-ai>=0.0.99with no upper bound, so a fresh install resolves to 1.11 and the processor fails at import.What changed
The two dead branches are removed rather than ported. Nothing can emit a frame type that no longer exists, so
isinstance(frame, LLMMessagesFrame)and theOpenAILLMContextFramearm were unreachable code that only existed to fail at import time. What remains is theLLMContextFramepath, which is what pipecat sends now.The augmented frame is forwarded as it arrived, instead of being rebuilt. The old code pushed
type(frame)(context=context). Sincecontextis the same object the frame arrived with and the retrieval augments it in place, rebuilding was never necessary — and it dropped every other field on the frame.speculationis the one that matters: it marks an inference run from a provisional context whose response must not reach the user and whose tool calls must not execute. A speculative frame rebuilt this way arrives at the service looking like an ordinary turn.pipecat-aifloor raised to 1.8, the first release withLLMContextFrame. The old floor cannot satisfy this code, and the old code cannot run on anything current, so the range had to move one way or the other.Verified
On a clean environment against pipecat-ai 1.11.0: the module imports,
LLMContextFrame(context=..., speculation=True)keeps itsspeculationthrough the processor, and_get_latest_user_textstill finds the latest user turn fromLLMContext.get_messages(). Both removed names are confirmed absent on that version, which is what makes the current import fail.Separately — one more thing blocking the package
Unrelated to pipecat, and not fixed here because it is yours to decide:
pipecat_moss/__init__.pyimportsAddDocumentsOptionsfrominferedge_moss, and the currentinferedge_mosson PyPI does not export it (it hasGetDocumentsOptions). So even with this PR,import pipecat_mossraises:Happy to send a second PR for that once you say which side should move — the plugin's import or the SDK's export.
Found with a checker I run nightly over every community plugin listed in the Pipecat docs, against the latest release and against
main: https://github.com/Rehansanjay/pipecat-plugin-health