New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

opencode-codebuddy-external-auth

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-codebuddy-external-auth

OpenCode plugin for CodeBuddy External (IOA) authentication

latest
npmnpm
Version
1.0.28
Version published
Weekly downloads
28
1300%
Maintainers
1
Weekly downloads
 
Created
Source

OpenCode CodeBuddy External Auth Plugin

OpenCode 插件,用于 CodeBuddy External (IOA) 认证。

安装

npm install opencode-codebuddy-external-auth

配置

编辑 ~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-codebuddy-external-auth"],
  "provider": {
    "codebuddy-external": {
      "npm": "@ai-sdk/anthropic",
      "name": "CodeBuddy External (IOA)",
      "models": {
        "claude-4.5": { "name": "Claude Sonnet 4.5 (x2.20)", "contextLength": 176000 },
        "claude-opus-4.5": { "name": "Claude Opus 4.5 (x3.33)", "contextLength": 176000 },
        "claude-haiku-4.5": { "name": "Claude Haiku 4.5 (x0.67)", "contextLength": 176000 },
        "gemini-3.0-pro": { "name": "Gemini 3.0 Pro (x1.33)", "contextLength": 400000 },
        "gemini-3.0-flash": { "name": "Gemini 3.0 Flash (x0.33)", "contextLength": 400000 },
        "gemini-2.5-pro": { "name": "Gemini 2.5 Pro (x0.95)", "contextLength": 400000 },
        "gpt-5.2": { "name": "GPT-5.2 (x1.33)", "contextLength": 272000 },
        "gpt-5.2-codex": { "name": "GPT-5.2-Codex (x1.33)", "contextLength": 272000 },
        "gpt-5.1": { "name": "GPT-5.1 (x0.95)", "contextLength": 272000 },
        "gpt-5.1-codex": { "name": "GPT-5.1-Codex (x0.95)", "contextLength": 272000 },
        "gpt-5.1-codex-max": { "name": "GPT-5.1-Codex-Max (x0.95)", "contextLength": 272000 },
        "gpt-5.1-codex-mini": { "name": "GPT-5.1-Codex-Mini (x0.19)", "contextLength": 272000 },
        "kimi-k2-thinking": { "name": "Kimi-K2-Thinking (x0.46)", "contextLength": 256000 },
        "glm-4.7-ioa": { "name": "GLM-4.7 [免费]", "contextLength": 200000 },
        "glm-4.6-ioa": { "name": "GLM-4.6 [免费]", "contextLength": 168000 },
        "glm-4.6v-ioa": { "name": "GLM-4.6V [免费]", "contextLength": 128000 },
        "deepseek-v3-2-volc-ioa": { "name": "DeepSeek-V3.2 [免费]", "contextLength": 96000 }
      }
    }
  },
  "model": "codebuddy-external/claude-4.5"
}

使用

  • 启动 OpenCode: opencode
  • 选择 CodeBuddy External 模型
  • 选择 "IOA 登录 (浏览器)" 认证方式
  • 在浏览器中完成 IOA 登录
  • 返回终端开始使用

支持的模型

根据 CodeBuddy IOA 版本配置(2026-01-24):

Claude 系列

模型 ID名称CreditsContext
claude-4.5Claude Sonnet 4.5x2.20176K
claude-opus-4.5Claude Opus 4.5x3.33176K
claude-haiku-4.5Claude Haiku 4.5x0.67176K

Gemini 系列

模型 ID名称CreditsContext
gemini-3.0-proGemini 3.0 Prox1.33400K
gemini-3.0-flashGemini 3.0 Flashx0.33400K
gemini-2.5-proGemini 2.5 Prox0.95400K

GPT 系列

模型 ID名称CreditsContext
gpt-5.2GPT-5.2x1.33272K
gpt-5.2-codexGPT-5.2-Codexx1.33272K
gpt-5.1GPT-5.1x0.95272K
gpt-5.1-codexGPT-5.1-Codexx0.95272K
gpt-5.1-codex-maxGPT-5.1-Codex-Maxx0.95272K
gpt-5.1-codex-miniGPT-5.1-Codex-Minix0.19272K

其他模型

模型 ID名称CreditsContext
kimi-k2-thinkingKimi-K2-Thinkingx0.46256K

免费模型 (x0.00)

模型 ID名称Context
glm-4.7-ioaGLM-4.7200K
glm-4.6-ioaGLM-4.6168K
glm-4.6v-ioaGLM-4.6V (多模态)128K
deepseek-v3-2-volc-ioaDeepSeek-V3.296K

认证流程

  • 插件请求 /plugin/auth/state 获取认证状态和 URL
  • 用户在浏览器中打开 URL 完成 IOA 登录
  • 插件轮询 /plugin/auth/token 获取访问令牌
  • Token 到期前自动通过 /plugin/auth/token/refresh 刷新

License

MIT

Keywords

opencode

FAQs

Package last updated on 25 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts