Documentation

Knowledge & Memory Integrations

Generate embeddings through ModelRiver and store them in your vector database. Build production-scale RAG with automatic failover across embedding providers.

Overview

Vector databases store AI-generated embeddings for similarity search, enabling Retrieval-Augmented Generation (RAG) systems. By routing embedding generation through ModelRiver, you get automatic failover across embedding providers: ensuring your ingestion and search pipelines never stall.

Why use ModelRiver with a vector database?

  • Embedding failover: If one embedding provider is down, another takes over
  • Consistent embeddings: Same workflow, same dimensions, regardless of provider
  • Cost tracking: Monitor embedding generation costs separately from chat costs
  • Unified observability: Both embedding and chat requests in one dashboard

Supported databases

DatabaseTypeHighlightsDifficultyGuide
PineconeManagedServerless, fast queries, production-scale⭐⭐ MediumView guide →
WeaviateOpen-sourceCustom vectorisers, hybrid search⭐⭐ MediumView guide →
SupabasePostgreSQL + pgvectorFull-stack, auth, real-time, RLS⭐⭐ MediumView guide →

How RAG works with ModelRiver

User question
ModelRiver Embed question via embedding workflow
(Embeddings)
Vector DB Find similar documents
(Pinecone, etc)
ModelRiver Generate answer with context via chat workflow
(Chat)

Both the embedding and chat steps are routed through ModelRiver, so each has independent failover, cost tracking, and observability.


Pinecone

Fully managed vector database optimised for AI. Serverless deployment, fast queries, and production-scale indexing.

PYTHON
1from openai import OpenAI
2from pinecone import Pinecone
3 
4client = OpenAI(base_url="https://api.modelriver.com/v1", api_key="mr_live_...")
5pc = Pinecone(api_key="YOUR_PINECONE_KEY")

Full Pinecone guide →


Weaviate

Open-source vector search engine with custom vectorisers, hybrid search, and multi-modal support.

PYTHON
1from openai import OpenAI
2import weaviate
3 
4client = OpenAI(base_url="https://api.modelriver.com/v1", api_key="mr_live_...")
5wv = weaviate.connect_to_local()

Full Weaviate guide →


Supabase

Open-source Firebase alternative with built-in pgvector. Store embeddings alongside application data with auth, real-time, and Row Level Security.

PYTHON
1from openai import OpenAI
2from supabase import create_client
3 
4client = OpenAI(base_url="https://api.modelriver.com/v1", api_key="mr_live_...")
5supabase = create_client("https://YOUR_PROJECT.supabase.co", "YOUR_KEY")

Full Supabase guide →


Next steps