Aider 接入
Aider 是命令行结对编程工具,直接在 Git 仓库里改代码。
关于 Base URL
浙中TOKEN运营中心-模型广场 的 API 接入地址为 https://ai.jhdataops.com。在工具 / 代码里按各协议入口填写即可(控制台为 https://ai.jhdataops.com)。
- OpenAI 兼容:
https://ai.jhdataops.com/v1(多数工具填到/v1这一级;少数工具只需填https://ai.jhdataops.com,由它自动补/v1,详见各工具页的「易错点」) - Claude 兼容:
https://ai.jhdataops.com(Anthropic SDK / Claude Code 用,路径为/v1/messages) - Gemini 兼容:
https://ai.jhdataops.com(原生 Gemini 路径为/v1beta/...)
方式一:环境变量
bash
export OPENAI_API_BASE="https://ai.jhdataops.com/v1"
export OPENAI_API_KEY="sk-xxxxxxxx"
aider --model openai/gpt-5.5方式二:命令行参数
bash
aider \
--openai-api-base https://ai.jhdataops.com/v1 \
--openai-api-key sk-xxxxxxxx \
--model openai/claude-sonnet-4-6TIP
模型名加 openai/ 前缀,告诉 Aider 底层(LiteLLM)走 OpenAI 兼容协议,即可把任意 浙中TOKEN运营中心-模型广场 模型当作「OpenAI 模型」调用。
配置文件(.aider.conf.yml)
yaml
openai-api-base: https://ai.jhdataops.com/v1
openai-api-key: sk-xxxxxxxx
model: openai/gpt-5.5易错点
找不到模型 / Provider 错误
给模型名加 openai/ 前缀(如 openai/claude-sonnet-4-6),让 LiteLLM 按 OpenAI 兼容方式解析。
API base 带 /v1
OPENAI_API_BASE 必须是 https://ai.jhdataops.com/v1。
