LLM Provider Configuration Schema
Model: LlmSetting
Fields:
| Field | Type | Required | Description |
|---|---|---|---|
provider | enum | Yes | openai, anthropic, google, openai-compatible |
model | string | Yes | Exact model identifier from the provider |
api_key | string | Yes | API key from the provider’s developer console |
base_url | string | No | Required only for openai-compatible. API endpoint URL. |
is_active | boolean | Yes | Only one setting can be active at a time |
Provider-Specific Notes:
- OpenAI: Use models like
gpt-4o,gpt-4-turbo. Nobase_urlneeded. - Anthropic: Use models like
claude-3-5-sonnet-20241022. Nobase_urlneeded. - Google: Use models like
gemini-1.5-pro. Nobase_urlneeded. - OpenAI-compatible: Requires
base_url(e.g.,<your-provider-endpoint>). Supports DeepSeek, Qwen, Together, OpenRouter, Groq, Ollama, and any OpenAI-compatible API.
Test Connection Endpoint:
POST /super-admin/llm/test
Rate limited to 5 requests per minute. Sends a minimal structured prompt to verify the provider responds correctly.
Last updated on