mem0ai/mem0

feat(ts-sdk): add vLLM LLM provider

已关闭

#5,761 创建于 2026年6月23日

 (1 条评论) (0 个反应) (0 位负责人)Python (6,343 个派生)batch import
enhancementgood first issuehelp wantedsdk-typescriptsize:S

仓库指标

星标
 (55,741 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Summary

The Python SDK supports vLLM as an LLM provider, but the TypeScript OSS SDK (mem0ai/oss) does not. Add it to bring the TS SDK to parity.

Python reference mem0/llms/vllm.py
Registered in (Python) mem0/utils/factory.py (LLMFactory)
Target file (TypeScript) mem0-ts/src/oss/src/llms/vllm.ts
Suggested implementation OpenAI-compatible — subclass OpenAILLM; baseURL points to the user's vLLM server.

Requirements

  • Implement VllmLLM in mem0-ts/src/oss/src/llms/vllm.ts, extending LLM (mem0-ts/src/oss/src/llms/base.ts) and mirroring the Python provider's behavior (generateResponse / generateChat).
  • Register the "vllm" provider in mem0-ts/src/oss/src/utils/factory.ts (LLMFactory).
  • Add config typing in mem0-ts/src/oss/src/types/.
  • Add a unit test under mem0-ts/src/oss/src/tests/.
  • No new dependency — reuse the existing openai client with a custom baseURL.
  • Update docs under docs/ if this provider is user-facing.

Reference pattern

Mirror an existing TS provider: llms/deepseek.ts (OpenAI-compatible) or llms/openai.ts.

Notes

vLLM serves an OpenAI-compatible endpoint; the baseURL is user-supplied (no hosted default).


Part of the TypeScript ↔ Python SDK provider-parity effort. One provider per issue (atomic).

贡献者指南