Choose the correct path
The Router key is separate from the Confidential API key. Do not substitute
PREM_API_KEY for PREM_ROUTER_API_KEY or reuse Confidential Proxy KEK settings with Router.
Add Router as a custom provider
In your tool, choose Add provider, then select Custom, OpenAI-compatible, or OpenAI Chat Completions. Enter these values:
Before you configure a model, call authenticated
GET /v1/models with the
same API key. See Models for the command. When the field is
named Base URL or API base, do not append
/chat/completions. The final request URL should contain /v1 exactly once.
Enter kimi-k3 without a provider prefix; prem/kimi-k3 is only the OpenCode
model selector. Select Chat Completions rather than the Responses API.
No custom headers are required when the tool has a dedicated API key field. If it only accepts custom headers, add Authorization: Bearer <your-api-key>. Do not enter the literal text $PREM_ROUTER_API_KEY in a GUI unless that tool documents environment-variable expansion.
Streaming requirements can differ by API key. If a model returned by
GET /v1/models includes "streaming_required": true, enable streaming or leave
it on automatic. OpenCode and Pi support streamed model responses."model":"kimi-k3" and an assistant message.
OpenCode
Createopencode.json in your project root:
prem/kimi-k3 as its default provider and model selector. To
switch models, use prem/<model-id> with an exact ID returned by GET /v1/models for the same API key.
If the response contains either additional model, you can add the matching
entries to the models object:
OpenClaw
Add a separate Router provider to~/.openclaw/openclaw.json. Keep the confidential provider under a different name if you use both:
kimi-k3. Confirm that the model appears in GET /v1/models
for the active key. If you select another returned model, update both the model
id and agents.defaults.model.primary. Set contextWindow from that model’s
returned context_length.
Run openclaw config validate before starting an agent. Router does not provide enclave confidentiality for the model request, and OpenClaw’s local tools remain outside the confidential runtime.
Hermes Agent
Add a named Router provider to~/.hermes/config.yaml:
kimi-k3. Confirm that the model appears in GET /v1/models
for the active key. If you select another returned model, update
default_model, both model IDs, and both context-length values.
Run hermes config check, then use hermes --oneshot "Reply with exactly: router ok" for the first request.
Goose
Set Goose’s built-in OpenAI provider to the Router endpoint:kimi-k3. Confirm that the model appears in GET /v1/models
for the active key. Otherwise, set GOOSE_MODEL to an exact returned model ID.
Run a bounded request:
Pi
Add this provider to~/.pi/agent/models.json:
kimi-k3 only with an exact ID returned by GET /v1/models for the
same API key.
If the response contains either additional model, you can add the matching
entries to the models array:
supportsStrictMode controls Pi function-tool metadata. It does not disable JSON Schema response formatting.
