opencode-qwen-cli-auth 2.0.1 → 2.1.0

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -173,7 +173,7 @@ export const QwenAuthPlugin = async (_input) => {
173
173
  "coder-model": {
174
174
  id: "coder-model",
175
175
  name: "Qwen Coder (Qwen 3.5 Plus)",
176
- reasoning: false,
176
+ reasoning: true,
177
177
  limit: { context: 1048576, output: 65536 },
178
178
  cost: { input: 0, output: 0 },
179
179
  modalities: { input: ["text"], output: ["text"] },
@@ -190,6 +190,20 @@ export const QwenAuthPlugin = async (_input) => {
190
190
  };
191
191
  config.provider = providers;
192
192
  },
193
+ /**
194
+ * Gui header DashScope giong CLI goc
195
+ * X-DashScope-CacheControl: enable prompt caching, giam token tieu thu
196
+ * X-DashScope-AuthType: xac dinh auth method cho server
197
+ */
198
+ "chat.headers": async (_input, output) => {
199
+ try {
200
+ if (output?.headers) {
201
+ output.headers["X-DashScope-CacheControl"] = "enable";
202
+ output.headers["X-DashScope-AuthType"] = "qwen-oauth";
203
+ }
204
+ }
205
+ catch (_) { /* khong de loi hook lam treo request */ }
206
+ },
193
207
  };
194
208
  };
195
209
  export default QwenAuthPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-qwen-cli-auth",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Qwen OAuth authentication plugin for opencode - use your Qwen account instead of API keys",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",