Send a prompt to a single AI model and receive a response. Supports automatic model selection, custom system prompts, and thread persistence.
"auto" for random selectionSelection Logic (Lines 102-108):null, empty, "auto" → Random active modelrequest.System)Default: Implementation-defined and not guaranteed (provider-specific)"ai.response" (Line 121)true on success (Line 130)output.content[0].text)"automatic" or "manual" (Line 139)threadId provided and valid GUIDnull or "auto": Query ai_models table for random active modelthreadId providedthreadId valid GUID| Code | HTTP | Cause | Controller Line |
|---|---|---|---|
INVALID_REQUEST | 400 | Prompt null or whitespace | 91-97 |
UNAUTHORIZED | 401 | Missing/invalid JWT | Middleware |
API_ERROR | 500 | Provider failure | 180-186 |
API_ERROR | 500 | Uncaught exception | 178-187 |
"auto" (Line 102 check)