LibreChat
Configure LibreChat to use TensorX as an OpenAI-compatible provider.
What is LibreChat?
LibreChat is a self-hosted chat interface that supports custom OpenAI-compatible providers.
Prerequisites
LibreChat installed and running (follow the official LibreChat installation guide)
A TensorX API key (sign up here)
Configuration
Step 1: Add Your API Key
Add your TensorX API key to LibreChat's .env file:
TENSORX_API_KEY=your-tensorx-api-key-hereStep 2: Configure the TensorX Endpoint
Create or edit your librechat.yaml file:
Replace both <MODEL_ID> values with an ID returned by GET /v1/models.
Step 3: Mount the Configuration
Add this to your docker-compose.override.yml:
Step 4: Restart LibreChat
Using TensorX in LibreChat
Open LibreChat in your browser
Start a new conversation
Click the model selector dropdown
Select TensorX AI as the provider
Choose your preferred model
Model selection
Call GET /v1/models with your TensorX API key and use one of the returned IDs. If the integration depends on a capability or token limit, query GET /v1/model/info before selecting the model. See Models for examples.
Advanced Configuration
Auto-Fetch All Models
To automatically discover all available TensorX models:
Custom Parameters
Configuration Options
apiKey
Your TensorX API key from environment variables
baseURL
TensorX API endpoint (https://api.tensorx.ai/v1)
models.default
List of models shown in the dropdown
fetch
Set true to auto-fetch available models
titleConvo
Auto-generate conversation titles
titleModel
Model used for titles
dropParams
Remove parameters that may cause issues
Troubleshooting
Models Not Appearing
Verify your API key is set in
.envCheck that
librechat.yamlis properly mountedRestart the API container:
docker compose restart apiCheck logs:
docker compose logs api
Test Your API Key
Configuration Not Loading
Use proper YAML indentation (2 spaces)
Verify quotes around strings
Check version number matches your LibreChat version
Best Practices
Limit your model list - Only include models you use
Secure your API key - Never commit
.envfiles to version controlMonitor usage - Track API usage in your TensorX dashboard
Resources
Need Help?
Email: support@tensorx.ai
Contact Support: Contact page
Last updated
Was this helpful?

