Relax protobuf pin to support both 5.x and 6.x runtimes

Pipecat 1.0.8 hard-required protobuf 6.x via the base `protobuf>=6.31.1,<7`
pin, blocking users whose dependency graph already constrains protobuf to
the 5.x line. The original bump (PR #4136) was only needed because
`nvidia-riva-client>=2.25.1` ships gencode compiled with protoc 6.31.1.

Changes:

- Widen base pin to `protobuf>=5.29.6,<7`.
- Regenerate `frames_pb2.py` with `grpcio-tools~=1.67.1` (protoc 5.x). Per
  Google's cross-version runtime guarantee, 5.x gencode runs on both 5.x
  and 6.x runtimes, so this single artifact serves all users.
- Loosen the dev pin `grpcio-tools` to `>=1.67.1,<2` so contributors can
  install `pipecat[dev,nvidia]` without resolver conflict. Comment in
  `frames.proto` documents the 1.67.x requirement for regeneration.
- Add an explicit `protobuf>=6.31.1,<7` to the `nvidia` extra. This
  compensates for nvidia-riva-client's missing `protobuf` install
  requirement (upstream packaging gap, see
  https://github.com/nvidia-riva/python-clients/issues/172). When that
  issue is resolved, the explicit protobuf entry in the `nvidia` extra
  can be removed.

Verified: pipecat imports cleanly on both protobuf 5.29.6 and 6.33.6;
`tests/test_protobuf_serializer.py` passes; `import riva.client` succeeds
when `pipecat[nvidia]` is installed.
This commit is contained in:
Mark Backman
2026-04-24 21:15:32 -04:00
parent 38a02271c5
commit 4088992d97
4 changed files with 112 additions and 80 deletions

View File

@@ -29,7 +29,7 @@ dependencies = [
"nltk>=3.9.4,<4",
"numpy>=1.26.4,<3",
"Pillow>=11.1.0,<13",
"protobuf>=6.31.1,<7",
"protobuf>=5.29.6,<7",
"pydantic>=2.10.6,<3",
"pyloudnorm~=0.2.0",
"resampy~=0.4.3",
@@ -94,7 +94,7 @@ moondream = [ "accelerate~=1.10.0", "einops~=0.8.0", "pyvips[binary]~=3.0.0", "t
nebius = []
neuphonic = [ "pipecat-ai[websockets-base]" ]
novita = []
nvidia = [ "nvidia-riva-client>=2.25.1,<3" ]
nvidia = [ "nvidia-riva-client>=2.25.1,<3", "protobuf>=6.31.1,<7" ]
openai = [ "pipecat-ai[websockets-base]" ]
rnnoise = [ "pyrnnoise~=0.4.1" ]
openrouter = []
@@ -129,7 +129,7 @@ xai = [ "pipecat-ai[websockets-base]" ]
dev = [
"build~=1.4.0",
"coverage~=7.13.4",
"grpcio-tools~=1.78.0",
"grpcio-tools>=1.67.1,<2",
"pip-tools~=7.5.3",
"pre-commit~=4.5.1",
"pyright>=1.1.404,<1.2",