Custom Providers
You can configure custom LLM providers that use OpenAI-compatible API format, such as OpenRouter, Ollama, or LM Studio.
Adding a Custom Provider
- Go to Settings → YouTube Transcript Settings → Custom LLM Providers
- Click "Add custom provider"
- Fill in the configuration:
- Provider name: A friendly name (e.g., "OpenRouter", "Local Ollama")
- API endpoint: Full URL to the chat completions endpoint
- API key: Your authentication token
- Model: The model identifier to use
- Timeout: Request timeout in minutes (default: 1)
- Custom headers (optional): Additional HTTP headers (e.g., for OpenRouter)
Example Configurations
OpenRouter (access 100+ models):
- Name:
OpenRouter - Endpoint:
https://openrouter.ai/api/v1/chat/completions - API Key: Your OpenRouter API key (from openrouter.ai)
- Model:
openai/gpt-4o-mini(or any model from their catalog) - Custom headers:
HTTP-Referer: Your site URL (optional, for ranking)X-Title: Your app name (optional, for ranking)
Ollama (local models):
- Name:
Ollama - Endpoint:
http://localhost:11434/v1/chat/completions - API Key:
ollama(any value works for local Ollama) - Model:
llama3(or any installed model) - Timeout: 5 (local models may need more time)
LM Studio (local models):
- Name:
LM Studio - Endpoint:
http://localhost:1234/v1/chat/completions - API Key:
lm-studio(any value works) - Model: The model loaded in LM Studio
- Timeout: 5
Using Custom Providers
- After adding a custom provider, it will appear in the "LLM provider" dropdown
- Select it like any built-in provider
- Enable "Use LLM processing" to use it for transcripts
- All retry logic and error handling works the same as built-in providers
Requirements
- Custom providers must use OpenAI-compatible API format
- The API should accept requests with
model,messages, andtemperaturefields - The response should follow OpenAI's format with
choices[0].message.content - The response should set
choices[0].finish_reasonto"length"when output stops at the model's limit, as OpenAI does. This is how the plugin detects a cut-off response and splits the part. If a server doesn't report it, cut-off parts can't be detected.