Use Maple with OpenCode
Connect the OpenCode coding agent to Maple Proxy as a custom OpenAI-compatible provider, using the desktop app's Local Proxy and a dedicated Maple API key.
OpenCode is an open-source coding agent. It connects to Maple Proxy as a custom provider.
The Maple desktop app has this guide built in, filled in with your proxy URL and a model of your choice. Find it in Settings → API & credits → Local Proxy, under Connect your tools.
Before you start
- Start the proxy. These steps assume the desktop app’s Local Proxy on
http://127.0.0.1:8080/v1. - Choose a model that supports tool use. Coding agents rely on tool calls. The Local Proxy screen lists the models that do.
Steps
- In Maple, create a dedicated API key for OpenCode and copy it. The full key is shown only once. See create an API key.
- In OpenCode, open Settings → Providers → Custom Provider → Connect.
- Enter these values, then connect and select the model:
| Field | Value |
|---|---|
| Provider ID | maple-local |
| Display name | Maple (local proxy) |
| Base URL | http://127.0.0.1:8080/v1 |
| API key | The Maple key you just created |
| Model ID | A Maple model ID, for example one from models |
| Model name | Any label you like |
| Headers | Leave blank |
Use a real key
Use a real Maple key, never a placeholder. A key sent by OpenCode overrides the key saved by Maple Desktop. When you replace a key, disconnect and reconnect the provider: OpenCode stores credentials separately from project configuration.
If it doesn’t work
A 401 usually means a missing, invalid or stale key. A 400 usually means an old model ID. A 5xx can be a temporary model-provider outage even when your setup is correct. More in troubleshooting.