Chat completions
/v1/chat/completionsGenerate the next assistant message from a conversation. Small streaming and non-streaming requests have been verified through the isolated Go gateway against the real MI325X inference service.
Request fields
| Field | Type | Current behavior |
|---|---|---|
| model | string | darkseek-v4.1; use model discovery. |
| messages | array | Conversation messages forwarded to the inference engine. |
| stream | boolean | False: JSON response. True: SSE response. |
| max_tokens | integer | Positive, bounded by configured key/service output policy. |
| n | integer | Only 1 admitted by the gateway. |
| tools, tool_choice | protocol fields | Forwarded without rewriting; end-to-end compatibility not yet certified. |
Output limits
Use exactly one output-token limit. Invalid, negative, fractional and oversized limits are rejected before inference. The current gateway default is 4,096 output tokens with a configurable maximum of 32,768; production configuration can be stricter.
Streaming
Read data events incrementally, including arbitrary UTF-8 and event-boundary fragmentation. Content appears in choices[0].delta.content. Wait for [DONE] before treating the stream as complete. Cancellation closes the upstream HTTP request and releases admission capacity.
Reasoning & tools
The inference runtime includes reasoning and tool parsers, but that alone does not establish compatibility for every parameter or agent workflow. DeepThink, search and external tool execution are not advertised as verified features until exact behavioral tests pass.