Files
dotfiles/mcp-config/opencode.gateway.json
T
noconnorandClaude Opus 4.8 16e01cb3d0 mcp-config: add covert-gpt provider, auto-discover models
Two changes to the synced opencode config:

- Model provider. opencode can't list models from a custom OpenAI-compatible
  provider itself, so sync.sh queries the gateway's /v1/models with the
  user's key and materializes the map client-side. New gateway models land
  on every box at the next sync with no config edit. If discovery fails the
  previous map is carried over, so a gateway hiccup never empties the list.
- Aggregate MCP endpoint. One entry at /mcp/ (trailing slash required — the
  bare path 307-redirects and MCP clients don't follow it) exposes every
  server the key can access, replacing the per-server gitea entry.

sync.sh also exports OPENCODE_CONFIG: opencode does not auto-load extra
files from its config dir, so without it the synced file was ignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 04:40:25 -04:00

25 lines
531 B
JSON

{
"$schema": "https://opencode.ai/config.json",
"provider": {
"covert-gpt": {
"npm": "@ai-sdk/openai-compatible",
"name": "covert-gpt (LiteLLM)",
"options": {
"baseURL": "https://llm.covert-gpt.com/v1",
"apiKey": "{env:LITELLM_KEY}"
},
"models": {}
}
},
"mcp": {
"covert-gpt": {
"type": "remote",
"url": "https://llm.covert-gpt.com/mcp/",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:LITELLM_KEY}"
}
}
}
}