Implementation
core/system-Core/http/ai.js:POST /api/v3/chat/completions、GET /api/v3/models
Conventions
- Input/output parameters compatible with OpenAI Chat Completions (including SSE
[DONE])。 model= provider key。workflow.workflows/workflow.streams→ MCP tool allowlist.multipart:messagesis a JSON string;image/*is converted to base64 and merged into the last user message.
Node 26
- Implementation is located at
core/system-Core/http/ai.js: outbound LLM uses the globalfetch+buildFetchOptionsWithProxy。 - multipart image encoding uses
toBase64(), do nottoString('base64'); for timeouts useAbortSignal.timeout。 - Full API table: skill
xrk-node-runtime。
Troubleshooting
401 → docs/AUTH.md; no provider → under the port aistream.yaml / compat YAML; no tools → enableTools and streams allowlist.