chore(deps): migrate pipecat integration to pipecat-ai 1.x (clears 4 high-severity alerts)#2380
Conversation
Bumps pipecat-ai from 0.0.x to >=1.4.0,<2.0, clearing four high-severity Dependabot advisories for the file-read CVEs in the older 0.0.x/1.0.x line (telephony /ws + runner /files path traversal; alerts #1006, #1005, #560, #559). pipecat 1.x replaced the per-provider OpenAILLMContext with the universal LLMContext and removed the pipecat.processors.aggregators.openai_llm_context module. The integration already imported the modern LLMContextFrame, so the runtime change is small: - memory.py: drop the now-impossible legacy OpenAILLMContextFrame import branch and match on LLMContextFrame directly. LLMContext.messages is still a live list of OpenAI-format dicts, so the in-place injection logic is unchanged. - tests: build frames from LLMContextFrame; add TestRealLLMContext that exercises a real pipecat LLMContext + LLMContextFrame to pin the live-list mutation contract the integration depends on. - examples: migrate to LLMContext + LLMContextAggregatorPair and the LLMRunFrame kickoff (create_context_aggregator / get_context_frame were removed in 1.x). - pyproject: pipecat 1.x requires Python >=3.11, so bump requires-python and drop the 3.10 classifier (CI already runs 3.11). Tests: 19 passed, 1 skipped (live).
35cc6be to
4cb5742
Compare
|
Rebased onto current Root cause: ruff Worth flagging for anyone who hits this locally: That also requires Verification on the rebased branch: Also confirmed the |
What
Migrates the pipecat integration from
pipecat-ai>=0.0.100,<1.0to>=1.4.0,<2.0, clearing four high-severity Dependabot alerts that have no fix available within the 0.0.x line:/wsunauthenticated call-control abuse/filesendpoint (arbitrary file read)The fix versions (
1.2.0/1.4.0) are only on the 1.x line, which the integration previously capped out (<1.0, "1.0+ restructured modules; needs migration"). This PR does that migration.Why it's a small change
pipecat 1.x replaced the per-provider
OpenAILLMContextwith the universalLLMContextand removed thepipecat.processors.aggregators.openai_llm_contextmodule. The processor already imported the modernLLMContextFrame, andLLMContext.messagesis still a live list of OpenAI-format dicts — so the recall/retain/inject logic is unchanged. The migration is mostly swapping the removed legacy imports.Changes
memory.py— drop the now-impossible legacyOpenAILLMContextFrameimport branch; match onLLMContextFramedirectly. Runtime injection logic untouched.LLMContextFrame; addTestRealLLMContextthat exercises a real pipecatLLMContext+LLMContextFrame(not mocks) to pin the live-list-mutation contract the integration relies on — the migration's highest-risk assumption.basic_pipeline.pytoLLMContext+LLMContextAggregatorPair+LLMRunFramekickoff (create_context_aggregator/get_context_framewere removed in 1.x); updateinteractive_chat.pymock frame.>=3.11, so bumprequires-pythonand drop the 3.10 classifier (CI's.python-versionis already 3.11).OpenAILLMContextFrame→LLMContextFrame.Testing
uv run ruff check/formatclean;uv lock --checkconsistent; wheel builds.