Handler for `POST /api/v1/llm/complete`.
POST/api/v1/llm/complete
Accepts a multi-turn conversation history and dispatches it through
LlmRouter::complete_with_observability. Each MessageDto is mapped
to a ChatMessage based on its role field:
"system"→ChatMessage::system"user"→ChatMessage::user"assistant"→ChatMessage::assistant"tool"→ChatMessage::tool_result(empty call id)
Returns 400 Bad Request when an unknown role is encountered.
Returns 503 Service Unavailable when no router is configured or the call fails.
Request
Responses
- 200
- 400
- 409
- 503
Completion result
Unknown message role
A local model the load guardrail refused; confirm the load to go ahead
No router configured or backend call failed