Cline
使用 OpenAI 兼容提供商将 Cline 连接到 Model Gate。
Cline穿过模型门
- 打开Cline 设置。
- 选择一个 兼容 OpenAI 提供者。
- 设置基本 URL:
https://api.model-gate.com/v1
- 设置API密钥:
mg_live_...
- 输入规范模型 ID 或启用的别名
/v1/models。 - 保存并发送测试提示。
测试要求
curl https://api.model-gate.com/v1/chat/completions \
-H "Authorization: Bearer mg_live_..." \
-H "Content-Type: application/json" \
-d '{"model":"ch-46s","messages":[{"role":"user","content":"Reply with OK"}]}'
如果 Cline 公开单独的模型上下文/输入/输出限制,请使用 context_window, max_input_tokens, 和 max_output_tokens 从相应的经过验证的 /v1/models 对象(或 语境, 最大输入, 和 最大输出 经过验证的值显示 /models 页)。值为 0 表示 Model Gate 中未配置限制;保留手动客户端设置未设置而不是猜测。