Qwen Code免费额度到期后变更策略


Qwen Code 是一个面向终端场景的开源 AI 智能体(AI agent),专为通义千问(Qwen)系列模型优化,核心目标是帮助开发者理解大型代码库、自动化繁琐工作,提升开发效率。

2026-04-13:Qwen OAuth 免费额度调整为每日 100 次请求(原 1000 次),且免费层将于 2026-04-15 停用;

切换自定义OpenRouter API

/auth

│ Custom Configuration                                                                             │
│                                                                                                  │
│ 您可以在 settings.json 中配置 API Key 和模型                                                     │
│                                                                                                  │
│ 请参考文档了解配置说明                                                                           │
https://qwenlm.github.io/qwen-code-docs/en/users/configuration/model-providers/

配置文件settings.json参考

{
   “env”: {
     “OPENROUTER_API_KEY”: “xx-your-key”
   },
   “modelProviders”: {
     “openai”: [
       {
         “id”: “qwen/qwen3-next-80b-a3b-instruct:free”,
         “name”: “qwen/qwen3-next-80b-a3b-instruct:free”,
         “envKey”: “OPENROUTER_API_KEY”,
         “baseUrl”: “https://openrouter.ai/api/v1″,
         “generationConfig”: {
           “timeout”: 120000,
           “maxRetries”: 3,
           “samplingParams”: {
             “temperature”: 0.7
           }
         }
       }
     ]
   },
   “$version”: 3,
   “security”: {
     “auth”: {
       “selectedType”: “openai”
     }
   },
   “model”: {
     “name”: “qwen/qwen3-next-80b-a3b-instruct:free”
   },
     “permissions”: {
     “allow”: [
       “Bash(dotnet *)”,
       “Bash(get-content *)”,
       “Bash(type *)”,
       “Bash(del *)”,
       “Bash(dir *)”,
       “Bash(python *)”,
       “Bash(pip list)”,
       “Bash(select-string *)”,
       “Bash(chcp *)”,
       “Bash(powershell *)”,
       “Bash(select-object *)”,
        “Bash(findstr *)”,
        “Bash(timeout *)”,
       “Bash(taskkill *)”,
        “Bash(mkdir *)”
      ]
    }
}

免费API始终有点儿限制

美团LongCat模型

配置参考

{
    “env”: {
      “OPENROUTER_API_KEY”: “XXXYOUREKEY”
    },
    “modelProviders”: {
      “openai”: [
        {
          “id”: “LongCat-Flash-Chat”,
          “name”: “LongCat-Flash-Chat”,
          “envKey”: “OPENROUTER_API_KEY”,
          “baseUrl”: “
https://api.longcat.chat/openai”,
          “generationConfig”: {
            “timeout”: 120000,
            “maxRetries”: 3,
            “samplingParams”: {
              “temperature”: 0.7
            }
          }
        }
      ]
    },
    “$version”: 3,
    “security”: {
      “auth”: {
        “selectedType”: “openai”
      }
    },
    “model”: {
      “name”: “LongCat-Flash-Chat”
    },
      “permissions”: {
      “allow”: [
        “Bash(dotnet *)”,
        “Bash(get-content *)”,
        “Bash(type *)”,
        “Bash(del *)”,
        “Bash(dir *)”,
        “Bash(python *)”,
        “Bash(pip list)”,
        “Bash(select-string *)”,
        “Bash(chcp *)”,
        “Bash(powershell *)”,
        “Bash(select-object *)”,
         “Bash(findstr *)”,
         “Bash(timeout *)”,
        “Bash(taskkill *)”,
         “Bash(mkdir *)”
       ]
     }
  }

美团LONGCAT官方文档在https://longcat.chat/platform/docs/zh/#openai-api-%E6%A0%BC%E5%BC%8F

配置可以实际工作,今天先到这儿,希望对大家有帮助。

文章摘自:https://www.cnblogs.com/wintersun/p/19871408