- Confidential API
- Router (Beta)
Use the local Confidential Proxy for sensitive model traffic. Go to the confidential setup.
Confidential API
How the connection works
Before you start
You need:- Goose installed. See the official installation guide.
- A Prem API key. See API Keys.
- A 32-byte client KEK encoded as 64 hexadecimal characters.
- The current Prem gateway and enclave endpoints.
- A chat model returned by your Prem model-list request.
1.45.0 using a normal response and a local shell-tool call.
1. Set your secrets
config.yaml.
2. Start the Confidential Proxy
3. Select an enabled model
id. This example uses qwen36-27b:
4. Configure Goose
Set Goose’s OpenAI provider variables in the shell that starts it:OPENAI_HOST contains the origin. OPENAI_BASE_PATH contains the Chat Completions path without a leading slash. A wrong path usually returns 404.
Goose documents this pattern under custom OpenAI endpoints. The API key remains in the process environment instead of ~/.config/goose/config.yaml.
5. Run Goose
Run one chat-only request first:approve while evaluating commands. Goose can stream model output through the Chat Completions connection. A model-produced tool call returns through the encrypted model channel; Goose executes the tool locally.
Tool and extension boundary
Limit enabled extensions, review permission mode, and run Goose from the narrowest required workspace.
Agent limits
The encrypted chat endpoint permits one active stream for each API key. Concurrent Goose sessions, recipes, or subagents using the same key can receive429 responses.
Start with one session. Serialize model turns or use a separate Prem API key per concurrent worker. Do not switch to another provider if every model call must use Prem.
Troubleshooting
Goose returns 404 from the provider
Goose returns 404 from the provider
Set
OPENAI_HOST to http://127.0.0.1:8787 and OPENAI_BASE_PATH to v1/chat/completions. Do not put /v1 in both values.Goose reports that no API key was passed
Goose reports that no API key was passed
Export
OPENAI_API_KEY="$PREM_API_KEY" in the same process that starts Goose. Goose does not read provider API keys from config.yaml.The API returns model not found
The API returns model not found
Call
/v1/models, then set GOOSE_MODEL to a returned ID.The tool prompt is skipped or denied
The tool prompt is skipped or denied
Check
GOOSE_MODE, the enabled extension, and its permissions. Use approve during setup instead of bypassing tool confirmation.The API returns 429
The API returns 429
Wait for the active stream to finish. Reduce concurrent sessions, recipes, and subagents or use separate API keys.
Frequently asked questions
Does Goose need a custom provider plugin?
No. Its built-in OpenAI provider supports a custom host and Chat Completions path.Is Goose itself inside the Prem enclave?
No. Goose runs locally. Only supported model traffic uses the encrypted Prem path.Are extension calls confidential?
Not automatically. The model call is protected through Prem, but each local or remote extension has its own trust boundary.Can I persist these settings?
You can persist non-secret provider values in your shell or Goose configuration. KeepOPENAI_API_KEY in a secret manager or injected environment variable.
Router
Beta Goose uses Router through its built-in OpenAI provider and a separate API key. Confirm thatkimi-k3 appears in GET /v1/models for this key. Otherwise, use
an exact returned model ID. See Router models.
Related
Confidential Proxy
Review proxy modes, routes, keys, and daemon controls.
OpenAI-compatible clients
Understand the protocol used by Goose.
Agents & Automation
Review concurrency, retries, and unattended operation.
Security Model
Review the protected and unprotected parts of the flow.

