opencode-qwen 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fix_summary.md ADDED
@@ -0,0 +1,28 @@
1
+ ## Qwen Plugin Import Fix Summary
2
+
3
+ **Problem Identified:**
4
+ The plugin was failing to load because it was trying to import `createOpenAI` from the non-existent package `@ai-sdk/openai-compatible`, but this function actually exists in `@ai-sdk/openai`.
5
+
6
+ **Root Cause:**
7
+ - Package `@ai-sdk/openai-compatible` doesn't exist in the OpenCode environment
8
+ - Function `createOpenAI` is available in `@ai-sdk/openai` package
9
+ - Multiple files had incorrect import statements
10
+
11
+ **Fixes Applied:**
12
+ 1. Fixed import in `/root/workspace/opencode-qwen/index.ts`:
13
+ - Changed: `import { createOpenAI } from '@ai-sdk/openai-compatible'`
14
+ - To: `import { createOpenAI } from '@ai-sdk/openai'`
15
+
16
+ 2. Fixed dependency in `/root/workspace/opencode-qwen/package.json`:
17
+ - Changed: `"@ai-sdk/openai-compatible": "^1.0.0"`
18
+ - To: `"@ai-sdk/openai": "^1.0.0"` (will need version update)
19
+
20
+ **Next Steps:**
21
+ - Update package.json dependency version to match available @ai-sdk/openai version
22
+ - Restart OpenCode to test the fix
23
+ - Monitor logs to ensure plugin loads successfully
24
+
25
+ **Technical Details:**
26
+ - Available @ai-sdk/openai version: 3.0.23
27
+ - The createOpenAI function is confirmed to exist in @ai-sdk/openai/dist/index.mjs
28
+ - Plugin should now be able to load without import errors
package/index.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * Models are fetched dynamically from the API.
7
7
  */
8
8
 
9
- import { createOpenAI } from '@ai-sdk/openai-compatible'
9
+ import { createOpenAI } from '@ai-sdk/openai'
10
10
  import type { Provider, Model } from '@ai-sdk/provider'
11
11
  import { z } from 'zod'
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-qwen",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Qwen provider for OpenCode with npm package support",
5
5
  "main": "index.ts",
6
6
  "exports": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@opencode-ai/plugin": "^1.0.0",
11
11
  "zod": "^3.22.0",
12
- "@ai-sdk/openai-compatible": "^1.0.0"
12
+ "@ai-sdk/openai": "^1.0.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "typescript": "^5.0.0",
@@ -24,4 +24,4 @@
24
24
  ],
25
25
  "author": "OpenCode Community",
26
26
  "license": "MIT"
27
- }
27
+ }
package/opencode.json DELETED
@@ -1,41 +0,0 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "provider": {
4
- "qwen": {
5
- "npm": "opencode-qwen",
6
- "name": "Qwen AI",
7
- "description": "High-quality large language models with dynamic model loading - optimized for coding, reasoning, web development, and creative tasks",
8
- "website": "https://qwen.aikit.club",
9
- "documentation": "https://github.com/tanu1337/qwen-api",
10
- "options": {
11
- "baseURL": "https://qwen.aikit.club/v1",
12
- "dynamicModels": true,
13
- "modelCacheDuration": 300000
14
- },
15
- "authentication": {
16
- "type": "bearer",
17
- "help": "Get your access token from https://chat.qwen.ai by running the token extractor script in browser console"
18
- }
19
- }
20
- },
21
- "env": {
22
- "QWEN_API_KEY": {
23
- "description": "Qwen API access key",
24
- "required": true
25
- },
26
- "QWEN_BASE_URL": {
27
- "description": "Qwen API base URL",
28
- "default": "https://qwen.aikit.club/v1"
29
- },
30
- "QWEN_AUTO_REFRESH": {
31
- "description": "Enable automatic token refresh",
32
- "default": "true",
33
- "type": "boolean"
34
- },
35
- "QWEN_TIMEOUT": {
36
- "description": "Request timeout in milliseconds",
37
- "default": "30000",
38
- "type": "number"
39
- }
40
- }
41
- }