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>
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
{
|
||||
"$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": {
|
||||
"gitea": {
|
||||
"covert-gpt": {
|
||||
"type": "remote",
|
||||
"url": "https://llm.covert-gpt.com/mcp/gitea",
|
||||
"url": "https://llm.covert-gpt.com/mcp/",
|
||||
"enabled": true,
|
||||
"headers": {
|
||||
"Authorization": "Bearer {env:LITELLM_KEY}"
|
||||
|
||||
Reference in New Issue
Block a user