- Purpose: Discover configured LLM providers, their models and capabilities, and the health of the LLM inference subsystem. These endpoints are useful for client UIs and for operational monitoring.
- OpenAPI tag:
llm - Base prefix:
/api/v1
- These endpoints follow the server’s standard AuthNZ settings and typically require authentication.
- Headers:
- Single-user:
X-API-KEY: <key> - Multi-user:
Authorization: Bearer <JWT>
- Single-user:
- Standard limits apply; these endpoints are lightweight and primarily used by UIs/ops. Deployments can choose to relax access via gateway configuration, but the default app configuration applies global security to API routes.
- Summary: Health status for the LLM inference subsystem (provider manager, request queue, rate limiter).
- Response (example):
{
"service": "llm_inference",
"status": "healthy",
"timestamp": "2025-01-01T00:00:00.000000",
"components": {
"providers": {
"initialized": true,
"count": 3,
"report": {
"openai": {
"status": "healthy",
"success_count": 42,
"failure_count": 1,
"consecutive_failures": 0,
"average_response_time": 0.35,
"circuit_breaker_state": "CLOSED",
"last_success": 1735689600.0,
"last_failure": null
}
}
},
"queue": {
"initialized": true,
"queue_size": 0,
"processing_count": 0,
"max_queue_size": 100,
"max_concurrent": 10,
"total_processed": 0,
"total_rejected": 0,
"is_running": true
},
"rate_limiter": {
"initialized": true,
"limits": {
"global_rpm": 60,
"per_user_rpm": 20,
"per_conversation_rpm": 10,
"per_user_tokens_per_minute": 10000
}
}
}
}- Summary: List configured LLM providers and their models.
- Query params:
include_deprecated(bool, default false) - llama.cpp note:
- The
Llama.cppprovider entry may include a first-classllama_cpp_controlsblock for UI-facing capability discovery. - This block is separate from
extra_body_compat.extra_body_compatdocuments raw passthrough keys;llama_cpp_controlsdocuments the stable app-level contract for llama.cpp grammar/thinking controls.
- The
- Response (example):
{
"providers": [
{
"name": "openai",
"display_name": "OpenAI",
"type": "commercial",
"is_configured": true,
"models": ["gpt-4o"],
"models_info": [
{
"name": "gpt-4o",
"context_window": 128000,
"max_output_tokens": 4096,
"capabilities": {"vision": true, "tool_use": true, "streaming": true},
"modalities": {"input": ["text", "image"], "output": ["text"]}
}
],
"default_model": "gpt-4o",
"supports_streaming": true,
"requires_api_key": true,
"capabilities": {"supports_streaming": true, "supports_tools": true, "default_timeout_seconds": 60},
"health": {
"status": "healthy",
"success_count": 42,
"failure_count": 1,
"consecutive_failures": 0,
"average_response_time": 0.35,
"circuit_breaker_state": "CLOSED",
"last_success": 1735689600.0,
"last_failure": null
}
}
],
"diagnostics_ui": {
"queue_status_auto": {"min": 3, "max": 30},
"queue_activity_auto": {"min": 3, "max": 30}
},
"default_provider": "openai",
"total_configured": 1
}llama.cpp capability example:
{
"name": "llama",
"display_name": "Llama.cpp",
"llama_cpp_controls": {
"grammar": {
"supported": true,
"effective_reason": "supported in current deployment",
"source": "first_class+extra_body"
},
"thinking_budget": {
"supported": false,
"request_key": null,
"effective_reason": "no configured thinking-budget mapping for this deployment"
},
"reserved_extra_body_keys": ["grammar"]
}
}llama_cpp_controls semantics:
grammar.supported=falsemeans llama.cpp advanced controls are disabled for the current runtime, typically becausestrict_openai_compatis effective.thinking_budget.supported=trueonly when the deployment explicitly maps the app-level field to an upstream llama.cpp request key.thinking_budget.request_keyis populated from:- environment:
LLAMA_CPP_THINKING_BUDGET_PARAM - config:
Local-API.llama_cpp_thinking_budget_param
- environment:
reserved_extra_body_keysis the list UIs should treat as first-class/reserved when editing rawextra_body.
- Summary: Details for a single provider.
- Path params:
provider_name(e.g.,openai,anthropic) - Query params:
include_deprecated(bool, default false) - Response: Same shape as a single item in
providersabove.404if provider not configured.
- Summary: Flat list of available models across all providers (chat, embeddings, image).
- Query params:
include_deprecated(bool, default false)type(repeatable;chat,embedding,image)input_modality(repeatable; e.g.,text,image)output_modality(repeatable; e.g.,text,image,embedding)
- Response (example):
[
"openai/gpt-4o",
"anthropic/claude-opus-4.1",
"image/stable_diffusion_cpp"
]Tip: For chat-only models, use /api/v1/llm/models?type=chat.
- Summary: Flattened model capability metadata across providers.
- Query params:
include_deprecated(bool, default false)type(repeatable;chat,embedding,image)input_modality(repeatable)output_modality(repeatable)
- Response (example):
{
"models": [
{
"provider": "openai",
"name": "gpt-4o",
"context_window": 128000,
"max_output_tokens": 4096,
"capabilities": {
"vision": true,
"audio_input": false,
"audio_output": false,
"tool_use": true,
"json_mode": true,
"function_calling": true,
"streaming": true,
"thinking": false
},
"modalities": {"input": ["text", "image"], "output": ["text"]},
"notes": "Vision multimodal; tool use supported."
},
{
"provider": "image",
"id": "image/stable_diffusion_cpp",
"name": "stable_diffusion_cpp",
"type": "image",
"capabilities": {
"image_generation": true,
"image_reference_input": false
},
"modalities": {"input": ["text"], "output": ["image"]},
"supported_formats": ["png", "jpg", "webp"],
"is_configured": true
},
{
"provider": "image",
"id": "image/modelstudio",
"name": "modelstudio",
"type": "image",
"capabilities": {
"image_generation": true,
"image_reference_input": true
},
"modalities": {"input": ["text", "image"], "output": ["image"]},
"supported_formats": ["png", "jpg", "webp"],
"is_configured": true
}
],
"total": 2
}Image capability notes:
capabilities.image_reference_inputindicates whether the backend or resolved backend/model combination accepts a managed image reference input forPOST /api/v1/files/create.- Clients should treat missing or false
image_reference_inputas unsupported and avoid assuming prompt-only fallback. - Reference-guided requests use
payload.reference_file_idand are expected to source eligible files fromGET /api/v1/files/reference-images.
- The presence and values for models depend on your
tldw_Server_API/Config_Files/config.txtand environment variables. Some providers may be listed as not configured if API keys or endpoints are missing. - By default, deprecated models are filtered from responses; set
include_deprecated=trueto include them. - Health information reflects in-process runtime state, including circuit-breaker status and queue statistics.
- Provider objects may include additional fields when present in config, such as
endpoint(for local providers),default_temperature,max_tokens,supports_streaming,requires_api_key,capabilities, and ahealthsub-object when the provider manager is initialized. models_info[]entries may also repeat provider-level llama.cpp control metadata so clients that work from model selections can gate controls without hard-coding provider-specific rules.- Note:
total_configuredreflects the number of providers returned in the response; individual providers indicate configuration with theis_configuredflag. - The response from
/llm/providersmay also includediagnostics_uiwith UI auto-refresh intervals for queue status/activity, derived from the server configuration. - Recognized providers include (commercial): OpenAI, AWS Bedrock, Anthropic, Google, Mistral, Cohere, Groq, HuggingFace, OpenRouter, DeepSeek, Qwen, Moonshot, Z.AI; and (local/OpenAI-compatible): Llama.cpp, Kobold.cpp, Oobabooga, TabbyAPI, vLLM, Local LLM, Ollama, Aphrodite, Custom OpenAI API (1/2).
- When no models are configured for Anthropic, safe defaults may be injected:
claude-opus-4.1,claude-sonnet-4.