-
Notifications
You must be signed in to change notification settings - Fork 1
[FEATURE] LiteLLM RPC Integration #138
Copy link
Copy link
Open
Labels
backendrequires changes in the backend of CARErequires changes in the backend of CAREenhancementNew feature or requestNew feature or requestfrontendrequires changes in the frontend of CARErequires changes in the frontend of CARE
Milestone
Description
Summary
Add a new RPC service in the CARE backend to route LLM requests through LiteLLM instead of BrokerIO, reducing latency and complexity for general-purpose LLM calls.
Motivation
Currently, all model requests including simple LLM prompts are routed through BrokerIO. BrokerIO was designed for orchestrating specialized NLP models and introduces unnecessary overhead (queuing, skill lookup, resource binding) for straightforward LLM API calls. A dedicated LiteLLM RPC path provides a lighter, faster route.
Requirements
- Create a new
LiteLLMRPCservice extending the existing RPC base class - Support communication with LiteLLM via WebSocket (consistent with CARE's RPC pattern)
- Route requests to external LLM APIs (OpenAI, Anthropic, etc.) and locally hosted models (Ollama) through LiteLLM
- Keep BrokerIO intact for specialized NLP skills
- The NLP service should determine the correct path (LiteLLM or BrokerIO) based on the request type
- Log all requests and responses in the database for cost tracking and research
Acceptance Criteria
- A request from the frontend can reach an external LLM (e.g. GPT-4o) via LiteLLM and return a response
- A request from the frontend can reach a local model (e.g. Ollama) via LiteLLM and return a response
- Existing BrokerIO-based NLP skills continue to work without changes
- All LLM inputs and outputs are recorded in the database
References
- Existing RPC base class:
backend/webserver/RPC.js - NLP service:
backend/webserver/services/nlp.js - LiteLLM docs: https://docs.litellm.ai/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendrequires changes in the backend of CARErequires changes in the backend of CAREenhancementNew feature or requestNew feature or requestfrontendrequires changes in the frontend of CARErequires changes in the frontend of CARE