diff --git a/CHANGELOG.md b/CHANGELOG.md index 95468a7..2319ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to the AVP Python SDK are documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/). Versions follow [Semantic Versioning](https://semver.org/). +## [Unreleased] + +### Changed + +- **Engine dependency floors** — `avp[hf]` now requires `transformers>=5.10.4` and `avp[vllm]` requires `vllm>=0.29.0` (with `huggingface-hub>=1.5,<2`). vLLM dropped its `transformers<5` cap in 0.24.0, so the `hf`, `vllm`, and `all` extras now resolve together on the current transformers 5.x line instead of forcing the old 4.x stack. + +### Fixed + +- **Protobuf gencode/runtime mismatch** — `src/avp/avp_pb2.py` was generated with protoc 6.31.1, whose `ValidateProtobufRuntimeVersion` guard requires a protobuf runtime `>=6.31.1`, while `autogen-core` (pulled in by the `autogen` extra and therefore by `all`) caps protobuf at the 5.29 line — so `import avp` raised `VersionError` in any environment containing that extra. The module is now regenerated with protoc 5.29 (gencode 5.29.0), the `protobuf` floor is raised to `>=5.29`, and `grpcio-tools` is pinned to `>=1.71.2,<1.72` so `make proto` cannot silently raise the runtime requirement again. + ## [0.6.2] - 2026-04-26 ### Added diff --git a/Makefile b/Makefile index 16e74db..40aefcf 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ .PHONY: proto test lint clean install +# Regenerate avp_pb2.py. Keep grpcio-tools on the 5.29 gencode line +# (>=1.71.2,<1.72): the autogen extra pins protobuf to 5.29.x, so a +# newer protoc would emit gencode the runtime refuses to load. proto: python -m grpc_tools.protoc \ -I proto \ diff --git a/pyproject.toml b/pyproject.toml index 4b1ca17..3098d2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ dependencies = [ "numpy>=1.24", - "protobuf>=4.21", + "protobuf>=5.29", "zstandard>=0.21", ] @@ -36,9 +36,9 @@ Changelog = "https://github.com/VectorArc/avp-python/blob/main/CHANGELOG.md" [project.optional-dependencies] # Engine connectors (pick one or more) -hf = ["torch>=2.0", "transformers>=5.0"] +hf = ["torch>=2.0", "transformers>=5.10.4"] huggingface = ["avp[hf]"] -vllm = ["vllm>=0.17.0,<0.19.0", "safetensors>=0.4", "huggingface-hub>=1.0"] +vllm = ["vllm>=0.29.0", "safetensors>=0.4", "huggingface-hub>=1.5,<2"] llamacpp = ["llama-cpp-python>=0.3", "gguf>=0.6"] ollama = ["llama-cpp-python>=0.3", "gguf>=0.6"] # Framework integrations (each requires HF engine) @@ -57,7 +57,7 @@ dev = [ "pytest>=7.0", "pytest-asyncio>=0.21", "ruff>=0.1", - "grpcio-tools>=1.59", + "grpcio-tools>=1.71.2,<1.72", ] [project.entry-points."vllm.general_plugins"] diff --git a/src/avp/avp_pb2.py b/src/avp/avp_pb2.py index 69aaa91..a73085d 100644 --- a/src/avp/avp_pb2.py +++ b/src/avp/avp_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: avp.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 5.29.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -11,9 +11,9 @@ from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, + 5, + 29, + 0, '', 'avp.proto' ) @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tavp.proto\x12\x03\x61vp\"\xdb\x03\n\x08Metadata\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x17\n\x0fsource_agent_id\x18\x02 \x01(\t\x12\x17\n\x0ftarget_agent_id\x18\x03 \x01(\t\x12\x10\n\x08model_id\x18\x04 \x01(\t\x12\x12\n\nhidden_dim\x18\x05 \x01(\r\x12\x12\n\nnum_layers\x18\x06 \x01(\r\x12&\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x10.avp.PayloadType\x12\x1c\n\x05\x64type\x18\x08 \x01(\x0e\x32\r.avp.DataType\x12\x14\n\x0ctensor_shape\x18\t \x03(\r\x12$\n\x04mode\x18\n \x01(\x0e\x32\x16.avp.CommunicationMode\x12\x18\n\x0b\x63ompression\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x12\n\navp_map_id\x18\r \x01(\t\x12\'\n\x05\x65xtra\x18\x0e \x03(\x0b\x32\x18.avp.Metadata.ExtraEntry\x12\x1d\n\x10payload_checksum\x18\x0f \x01(\rH\x01\x88\x01\x01\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_compressionB\x13\n\x11_payload_checksumJ\x04\x08\x0c\x10\r\"\xcc\x01\n\x10TransmitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x07message\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x12/\n\x05\x65xtra\x18\x04 \x03(\x0b\x32 .avp.TransmitResponse.ExtraEntry\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08_messageB\r\n\x0b_request_id*<\n\x0bPayloadType\x12\x10\n\x0cHIDDEN_STATE\x10\x00\x12\x0c\n\x08KV_CACHE\x10\x01\x12\r\n\tEMBEDDING\x10\x02*.\n\x11\x43ommunicationMode\x12\n\n\x06LATENT\x10\x00\x12\r\n\tJSON_MODE\x10\x01*<\n\x08\x44\x61taType\x12\x0b\n\x07\x46LOAT32\x10\x00\x12\x0b\n\x07\x46LOAT16\x10\x01\x12\x0c\n\x08\x42\x46LOAT16\x10\x02\x12\x08\n\x04INT8\x10\x03\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tavp.proto\x12\x03\x61vp\"\xdb\x03\n\x08Metadata\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x17\n\x0fsource_agent_id\x18\x02 \x01(\t\x12\x17\n\x0ftarget_agent_id\x18\x03 \x01(\t\x12\x10\n\x08model_id\x18\x04 \x01(\t\x12\x12\n\nhidden_dim\x18\x05 \x01(\r\x12\x12\n\nnum_layers\x18\x06 \x01(\r\x12&\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x10.avp.PayloadType\x12\x1c\n\x05\x64type\x18\x08 \x01(\x0e\x32\r.avp.DataType\x12\x14\n\x0ctensor_shape\x18\t \x03(\r\x12$\n\x04mode\x18\n \x01(\x0e\x32\x16.avp.CommunicationMode\x12\x18\n\x0b\x63ompression\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x12\n\navp_map_id\x18\r \x01(\t\x12\'\n\x05\x65xtra\x18\x0e \x03(\x0b\x32\x18.avp.Metadata.ExtraEntry\x12\x1d\n\x10payload_checksum\x18\x0f \x01(\rH\x01\x88\x01\x01\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_compressionB\x13\n\x11_payload_checksumJ\x04\x08\x0c\x10\r\"\xcc\x01\n\x10TransmitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x14\n\x07message\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x12/\n\x05\x65xtra\x18\x04 \x03(\x0b\x32 .avp.TransmitResponse.ExtraEntry\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08_messageB\r\n\x0b_request_id*-\n\x0bPayloadType\x12\x10\n\x0cHIDDEN_STATE\x10\x00\x12\x0c\n\x08KV_CACHE\x10\x01*.\n\x11\x43ommunicationMode\x12\n\n\x06LATENT\x10\x00\x12\r\n\tJSON_MODE\x10\x01*<\n\x08\x44\x61taType\x12\x0b\n\x07\x46LOAT32\x10\x00\x12\x0b\n\x07\x46LOAT16\x10\x01\x12\x0c\n\x08\x42\x46LOAT16\x10\x02\x12\x08\n\x04INT8\x10\x03\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,11 +36,11 @@ _globals['_TRANSMITRESPONSE_EXTRAENTRY']._loaded_options = None _globals['_TRANSMITRESPONSE_EXTRAENTRY']._serialized_options = b'8\001' _globals['_PAYLOADTYPE']._serialized_start=703 - _globals['_PAYLOADTYPE']._serialized_end=763 - _globals['_COMMUNICATIONMODE']._serialized_start=765 - _globals['_COMMUNICATIONMODE']._serialized_end=811 - _globals['_DATATYPE']._serialized_start=813 - _globals['_DATATYPE']._serialized_end=873 + _globals['_PAYLOADTYPE']._serialized_end=748 + _globals['_COMMUNICATIONMODE']._serialized_start=750 + _globals['_COMMUNICATIONMODE']._serialized_end=796 + _globals['_DATATYPE']._serialized_start=798 + _globals['_DATATYPE']._serialized_end=858 _globals['_METADATA']._serialized_start=19 _globals['_METADATA']._serialized_end=494 _globals['_METADATA_EXTRAENTRY']._serialized_start=407