Skip to main content

LLM Configuration

Get Current LLM Config

Retrieves the current LLM configuration.

GET/api/llm/current

Responses

Success (200)

{
"config": {
"provider": "openai",
"model": "gpt-4o"
}
}

List LLM Providers

Gets a list of all available LLM providers and their models.

GET/api/llm/providers

Responses

Success (200)

{
"providers": {
"openai": {
"name": "Openai",
"models": ["gpt-4o", "gpt-4-turbo"],
"supportedRouters": ["litellm", "vercel"],
"supportsBaseURL": true
}
}
}

Switch LLM

Switches the LLM configuration.

POST/api/llm/switch

Request Body

  • provider (string), model (string), apiKey (string), etc.

Responses

Success (200)

{
"success": true,
"message": "LLM switched successfully to gpt-4o",
"config": {
"provider": "openai",
"model": "gpt-4o"
}
}

Error (400)

{
"success": false,
"error": "Invalid LLM provider: ..."
}