Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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


Configuration

Step 1: Add Your API Key

Add your TensorX API key to LibreChat's .env file:

TENSORX_API_KEY=your-tensorx-api-key-here

Step 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

  1. Open LibreChat in your browser

  2. Start a new conversation

  3. Click the model selector dropdown

  4. Select TensorX AI as the provider

  5. 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

Option
Description

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

  1. Verify your API key is set in .env

  2. Check that librechat.yaml is properly mounted

  3. Restart the API container: docker compose restart api

  4. Check 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

  1. Limit your model list - Only include models you use

  2. Secure your API key - Never commit .env files to version control

  3. Monitor usage - Track API usage in your TensorX dashboard


Resources


Need Help?

Last updated

Was this helpful?