从 OpenRouter 迁移

只改 Base URL 和 Key,就能把 OpenRouter 代码迁到 BigModel.io。带 provider 前缀的模型 ID 和 models 备选数组继续可用。

大多数 OpenRouter 代码只需改两处就能在 BigModel.io 上运行:Base URL 和 API Key。

OpenRouter 功能BigModel.io
provider/model 形式的 ID支持,provider 前缀会被去掉
models 备选数组支持,只对成功的那一次尝试扣费
HTTP-Referer / X-Title支持
provider, transforms, route忽略
:free 后缀不会去掉,请使用目录中的普通 ID

改两行

base_url = "https://bigmodel.io/v1"
api_key  = "sk-..."   # 你的 BigModel.io Key

完整迁移指南模型 ID 对照、请求头、流式输出,以及切换前需要核对的差异。

阅读指南