mem0ai/mem0

feat(ts-sdk): add LiteLLM LLM provider

Geschlossen

#5.762 geöffnet am 23.06.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (6.343 Forks)batch import
enhancementgood first issuehelp wantedsdk-typescriptsize:S

Repository-Metriken

Stars
 (55.741 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 11h) (208 gemergte PRs in 30 T)

Beschreibung

Summary

The Python SDK supports LiteLLM 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/litellm.py
Registered in (Python) mem0/utils/factory.py (LLMFactory)
Target file (TypeScript) mem0-ts/src/oss/src/llms/litellm.ts
Suggested implementation Point the openai client at a LiteLLM proxy (OpenAI-compatible endpoint).

Requirements

  • Implement LiteLLM in mem0-ts/src/oss/src/llms/litellm.ts, extending LLM (mem0-ts/src/oss/src/llms/base.ts) and mirroring the Python provider's behavior (generateResponse / generateChat).
  • Register the "litellm" 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

Python uses the litellm library directly; there is no equivalent TS library. The standard TS approach is to run LiteLLM as a proxy server and target its OpenAI-compatible endpoint — functionally equivalent (one endpoint, many providers).


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

Contributor Guide