Skip to content

Instantly share code, notes, and snippets.

@lucidfrontier45
Last active February 12, 2026 14:22
Show Gist options
  • Select an option

  • Save lucidfrontier45/9c69ea8116db739aa3a1c330c3762bec to your computer and use it in GitHub Desktop.

Select an option

Save lucidfrontier45/9c69ea8116db739aa3a1c330c3762bec to your computer and use it in GitHub Desktop.
OpenCode Z.AI Coding Plan with Anthropic API
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"z.ai-conding-plan-anthropic": {
// Z.ai provides Anthropic-compatible API endpoints using the Anthropic SDK
"npm": "@ai-sdk/anthropic",
"options": {
// Base URL must use /v1 endpoint for compatibility
"baseURL": "https://api.z.ai/api/anthropic/v1"
},
"models": {
"glm-4.7": {
"name": "glm-4.7"
},
"glm-4.7-flash": {
"name": "glm-4.7-flash"
}
}
}
},
"mcp": {
// liteweight tree-sitter semantic search
"tree-sitter": {
"type": "local",
"enabled": true,
"command": [
"uvx",
"--from",
"tree-sitter-analyzer[mcp]",
"tree-sitter-analyzer-mcp"
]
}
},
"lsp": {
"rust": {
// disable heavy rust-analyzer
// use cargo check for error check
"disabled": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment