Add Prem Router as a custom provider
In your tool, choose Add provider, then select Custom, OpenAI-compatible, or OpenAI Chat Completions. Enter these values:
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.
qwen-3.7-max, qwen-3.7-plus, and qwen-3.6-plus require streaming.
Enable streaming or leave it on automatic when using these models. 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, replace it with prem/<model-id> using an ID from the
available models table.
Pi
Add this provider to~/.pi/agent/models.json:
kimi-k3 with any ID from the available models table.
supportsStrictMode controls Pi function-tool metadata. It does not disable JSON Schema response formatting.

