Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@hung319/opencode-qwen-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@hung319/opencode-qwen-plugin

OpenCode plugin for Qwen API - adds provider and 28+ models with custom tools

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

OpenCode Qwen Plugin

Plugin cho OpenCode để thêm Qwen AI provider với đầy đủ models.

Tính năng

  • Tự động thêm Qwen provider vào OpenCode config
  • 28+ Qwen models được tích hợp sẵn
  • Custom tools để làm việc với Qwen API:
    • qwen-validate-token - Validate Qwen token
    • qwen-list-models - Liệt kê models
    • qwen-setup - Hướng dẫn cài đặt
    • qwen-test - Test kết nối API

Cài đặt

Cách 1: Local Plugin (Khuyến nghị)

  • Tạo thư mục plugins:
mkdir -p ~/.config/opencode/plugins
  • Copy plugin vào thư mục:
cp -r opencode-qwen-plugin/* ~/.config/opencode/plugins/qwen/
  • Tạo package.json trong config directory:
mkdir -p ~/.config/opencode
cp opencode-qwen-plugin/package.json ~/.config/opencode/
  • Khởi động lại OpenCode

Cách 2: NPM Package

Thêm vào opencode.json:

{
  "plugin": ["opencode-qwen-plugin"]
}

Cách lấy Qwen API Token

Bước 1: Đăng nhập Qwen

Truy cập https://chat.qwen.ai và đăng nhập

Bước 2: Lấy Token

Mở Developer Console (F12) và chạy:

localStorage.getItem('token')

Hoặc sử dụng bookmarklet:

javascript:(function(){if(window.location.hostname!=="chat.qwen.ai"){alert("🚀 This code is for chat.qwen.ai");window.open("https://chat.qwen.ai","_blank");return;}function getApiKeyData(){const token=localStorage.getItem(!token){alert("token");if("❌ qwen access_token not found !!!");return null;}return token;}async function copyToClipboard(text){try{await navigator.clipboard.writeText(text);return true;}catch(err){console.error("❌ Failed to copy to clipboard:",err);const textarea=document.createElement("textarea");textarea.value=text;textarea.style.position="fixed";textarea.style.opacity="0";document.body.appendChild(textarea);textarea.focus();textarea.select();const success=document.execCommand("copy");document.body.removeChild(textarea);return success;}}const apiKeyData=getApiKeyData();if(!apiKeyData)return;copyToClipboard(apiKeyData).then((success)=>{if(success){alert("🔑 Qwen access_token copied to clipboard !!! 🎉");}else{prompt("🔰 Qwen access_token:",apiKeyData);}});})();

Bước 3: Thêm vào OpenCode

/connect

Tìm "Qwen" và nhập token của bạn.

Sử dụng

Chọn model:

/models

Chọn model Qwen bạn muốn sử dụng.

Sử dụng custom tools:

# Validate token
qwen-validate-token --token YOUR_TOKEN

# List models
qwen-list-models --apiKey YOUR_API_KEY

# Test connection
qwen-test --apiKey YOUR_API_KEY --message "Hello!"

# Xem hướng dẫn setup
qwen-setup

Models có sẵn

ModelDescription
qwen-maxLatest Qwen Max
qwen2.5-maxBest overall with vision + web search
qwen2.5-turboFast responses
qwen2.5-plusBalanced performance
qwen2.5-coder-32bCode generation
qwen3-next-80b-a3bNext gen 80B
qwen3-coderCode + tool calling
qwen3-maxBest Qwen3
qwq-32bReasoning with thinking
qwen-deep-researchResearch + web search
`qWeb development
wen-web-dev`qwen-full-stack

Tính năng Qwen API

  • 👁️ Vision - Phân tích hình ảnh
  • 🌐 Web Search - Tìm kiếm web
  • 🧠 Thinking Mode - Chế độ suy nghĩ
  • 🎨 Image Generation - Tạo hình ảnh
  • 👨‍💻 Code Generation - Viết code

Cấu hình thủ công

Nếu plugin không tự động thêm provider, thêm vào ~/.config/opencode/opencode.json:

{
  "provider": {
    "qwen": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Qwen AI",
      "options": {
        "baseURL": "https://qwen.aikit.club/v1",
        "headers": {
          "Authorization": "Bearer ${QWEN_API_KEY}"
        }
      },
      "models": {
        "qwen2.5-max": { "name": "Qwen2.5 Max" },
        "qwen2.5-turbo": { "name": "Qwen2.5 Turbo" }
      }
    }
  }
}

License

MIT

Keywords

opencode

FAQs

Package last updated on 28 Feb 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