pub async fn chat_completions_handler(
__arg0: State<Arc<AppState>>,
tenant: Option<Extension<TenantId>>,
auth: Option<Extension<AuthContext>>,
payload: Result<Json<ChatCompletionsRequest>, JsonRejection>,
) -> ResponseExpand description
POST /v1/chat/completions — OpenAI chat-completions shim, wired
through to the internal invoke protocol (T41, v0.4).
Same flow as completions_handler but with the chat envelope
(response object: "chat.completion", choices carry a
{role, content} message object) and the messages array
concatenated into a single prompt string via
crate::openai_translator::assemble_chat_prompt.