{"id":27403,"library":"smg-grpc-servicer","title":"SMG gRPC Servicer","description":"SMG gRPC servicer implementations for LLM inference engines (vLLM, SGLang). Provides gRPC service stubs and helpers for the Shepherd Model Gateway ecosystem. Current version 0.5.2, requires Python >=3.10.","status":"active","version":"0.5.2","language":"python","source_language":"en","source_url":"https://github.com/lightseekorg/smg","tags":["grpc","llm","inference","servicer","vllm","sglang","smg"],"install":[{"cmd":"pip install smg-grpc-servicer","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The async variant is the correct default; the sync variant is deprecated.","wrong":"from smg_grpc_servicer import NvidiaGpuModelProvider","symbol":"NvidiaGpuModelProviderAsyncio","correct":"from smg_grpc_servicer import NvidiaGpuModelProviderAsyncio"}],"quickstart":{"code":"import asyncio\nfrom smg_grpc_servicer import NvidiaGpuModelProviderAsyncio\n\nasync def main():\n    provider = NvidiaGpuModelProviderAsyncio(\n        workers=[{\"url\": \"localhost:50051\", \"disconnected_debounce_s\": 5.0}],\n        request_interval=0.1,\n        inference_engine=\"sglang\",\n        name=\"my-engine\",\n    )\n    async with provider.run():\n        await asyncio.sleep(10)\n\nasyncio.run(main())","lang":"python","description":"Run a basic async gRPC provider for a single SGLang worker."},"warnings":[{"fix":"Replace `NvidiaGpuModelProvider` with `NvidiaGpuModelProviderAsyncio` and adjust code to use `async with` context manager.","message":"The sync `NvidiaGpuModelProvider` is deprecated and will be removed in a future release. Use `NvidiaGpuModelProviderAsyncio`.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Install as `pip install smg-grpc-servicer` and import as `import smg_grpc_servicer`.","message":"The library name on PyPI is `smg-grpc-servicer` but imports use underscores: `smg_grpc_servicer`. Common mistake is to try `import smg_grpc_servicer` with hyphens.","severity":"gotcha","affected_versions":"all"},{"fix":"Set `inference_engine='sglang'` or `inference_engine='vllm'` (lowercase).","message":"The `inference_engine` parameter must match exactly the engine running on the gRPC workers. Supported values: 'sglang', 'vllm'. Case-sensitive.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install smg-grpc-servicer`. Then import as `import smg_grpc_servicer`.","cause":"Library not installed or installed under the hyphenated name.","error":"ModuleNotFoundError: No module named 'smg_grpc_servicer'"},{"fix":"Use `disconnected_debounce=5.0` instead of `disconnected_debounce_s=5.0`.","cause":"Keyword argument was renamed in v0.5.0 from `disconnected_debounce_s` to `disconnected_debounce`.","error":"TypeError: NvidiaGpuModelProviderAsyncio.__init__() got an unexpected keyword argument 'disconnected_debounce_s'"},{"fix":"Switch to `NvidiaGpuModelProviderAsyncio` and use `async with provider.run()`.","cause":"Using the sync provider which does not have an async run method.","error":"AttributeError: 'NvidiaGpuModelProvider' object has no attribute 'run'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}