Compare commits

..

6 Commits

Author SHA1 Message Date
奕桁
140fbc04a3 fix lint 2025-07-31 21:05:43 +08:00
奕桁
eb46df7254 support openrouter 2025-07-31 20:55:37 +08:00
奕桁
cff88350f4 update version 2025-07-31 20:37:17 +08:00
Yiheng Xu
1bfe5a796a Fix Sandbox docker mode (#160)
* Fix E2E

* Fix sandbox docker
2025-07-31 18:28:07 +08:00
koalazf.99
9f8ec8c0be fix type: sessionTokenLimit for token usage control 2025-07-31 15:23:31 +08:00
Yiheng Xu
bb6db7e492 Fix E2E (#156) 2025-07-31 15:16:23 +08:00
9 changed files with 34 additions and 16 deletions

View File

@@ -50,7 +50,7 @@ For example, if you want to set the max session token limit to 32000, you can se
```json
{
"maxSessionToken": 32000
"sessionTokenLimit": 32000
}
```
@@ -88,6 +88,14 @@ export OPENAI_BASE_URL="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
export OPENAI_MODEL="qwen3-coder-plus"
```
OpenRouter also provides free Qwen3-Coder model access:
```bash
export OPENAI_API_KEY="your_api_key_here"
export OPENAI_BASE_URL=https://openrouter.ai/api/v1
export OPENAI_MODEL="qwen/qwen3-coder:free"
```
## Usage Examples
### Explore Codebases

10
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"workspaces": [
"packages/*"
],
@@ -11945,7 +11945,7 @@
},
"packages/cli": {
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"dependencies": {
"@qwen-code/qwen-code-core": "file:../core",
"@types/update-notifier": "^6.0.8",
@@ -12123,7 +12123,7 @@
},
"packages/core": {
"name": "@qwen-code/qwen-code-core",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"dependencies": {
"@google/genai": "1.8.0",
"@modelcontextprotocol/sdk": "^1.11.0",
@@ -12197,7 +12197,7 @@
},
"packages/vscode-ide-companion": {
"name": "@qwen-code/qwen-code-vscode-ide-companion",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.15.1",
"cors": "^2.8.5",

View File

@@ -1,6 +1,6 @@
{
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"engines": {
"node": ">=20"
},
@@ -13,7 +13,7 @@
"url": "git+http://gitlab.alibaba-inc.com/Qwen-Coder/qwen-code.git"
},
"config": {
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.1-alpha.8"
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.1-alpha.12"
},
"scripts": {
"start": "node scripts/start.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@qwen-code/qwen-code",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"description": "Gemini CLI",
"repository": {
"type": "git",
@@ -25,7 +25,7 @@
"dist"
],
"config": {
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.1-alpha.8"
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.1-alpha.12"
},
"dependencies": {
"@qwen-code/qwen-code-core": "file:../core",

View File

@@ -1,12 +1,12 @@
{
"name": "@google/gemini-cli-core",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@google/gemini-cli-core",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"dependencies": {
"@google/genai": "^1.4.0",
"@modelcontextprotocol/sdk": "^1.11.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@qwen-code/qwen-code-core",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"description": "Qwen Code Core",
"repository": {
"type": "git",

View File

@@ -118,11 +118,21 @@ export class OpenAIContentGenerator implements ContentGenerator {
timeoutConfig.maxRetries = contentGeneratorConfig.maxRetries;
}
// Check if using OpenRouter and add required headers
const isOpenRouter = baseURL.includes('openrouter.ai');
const defaultHeaders = isOpenRouter
? {
'HTTP-Referer': 'https://github.com/QwenLM/qwen-code.git',
'X-Title': 'Qwen Code',
}
: undefined;
this.client = new OpenAI({
apiKey,
baseURL,
timeout: timeoutConfig.timeout,
maxRetries: timeoutConfig.maxRetries,
defaultHeaders,
});
}

View File

@@ -1,12 +1,12 @@
{
"name": "qwen-code-vscode",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "qwen-code-vscode",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.15.1",
"cors": "^2.8.5",

View File

@@ -2,7 +2,7 @@
"name": "@qwen-code/qwen-code-vscode-ide-companion",
"displayName": "Qwen Code VSCode IDE Companion",
"description": "",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"engines": {
"vscode": "^1.101.0"
},