Electron — Chat Completions
Electron — Chat Completions
Authentication
Header authentication of the form Bearer <token>
Request
Model ID. Currently only "electron".
Maximum output tokens. Combined input + output context ceiling is 32,768.
When true, response is text/event-stream. See the
Streaming guide.
Tool / function calling definitions. Forwarded verbatim to the
OpenAI-compatible upstream, so the standard OpenAI shape
({type: "function", function: {name, description, parameters}})
is the recommended form and is what the examples below use.
The wire schema is permissive (array<object>) — any tools payload
the upstream accepts will work. See Tool Calling
for details.
Output shape. {type: "text"} (default) or {type: "json_object"}.
Best-effort determinism.
Opaque end-user identifier. Not interpreted by Electron.
Response headers
Response
Non-streaming: standard OpenAI chat.completion object.
Streaming (stream: true): text/event-stream SSE — each
event is a chat.completion.chunk delta, terminated by
data: [DONE].

