temperature or tools are ignored. The intern owns its sampling and its tools.
Example Usage
import { InternChatCompletionRequest } from "@openrouter/sdk/models";
let value: InternChatCompletionRequest = {
messages: [
{
content: "Summarize the open pull requests.",
role: "user",
},
],
stream: true,
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
approvalMode | models.InternApprovalMode | :heavy_minus_sign: | How the run started by this prompt handles tool approvals. self-drive (the default when omitted) consents on your behalf and runs the shell unsandboxed. manual asks you before an approval-bearing tool runs, as an openrouter.provide_input permission request, and keeps the shell sandboxed until an escalation is allowed. The mode applies to the run this prompt starts and is not remembered by the session. Repeat it on each new prompt that should use it. A tool reply continues the run under the mode it started with. | manual |
messages | models.InternChatMessage[] | :heavy_check_mark: | The conversation. Only the last message is read. A last user message starts a run. A last tool message answers the interaction named by its tool_call_id and requires session_id. | |
model | string | :heavy_minus_sign: | Accepted for OpenAI compatibility and never used. The intern runs the model configured on it (PATCH the intern to change it). Streamed chunks report the runtime’s identifier for that model as the intern reports it, or openrouter/intern on chunks whose event carries no model (before the intern reports one, and on the chunks the API emits itself: the timeout, run-ended and severed-stream error chunks, the stop chunk of a replay that ends without a terminal daemon event, and the final usage chunk after any of them). A usage chunk that follows a daemon completion event carries the model the intern reported. | openrouter/intern |
sessionId | string | :heavy_minus_sign: | The daemon session to continue, as returned in session_id on the final chunk of an earlier response. Omit it to start a new session. An id the intern has not seen before is not an error: it starts a new session under that id, so a mistyped id forks the conversation. Sessions are scoped to the intern’s own daemon. Required when the last message has role tool. | ses_7f3c9a |
stream | true | :heavy_check_mark: | Must be true. This endpoint only streams. false or an omitted stream is refused with 400 and reason bad_request. | true |