Chat Completions
Changed onOpenAI-compatible chat completions endpoint.
Thin shell over :func:services.inference.adapters.openai_chat.run_chat_completion. The adapter handles LLM-passthrough vs Fastino-task dispatch, SSE rendering with <think>...</think> folding for reasoning models, tool-call deltas, finish-reason mapping, persistence, and error mapping. The router keeps only HTTP-shaped concerns: route declaration, auth, rate limiting.
Args: body: Validated :class:ChatCompletionRequest. request: FastAPI request (forwarded so the adapter can read API-key billing context out of request.state for streaming responses). auth: Authenticated request context.
Returns: :class:ChatCompletionResponse for non-streaming, or a :class:StreamingResponse of chat.completion.chunk SSE events terminated by data: [DONE] when body.stream is true.
Request
- Base URLhttps://api.pioneer.ai (the document declares no server; this is the origin it was published from)
- Auth
- API key in header X-API-Key
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Chat completion. Returns application/json (ChatCompletionResponse) by default, or text/event-stream of ChatCompletionStreamChunk events terminated by data: [DONE] when stream=true.
Changes
- warning
removed the request property
- warning
removed the request property
- warning
removed the optional property
from the response with the status (media type: application/json) - warning
removed the optional property
from the response with the status (media type: text/event-stream) - info
added the optional property
to the response with the status (media type: application/json) - info
added the optional property
to the response with the status (media type: text/event-stream)
- warning
- warning
the
/request property's max was set to2.00 - warning
the
/request property's min was set to0.00 - warning
removed the optional property
from the response with the status - info
added the new optional request property
- info
added the required property
to the response with the status
- warning