{"_id":"@agentxin-ai/plugin-vllm","name":"@agentxin-ai/plugin-vllm","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.6":{"name":"@agentxin-ai/plugin-vllm","version":"0.0.6","author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"license":"AGPL-3.0","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"@agentxin-plugins-starter/source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"tslib":"^2.3.0"},"peerDependencies":{"@langchain/openai":"0.6.9","@metad/contracts":"^3.6.1","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@agentxin-ai/plugin-sdk":"^3.6.3","i18next":"25.6.0","lodash-es":"4.17.21","chalk":"4.1.2","zod":"3.25.67"},"scripts":{},"_id":"@agentxin-ai/plugin-vllm@0.0.6","description":"`@agentxin-ai/plugin-vllm` provides a model adapter for connecting vLLM inference services to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin communicates with vLLM clusters via an OpenAI-compatible API, enabling agents to i","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-ZoyHRI79+4vBv32oI+OZzgnSwmCVNd/lqbdVkZhWShL/tgqzH8HR2vWGTxl7ojr9jcaoKP2/T9S1x14y5bx8+A==","shasum":"dc53da598c31202702a5ff911f483c0142df946d","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-vllm/-/plugin-vllm-0.0.6.tgz","fileCount":31,"unpackedSize":50483,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLUluoaFUQUEYDvo8g4iA/riqqaucqzADBtafWaKQIxQIgFYKOT/5mC91XkjwEEOC3F9u7xCnFsSCo1AQKsvjkF2s="}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-vllm_0.0.6_1775181775533_0.3417380266995793"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T02:02:55.475Z","0.0.6":"2026-04-03T02:02:55.692Z","modified":"2026-04-03T02:02:55.857Z"},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"description":"`@agentxin-ai/plugin-vllm` provides a model adapter for connecting vLLM inference services to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin communicates with vLLM clusters via an OpenAI-compatible API, enabling agents to i","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"license":"AGPL-3.0","readme":"# AgentXin Plugin: vLLM\n\n## Overview\n\n`@agentxin-ai/plugin-vllm` provides a model adapter for connecting vLLM inference services to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin communicates with vLLM clusters via an OpenAI-compatible API, enabling agents to invoke conversational models, embedding models, vision-enhanced models, and reranking models within a unified AgentXinAI agentic workflow.\n\n## Core Features\n\n- Provides the `VLLMPlugin` NestJS module, which automatically registers model providers, lifecycle logging, and configuration validation logic.\n- Wraps vLLM's conversational/inference capabilities as AgentXinAI's `LargeLanguageModel` via `VLLMLargeLanguageModel`, supporting function calling, streaming output, and agent token statistics.\n- Exposes `VLLMTextEmbeddingModel`, reusing LangChain's `OpenAIEmbeddings` to generate vector representations for knowledge base retrieval.\n- Integrates `VLLMRerankModel`, leveraging the OpenAI-compatible rerank API to improve retrieval result ranking.\n- Supports declaring capabilities such as vision, function calling, and streaming mode in plugin metadata, allowing flexible configuration of different vLLM deployments in the console.\n\n## Installation\n\n```bash\nnpm install @agentxin-ai/plugin-vllm\n```\n\n> **Peer Dependencies**: The host project must also provide libraries such as `@agentxin-ai/plugin-sdk`, `@nestjs/common`, `@metad/contracts`, `@langchain/openai`, `lodash-es`, `chalk`, and `zod`. Please refer to `package.json` for version requirements.\n\n## Enabling in AgentXinAI\n\n1. Add the plugin package to your system dependencies and ensure it is resolvable by Node.js.\n2. Before starting the service, declare the plugin in your environment variables:\n   ```bash\n   PLUGINS=@agentxin-ai/plugin-vllm\n   ```\n3. Add a new model provider in the AgentXinAI admin interface or configuration file, and select `vllm`.\n\n## Credentials & Model Configuration\n\nThe form fields defined in `vllm.yaml` cover common deployment scenarios:\n\n| Field | Description |\n| --- | --- |\n| `api_key` | vLLM service access token (leave blank if the service does not require authentication). |\n| `endpoint_url` | Required. The base URL of the vLLM OpenAI-compatible API, e.g., `https://vllm.example.com/v1`. |\n| `endpoint_model_name` | Specify explicitly if the model name on the server differs from the logical model name in AgentXinAI. |\n| `mode` | Choose between `chat` or `completion` inference modes. |\n| `context_size` / `max_tokens_to_sample` | Control the context window and generation length. |\n| `agent_though_support`, `function_calling_type`, `stream_function_calling`, `vision_support` | Indicate whether the model supports agent thought exposure, function/tool calling, streaming function calling, and multimodal input, to inform UI capability hints. |\n| `stream_mode_delimiter` | Customize the paragraph delimiter for streaming output. |\n\nAfter saving the configuration, the plugin will call the `validateCredentials` method in the background, making a minimal request to the vLLM service to ensure the credentials are valid.\n\n## Model Capabilities\n\n- **Conversational Models**: Uses `ChatOAICompatReasoningModel` to proxy the vLLM OpenAI API, supporting message history, function calling, and streaming output.\n- **Embedding Models**: Relies on LangChain's `OpenAIEmbeddings` for knowledge base vectorization and retrieval-augmented generation.\n- **Reranking Models**: Wraps `OpenAICompatibleReranker` to semantically rerank recall results.\n- **Vision Models**: If the vLLM inference service supports multimodal (text+image) input, enable `vision_support` in the configuration to declare multimodal capabilities to the frontend.\n\n## Development & Debugging\n\nFrom the repository root, enter the `agentxinai/` directory and use Nx commands to build and test:\n\n```bash\nnpx nx build @agentxin-ai/plugin-vllm\nnpx nx test @agentxin-ai/plugin-vllm\n```\n\nBuild artifacts are output to `dist/` by default. Jest configuration is in `jest.config.ts` for writing and running unit tests.\n\n## License\n\nThis project follows the [AGPL-3.0 License](../../../LICENSE) found at the root of the repository.\n","readmeFilename":"README.md","_rev":"1-9ac2cf4bccc08b0b9093f92f2d4ec5d2"}