~/.config/opencode/opencode.json。C:\\Users\\<用户名>\\.config\\opencode\\opencode.json。{"$schema": "https://opencode.ai/config.json","provider": {"myprovider": {"npm": "@ai-sdk/openai-compatible","name": "Tencent Cloud","options": {"baseURL": "https://tokenhub.tencentcloudmaas.com/plan/v3","apiKey": "<USER_API_KEY>"},"models": {"auto": {"name": "Auto","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"glm-5.2": {"name": "GLM-5.2","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"minimax-m3": {"name": "MiniMax-M3","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"kimi-k2.7-code": {"name": "Kimi K2.7 Code","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"kimi-k2.7-code-highspeed": {"name": "Kimi K2.7 Code HighSpeed","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-flash": {"name": "DeepSeek-V4-Flash","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-pro": {"name": "DeepSeek-V4-Pro","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-flash-202605": {"name": "DeepSeek-V4-Flash 原厂直供","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-pro-202606": {"name": "DeepSeek-V4-Pro 原厂直供","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}}}}}}
{"$schema": "https://opencode.ai/config.json","provider": {"myprovider": {"npm": "@ai-sdk/openai-compatible","name": "Tencent Cloud","options": {"baseURL": "https://tokenhub-intl.tencentcloudmaas.com/plan/v3","apiKey": "<USER_API_KEY>"},"models": {"auto": {"name": "Auto","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"glm-5.2": {"name": "GLM-5.2","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"minimax-m3": {"name": "MiniMax-M3","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"kimi-k2.7-code": {"name": "Kimi K2.7 Code","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"kimi-k2.7-code-highspeed": {"name": "Kimi K2.7 Code HighSpeed","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-flash": {"name": "DeepSeek-V4-Flash","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-pro": {"name": "DeepSeek-V4-Pro","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-flash-202605": {"name": "DeepSeek-V4-Flash 原厂直供","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}},"deepseek-v4-pro-202606": {"name": "DeepSeek-V4-Pro 原厂直供","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}}}}}}
{"$schema": "https://opencode.ai/config.json","provider": {"myprovider": {"npm": "@ai-sdk/openai-compatible","name": "Tencent Cloud","options": {"baseURL": "https://tokenhub.tencentcloudmaas.com/plan/v3","apiKey": "<USER_API_KEY>"},"models": {"auto": {"name": "Auto","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}}}}}}
{"$schema": "https://opencode.ai/config.json","provider": {"myprovider": {"npm": "@ai-sdk/openai-compatible","name": "Tencent Cloud","options": {"baseURL": "https://tokenhub-intl.tencentcloudmaas.com/plan/v3","apiKey": "<USER_API_KEY>"},"models": {"auto": {"name": "Auto","modalities": {"input": ["text"],"output": ["text"]},"options": {"thinking": {"type": "enabled"}}}}}}}
opencode
/models,选择配置的模型并在 OpenCode 中使用。文档反馈