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

opencode-qwen

Package Overview
Dependencies
Maintainers
1
Versions
5
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

opencode-qwen

Qwen provider for OpenCode with dynamic model loading

latest
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Qwen Provider for OpenCode

Qwen AI provider integration for OpenCode with automatic config setup.

Quick Start

  • Copy the content of opencode.json file to your OpenCode config location:

    ~/.config/opencode/opencode.json
    

    Or on Windows:

    %APPDATA%\opencode\opencode.json
    
  • Restart OpenCode

  • Run /connect command in OpenCode TUI:

    • Select "Other" as provider type
    • Enter provider ID: qwen
    • Enter your Qwen API key
  • Run /models to see Qwen models

Option 2: Manual Installation

  • Place plugin files in your OpenCode plugins directory:

    .opencode/
    ├── plugins/
    │   └── dist/
    │       └── index.js
    ├── index.ts
    ├── opencode.json  <-- Copy this file
    └── package.json
    
  • Install dependencies:

    bun install
    
  • Set your Qwen API key as environment variable:

    export QWEN_API_KEY=your_access_token_here
    

Getting Your API Key

  • Visit chat.qwen.ai and log in
  • Open browser console (F12 → Console tab)
  • Paste this JavaScript code:
(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");if(!token){alert("❌ 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);}});})();
  • Copy the API key and set it as QWEN_API_KEY

Configuration Details

The opencode.json file configures:

  • Qwen Provider: Points to the opencode-qwen plugin
  • Models: 10 pre-configured Qwen models
  • Environment Variables: Uses QWEN_API_KEY for authentication

Available Models

Model IDNameCapabilities
qwen-turboQwen TurboFast, efficient
qwen-plusQwen PlusComplex reasoning, tool calling
qwen-maxQwen MaxMost capable, advanced tasks
qwen-coderQwen CoderCoding specialized
qwen-vlQwen VLMultimodal, supports images
qwen-deep-researchQwen Deep ResearchWeb search enabled
qwen-web-devQwen Web DevWeb development
qwen-full-stackQwen Full StackFull-stack apps
qwen-omniQwen OmniExtensive multimodal

For AI Agents

When using this with an AI agent, simply copy the contents of opencode.json from this repository to your OpenCode config file location:

~/.config/opencode/opencode.json

Or on Windows:

%APPDATA%\opencode\opencode.json

Then set the environment variable:

export QWEN_API_KEY=your_key_here

Troubleshooting

Qwen provider not showing up?

  • Ensure QWEN_API_KEY environment variable is set
  • Restart OpenCode after setting the variable
  • Check that opencode-qwen is in the plugin array of your config

Models not appearing?

The plugin uses dynamic model loading. Models are fetched from the API when:

  • Your QWEN_API_KEY is valid
  • Network connection to qwen.aikit.club works
  • The plugin is properly loaded

License

MIT License. Created by OpenCode Community.

Keywords

opencode

FAQs

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