跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt

Use this file to discover all available pages before exploring further.

在 OpenCode 中接入 LLMEasy,建议先用 /connect 添加凭证,再在配置文件中声明 LLMEasy 这个 OpenAI-compatible provider,并填入 Codex 分组模型 ID。

前置条件

  • 已获取 LLMEasy API Key(注册并获取 (https://www.llmeasy.ru/register))

安装 OpenCode

curl -fsSL https://opencode.ai/install | bash

配置步骤

你可以直接运行 LLMEasy 提供的自动配置脚本。它只负责写入 LLMEasy provider 配置,不替代页面上方的安装前置条件。脚本需要 Node.js。如果你没有显式传入 API Key 或模型,脚本会按工具能力提示你交互输入。按你的操作系统执行对应步骤。你只需要执行其中一项。
1

如果你使用 macOS / Linux

curl -fsSL https://www.llmeasy.ru/install-opencode-provider.sh | bash
2

如果你使用 Windows

iwr https://www.llmeasy.ru/install-opencode-provider.ps1 -OutFile "$env:TEMP\install-opencode-provider.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-opencode-provider.ps1"

注意事项

  • 默认模型请填写 Codex 分组模型 ID,不要再写 Claude 系列固定模型名
  • LLMEasy 这类 OpenAI-compatible provider 当前应优先使用 @ai-sdk/openai-compatible
  • 如果你使用 /connect,一般不需要再把 API Key 明文写进配置文件
  • OpenCode 官方文档将 options.headers 视为可选扩展配置;接入 LLMEasy 时通常不需要额外 headers