@qwen-code/qwen-code 0.18.4 → 0.18.5

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 (100) hide show
  1. package/bundled/qc-helper/docs/configuration/auth.md +7 -6
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +16 -2
  3. package/bundled/qc-helper/docs/configuration/settings.md +26 -26
  4. package/bundled/qc-helper/docs/features/approval-mode.md +2 -0
  5. package/bundled/qc-helper/docs/features/mcp.md +49 -0
  6. package/chunks/{agent-LYTC56HT.js → agent-2TEY55UD.js} +21 -21
  7. package/chunks/{agent-headless-FPUP5WHP.js → agent-headless-SCUAXEEE.js} +21 -21
  8. package/chunks/{anthropicContentGenerator-OLOGBVLP.js → anthropicContentGenerator-5S4OMMNL.js} +9 -7
  9. package/chunks/{askUserQuestion-ANRVSBIJ.js → askUserQuestion-WHVYL2S2.js} +2 -2
  10. package/chunks/{ca-K6MD665I.js → ca-7WC7ELX6.js} +1 -0
  11. package/chunks/{chunk-M5VYHAHT.js → chunk-26ZYKTYZ.js} +2 -2
  12. package/chunks/{chunk-6Z2MVJIJ.js → chunk-2CNO5W47.js} +14 -14
  13. package/chunks/{chunk-7OCZ77KA.js → chunk-2O3NAOJG.js} +1 -1
  14. package/chunks/{chunk-HU3RKEK2.js → chunk-42HGOMED.js} +1 -1
  15. package/chunks/{chunk-WWU2KUSR.js → chunk-AE6RQU6F.js} +1 -1
  16. package/chunks/{chunk-F6FP3URI.js → chunk-ATLUHLZE.js} +1 -1
  17. package/chunks/{chunk-4HMWGHPP.js → chunk-C6MI2ASN.js} +2 -2
  18. package/chunks/{chunk-SZWDOOGV.js → chunk-C7JA3XCX.js} +11 -11
  19. package/chunks/{chunk-VWPDSQZY.js → chunk-CTHZVIMD.js} +2 -2
  20. package/chunks/{chunk-IUEQOXOI.js → chunk-CX3SGIPK.js} +2 -2
  21. package/chunks/{chunk-GBTJHKQ6.js → chunk-F5E6IKYN.js} +7 -7
  22. package/chunks/{chunk-FPZF3BNV.js → chunk-FH4P6RQA.js} +1 -1
  23. package/chunks/{chunk-PTGKSUUJ.js → chunk-G4BUMVEY.js} +11 -1
  24. package/chunks/{chunk-JN6FVOPP.js → chunk-GBN55AWZ.js} +2 -2
  25. package/chunks/{chunk-JJHY7NAD.js → chunk-GOMVJKBL.js} +1 -1
  26. package/chunks/{chunk-JIJBNW4A.js → chunk-ID533GA3.js} +1 -1
  27. package/chunks/{chunk-E5SRTXRG.js → chunk-KGV3F6UF.js} +1 -1
  28. package/chunks/{chunk-LXUQBWQA.js → chunk-KZGQ3G3Q.js} +62 -11
  29. package/chunks/{chunk-4TW2JM5Q.js → chunk-LF6BKGZT.js} +3 -3
  30. package/chunks/{chunk-N5QHMPZU.js → chunk-LTN3VYMZ.js} +1 -1
  31. package/chunks/{chunk-DZCZZPCY.js → chunk-MSJ2MXJ6.js} +3 -3
  32. package/chunks/{chunk-5RVEAAD2.js → chunk-SIJKWK35.js} +6 -6
  33. package/chunks/{chunk-32SSXBMG.js → chunk-VECKCOH6.js} +3202 -2678
  34. package/chunks/{chunk-AQDPHFDZ.js → chunk-VKILGMZQ.js} +1 -1
  35. package/chunks/{chunk-IKOWINH4.js → chunk-WE6TNQJU.js} +6 -2
  36. package/chunks/{chunk-2ES3D3TW.js → chunk-XGU3ETVO.js} +3 -3
  37. package/chunks/{chunk-7GX7XYZU.js → chunk-XU7BKR3B.js} +3 -3
  38. package/chunks/{computer-use-P4WQBATW.js → computer-use-OB3C5QG2.js} +23 -22
  39. package/chunks/{contextCommand-POQ6GYN3.js → contextCommand-3327KUC4.js} +23 -23
  40. package/chunks/{cron-create-OKGQO6GX.js → cron-create-THNDTYXU.js} +4 -4
  41. package/chunks/{cron-delete-DTJP7L6O.js → cron-delete-BS5H6TFJ.js} +4 -4
  42. package/chunks/{cron-list-VKZUASFG.js → cron-list-7OBVHT7K.js} +4 -4
  43. package/chunks/{de-K2F3T3TR.js → de-ACHALDED.js} +1 -0
  44. package/chunks/{dist-OLC6NBSB.js → dist-DZ6AJDX4.js} +1 -1
  45. package/chunks/{dist-QUSDBLAK.js → dist-GKRNVFBH.js} +4 -0
  46. package/chunks/{edit-CS7DSS4Z.js → edit-GNCLIF67.js} +21 -21
  47. package/chunks/{en-KGSAKBJP.js → en-S3OQBISC.js} +1 -0
  48. package/chunks/{enter-worktree-PA4HPHJK.js → enter-worktree-E7BNZOGT.js} +21 -21
  49. package/chunks/{enterPlanMode-SFE5AFKZ.js → enterPlanMode-IA42A5EU.js} +26 -26
  50. package/chunks/{exit-worktree-FR3AZTC6.js → exit-worktree-QJ2K74UT.js} +21 -21
  51. package/chunks/{exitPlanMode-AHOUO44D.js → exitPlanMode-UKKHBUYJ.js} +21 -21
  52. package/chunks/{fr-2CAQEOK6.js → fr-GVKZ27MF.js} +1 -0
  53. package/chunks/{geminiContentGenerator-AXCVDKGI.js → geminiContentGenerator-ICSDM37U.js} +4 -4
  54. package/chunks/{glob-BQPAW3IW.js → glob-IGD7LWYX.js} +21 -21
  55. package/chunks/{grep-2F7BL5TQ.js → grep-IZM3IVND.js} +21 -21
  56. package/chunks/{ja-QWL7V6OJ.js → ja-FKZ2WZ4D.js} +1 -0
  57. package/chunks/{keychain-token-storage-ALKQXYJQ.js → keychain-token-storage-YHXIWXIB.js} +2 -2
  58. package/chunks/{loop-wakeup-RX6YIUSG.js → loop-wakeup-SSBWZ64K.js} +5 -5
  59. package/chunks/{ls-6PLNWHMU.js → ls-YPFUHZRQ.js} +3 -3
  60. package/chunks/{lsp-3HFQU4OF.js → lsp-FD6DNVAF.js} +2 -2
  61. package/chunks/{monitor-YTTMDFW2.js → monitor-ALJNE3R4.js} +21 -21
  62. package/chunks/{notebook-edit-7TNZMTBR.js → notebook-edit-7XRZX55T.js} +21 -21
  63. package/chunks/{openaiContentGenerator-JA6YXXPI.js → openaiContentGenerator-FWKITDFJ.js} +13 -11
  64. package/chunks/{pt-2SPOLMAY.js → pt-SY5NCFGR.js} +1 -0
  65. package/chunks/{qwenContentGenerator-NBOVGW7B.js → qwenContentGenerator-5RPGQZ63.js} +24 -24
  66. package/chunks/{qwenOAuth2-XWC5SU63.js → qwenOAuth2-WZ54YZ4J.js} +4 -4
  67. package/chunks/{read-file-RUBU3KUA.js → read-file-4WN2DT5N.js} +8 -8
  68. package/chunks/{ripGrep-TPFC7KZF.js → ripGrep-4ZKT6KBQ.js} +21 -21
  69. package/chunks/{ru-35IVJTEH.js → ru-FWNXJG4F.js} +1 -0
  70. package/chunks/{scheduler-NTVF45LR.js → scheduler-O2E65VDK.js} +21 -21
  71. package/chunks/{send-message-IIT3SHA7.js → send-message-FWFTX62Q.js} +2 -2
  72. package/chunks/{serve-J6VG37OX.js → serve-3DM6CRGD.js} +6942 -6809
  73. package/chunks/{shell-EQQEHEFI.js → shell-ARVZK6RF.js} +21 -21
  74. package/chunks/{skill-QWRWJCQJ.js → skill-BFUBGA4I.js} +10 -10
  75. package/chunks/{src-LNADIG5P.js → src-5YMCDSII.js} +47 -21
  76. package/chunks/{syntheticOutput-H67FYXU7.js → syntheticOutput-JY5NEDTV.js} +3 -3
  77. package/chunks/{task-create-OVXHSHAI.js → task-create-IGILDV25.js} +6 -6
  78. package/chunks/{task-list-QUUCQJ3U.js → task-list-KBEJVAAG.js} +5 -5
  79. package/chunks/{task-stop-WA5DMTKK.js → task-stop-WFTMQ6AC.js} +2 -2
  80. package/chunks/{task-update-PC5427TI.js → task-update-UIVX7ZEV.js} +6 -6
  81. package/chunks/{team-create-TXWQL777.js → team-create-HRBV5ATK.js} +21 -21
  82. package/chunks/{team-delete-ZTEMYRJ3.js → team-delete-LPOXDPVB.js} +5 -5
  83. package/chunks/{todoWrite-J6L6ELD6.js → todoWrite-R4RIJKOD.js} +4 -4
  84. package/chunks/{tool-search-JAVM7ABF.js → tool-search-67HI54YA.js} +8 -8
  85. package/chunks/{web-fetch-6XLPPTP7.js → web-fetch-JU7SS6KE.js} +4 -4
  86. package/chunks/{workflow-7LN3L6KK.js → workflow-W4SCLWLU.js} +22 -22
  87. package/chunks/{write-file-DAKE7YKB.js → write-file-TLNXC2NR.js} +21 -21
  88. package/chunks/{zh-X4KM6MTW.js → zh-QXLZV2PX.js} +1 -0
  89. package/chunks/{zh-TW-BSG6BUWK.js → zh-TW-3OKU7LDA.js} +1 -0
  90. package/cli.js +956 -636
  91. package/locales/ca.js +2 -1
  92. package/locales/de.js +1 -0
  93. package/locales/en.js +1 -0
  94. package/locales/fr.js +1 -0
  95. package/locales/ja.js +1 -0
  96. package/locales/pt.js +1 -0
  97. package/locales/ru.js +1 -0
  98. package/locales/zh-TW.js +1 -0
  99. package/locales/zh.js +1 -0
  100. package/package.json +2 -2
@@ -5,11 +5,11 @@ import {
5
5
  } from "./chunk-OMX7CUOE.js";
6
6
  import {
7
7
  atomicWriteJSON
8
- } from "./chunk-N5QHMPZU.js";
8
+ } from "./chunk-LTN3VYMZ.js";
9
9
  import {
10
10
  Storage,
11
11
  getProjectHash
12
- } from "./chunk-IKOWINH4.js";
12
+ } from "./chunk-WE6TNQJU.js";
13
13
  import {
14
14
  init_esbuild_shims
15
15
  } from "./chunk-A4BMJM77.js";
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-32SSXBMG.js";
5
+ } from "./chunk-VECKCOH6.js";
6
6
  import {
7
7
  Storage
8
- } from "./chunk-IKOWINH4.js";
8
+ } from "./chunk-WE6TNQJU.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -169,15 +169,15 @@ init_esbuild_shims();
169
169
 
170
170
  // import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
171
171
  var globImport_locales_js = __glob({
172
- "./locales/ca.js": () => import("./ca-K6MD665I.js"),
173
- "./locales/de.js": () => import("./de-K2F3T3TR.js"),
174
- "./locales/en.js": () => import("./en-KGSAKBJP.js"),
175
- "./locales/fr.js": () => import("./fr-2CAQEOK6.js"),
176
- "./locales/ja.js": () => import("./ja-QWL7V6OJ.js"),
177
- "./locales/pt.js": () => import("./pt-2SPOLMAY.js"),
178
- "./locales/ru.js": () => import("./ru-35IVJTEH.js"),
179
- "./locales/zh-TW.js": () => import("./zh-TW-BSG6BUWK.js"),
180
- "./locales/zh.js": () => import("./zh-X4KM6MTW.js")
172
+ "./locales/ca.js": () => import("./ca-7WC7ELX6.js"),
173
+ "./locales/de.js": () => import("./de-ACHALDED.js"),
174
+ "./locales/en.js": () => import("./en-S3OQBISC.js"),
175
+ "./locales/fr.js": () => import("./fr-GVKZ27MF.js"),
176
+ "./locales/ja.js": () => import("./ja-FKZ2WZ4D.js"),
177
+ "./locales/pt.js": () => import("./pt-SY5NCFGR.js"),
178
+ "./locales/ru.js": () => import("./ru-FWNXJG4F.js"),
179
+ "./locales/zh-TW.js": () => import("./zh-TW-3OKU7LDA.js"),
180
+ "./locales/zh.js": () => import("./zh-QXLZV2PX.js")
181
181
  });
182
182
 
183
183
  // packages/cli/src/i18n/index.ts
@@ -2,11 +2,11 @@
2
2
  "use strict";
3
3
  import {
4
4
  atomicWriteFileSync
5
- } from "./chunk-N5QHMPZU.js";
5
+ } from "./chunk-LTN3VYMZ.js";
6
6
  import {
7
7
  Storage,
8
8
  createDebugLogger
9
- } from "./chunk-IKOWINH4.js";
9
+ } from "./chunk-WE6TNQJU.js";
10
10
  import {
11
11
  init_esbuild_shims
12
12
  } from "./chunk-A4BMJM77.js";
@@ -3,10 +3,10 @@
3
3
  import {
4
4
  TextTokenizer,
5
5
  isSupportedImageMimeType
6
- } from "./chunk-HU3RKEK2.js";
6
+ } from "./chunk-42HGOMED.js";
7
7
  import {
8
8
  createDebugLogger
9
- } from "./chunk-IKOWINH4.js";
9
+ } from "./chunk-WE6TNQJU.js";
10
10
  import {
11
11
  init_esbuild_shims
12
12
  } from "./chunk-A4BMJM77.js";
@@ -7,7 +7,7 @@ import {
7
7
  getLanguageSettingsOptions,
8
8
  t,
9
9
  writeStderrLine
10
- } from "./chunk-SZWDOOGV.js";
10
+ } from "./chunk-C7JA3XCX.js";
11
11
  import {
12
12
  DEFAULT_STOP_HOOK_BLOCK_CAP,
13
13
  DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,
@@ -18,21 +18,21 @@ import {
18
18
  SkillError,
19
19
  ideContextStore,
20
20
  require_main
21
- } from "./chunk-32SSXBMG.js";
21
+ } from "./chunk-VECKCOH6.js";
22
22
  import {
23
23
  isWithinRoot,
24
24
  stripRuntimeSnapshotPrefix
25
- } from "./chunk-6Z2MVJIJ.js";
25
+ } from "./chunk-2CNO5W47.js";
26
26
  import {
27
27
  atomicWriteFileSync
28
- } from "./chunk-N5QHMPZU.js";
28
+ } from "./chunk-LTN3VYMZ.js";
29
29
  import {
30
30
  FatalConfigError,
31
31
  QWEN_DIR,
32
32
  Storage,
33
33
  createDebugLogger,
34
34
  getErrorMessage
35
- } from "./chunk-IKOWINH4.js";
35
+ } from "./chunk-WE6TNQJU.js";
36
36
  import {
37
37
  init_esbuild_shims
38
38
  } from "./chunk-A4BMJM77.js";
@@ -20077,7 +20077,7 @@ __name(getPackageJson, "getPackageJson");
20077
20077
  // packages/cli/src/utils/version.ts
20078
20078
  async function getCliVersion() {
20079
20079
  const pkgJson = await getPackageJson();
20080
- return "0.18.4";
20080
+ return "0.18.5";
20081
20081
  }
20082
20082
  __name(getCliVersion, "getCliVersion");
20083
20083
 
@@ -20234,7 +20234,7 @@ import { execFile } from "node:child_process";
20234
20234
 
20235
20235
  // packages/cli/src/generated/git-commit.ts
20236
20236
  init_esbuild_shims();
20237
- var GIT_COMMIT_INFO = "c898e9f6a";
20237
+ var GIT_COMMIT_INFO = "2937b09cf";
20238
20238
 
20239
20239
  // packages/cli/src/utils/systemInfo.ts
20240
20240
  var debugLogger4 = createDebugLogger("STATUS");
@@ -5,7 +5,7 @@ import {
5
5
  Storage,
6
6
  resolvePath,
7
7
  sanitizeCwd
8
- } from "./chunk-IKOWINH4.js";
8
+ } from "./chunk-WE6TNQJU.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -381,6 +381,15 @@ var DEFAULT_TOKEN_LIMIT = 131072;
381
381
  var DEFAULT_OUTPUT_TOKEN_LIMIT = 32e3;
382
382
  var CAPPED_DEFAULT_MAX_TOKENS = 8e3;
383
383
  var ESCALATED_MAX_TOKENS = 64e3;
384
+ function parsePositiveIntegerEnvValue(raw) {
385
+ if (raw === void 0) return void 0;
386
+ const trimmed = raw.trim();
387
+ if (!/^\d+$/.test(trimmed)) return void 0;
388
+ const parsed = Number(trimmed);
389
+ if (!Number.isSafeInteger(parsed) || parsed <= 0) return void 0;
390
+ return parsed;
391
+ }
392
+ __name(parsePositiveIntegerEnvValue, "parsePositiveIntegerEnvValue");
384
393
  var LIMITS = {
385
394
  "32k": 32768,
386
395
  "64k": 65536,
@@ -1393,6 +1402,7 @@ export {
1393
1402
  DEFAULT_OUTPUT_TOKEN_LIMIT,
1394
1403
  CAPPED_DEFAULT_MAX_TOKENS,
1395
1404
  ESCALATED_MAX_TOKENS,
1405
+ parsePositiveIntegerEnvValue,
1396
1406
  normalize,
1397
1407
  hasExplicitOutputLimit,
1398
1408
  knownTokenLimit,
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createTask
5
- } from "./chunk-7GX7XYZU.js";
5
+ } from "./chunk-XU7BKR3B.js";
6
6
  import {
7
7
  resolveActiveTeamName
8
8
  } from "./chunk-LD2XBG6Z.js";
@@ -11,7 +11,7 @@ import {
11
11
  BaseToolInvocation,
12
12
  ToolDisplayNames,
13
13
  ToolNames
14
- } from "./chunk-JJHY7NAD.js";
14
+ } from "./chunk-GOMVJKBL.js";
15
15
  import {
16
16
  init_esbuild_shims
17
17
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,19 +2,19 @@
2
2
  "use strict";
3
3
  import {
4
4
  RequestTokenizer
5
- } from "./chunk-IUEQOXOI.js";
5
+ } from "./chunk-CX3SGIPK.js";
6
6
  import {
7
7
  OpenAIContentConverter,
8
8
  TaggedThinkingParser,
9
9
  openaiRequestCaptureContext
10
- } from "./chunk-6Z2MVJIJ.js";
10
+ } from "./chunk-2CNO5W47.js";
11
11
  import {
12
12
  createChildAbortController
13
13
  } from "./chunk-64WXLC72.js";
14
14
  import {
15
15
  buildRuntimeFetchOptions,
16
16
  redactProxyError
17
- } from "./chunk-HU3RKEK2.js";
17
+ } from "./chunk-42HGOMED.js";
18
18
  import {
19
19
  CAPPED_DEFAULT_MAX_TOKENS,
20
20
  DASHSCOPE_PROXY_BASE_URL,
@@ -22,17 +22,18 @@ import {
22
22
  DEFAULT_MAX_RETRIES,
23
23
  DEFAULT_TIMEOUT,
24
24
  hasExplicitOutputLimit,
25
+ parsePositiveIntegerEnvValue,
25
26
  runtimeDiagnostics,
26
27
  safeJsonParse,
27
28
  tokenLimit
28
- } from "./chunk-PTGKSUUJ.js";
29
+ } from "./chunk-G4BUMVEY.js";
29
30
  import {
30
31
  GenerateContentResponse
31
32
  } from "./chunk-55ZMG67I.js";
32
33
  import {
33
34
  createDebugLogger,
34
35
  isAbortError
35
- } from "./chunk-IKOWINH4.js";
36
+ } from "./chunk-WE6TNQJU.js";
36
37
  import {
37
38
  init_esbuild_shims
38
39
  } from "./chunk-A4BMJM77.js";
@@ -7025,9 +7026,10 @@ var DefaultOpenAICompatibleProvider = class {
7025
7026
  effectiveMaxTokens = userMaxTokens;
7026
7027
  }
7027
7028
  } else {
7028
- const envVal = process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"];
7029
- const envMaxTokens = envVal ? parseInt(envVal, 10) : NaN;
7030
- if (!isNaN(envMaxTokens) && envMaxTokens > 0) {
7029
+ const envMaxTokens = parsePositiveIntegerEnvValue(
7030
+ process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]
7031
+ );
7032
+ if (envMaxTokens !== void 0) {
7031
7033
  effectiveMaxTokens = isKnownModel ? Math.min(envMaxTokens, modelLimit) : envMaxTokens;
7032
7034
  } else {
7033
7035
  effectiveMaxTokens = Math.min(modelLimit, CAPPED_DEFAULT_MAX_TOKENS);
@@ -7049,7 +7051,14 @@ var ModelScopeOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
7049
7051
  * Checks if the configuration is for ModelScope.
7050
7052
  */
7051
7053
  static isModelScopeProvider(config) {
7052
- return !!config.baseUrl?.includes("modelscope");
7054
+ const baseUrl = config.baseUrl ?? "";
7055
+ if (!baseUrl) return false;
7056
+ try {
7057
+ const hostname = new URL(baseUrl).hostname.toLowerCase();
7058
+ return hostname === "modelscope.cn" || hostname.endsWith(".modelscope.cn");
7059
+ } catch {
7060
+ return false;
7061
+ }
7053
7062
  }
7054
7063
  /**
7055
7064
  * ModelScope does not support `stream_options` when `stream` is false.
@@ -7469,8 +7478,14 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
7469
7478
  super(contentGeneratorConfig, cliConfig);
7470
7479
  }
7471
7480
  static isOpenRouterProvider(contentGeneratorConfig) {
7472
- const baseURL = contentGeneratorConfig.baseUrl || "";
7473
- return baseURL.includes("openrouter.ai");
7481
+ const baseURL = contentGeneratorConfig.baseUrl ?? "";
7482
+ if (!baseURL) return false;
7483
+ try {
7484
+ const hostname = new URL(baseURL).hostname.toLowerCase();
7485
+ return hostname === "openrouter.ai" || hostname.endsWith(".openrouter.ai");
7486
+ } catch {
7487
+ return false;
7488
+ }
7474
7489
  }
7475
7490
  buildHeaders() {
7476
7491
  const baseHeaders = super.buildHeaders();
@@ -7482,6 +7497,35 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
7482
7497
  }
7483
7498
  };
7484
7499
 
7500
+ // packages/core/src/core/openaiContentGenerator/provider/requesty.ts
7501
+ init_esbuild_shims();
7502
+ var RequestyOpenAICompatibleProvider = class extends DefaultOpenAICompatibleProvider {
7503
+ static {
7504
+ __name(this, "RequestyOpenAICompatibleProvider");
7505
+ }
7506
+ constructor(contentGeneratorConfig, cliConfig) {
7507
+ super(contentGeneratorConfig, cliConfig);
7508
+ }
7509
+ static isRequestyProvider(contentGeneratorConfig) {
7510
+ const baseURL = contentGeneratorConfig.baseUrl || "";
7511
+ if (!baseURL) return false;
7512
+ try {
7513
+ const host = new URL(baseURL).hostname.toLowerCase();
7514
+ return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
7515
+ } catch {
7516
+ return false;
7517
+ }
7518
+ }
7519
+ buildHeaders() {
7520
+ const baseHeaders = super.buildHeaders();
7521
+ return {
7522
+ ...baseHeaders,
7523
+ "HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
7524
+ "X-Title": "Qwen Code"
7525
+ };
7526
+ }
7527
+ };
7528
+
7485
7529
  // packages/core/src/core/openaiContentGenerator/provider/minimax.ts
7486
7530
  init_esbuild_shims();
7487
7531
  var MINIMAX_KNOWN_HOSTS = ["api.minimaxi.com", "api.minimax.io"];
@@ -8480,6 +8524,12 @@ function determineProvider(contentGeneratorConfig, cliConfig) {
8480
8524
  cliConfig
8481
8525
  );
8482
8526
  }
8527
+ if (RequestyOpenAICompatibleProvider.isRequestyProvider(config)) {
8528
+ return new RequestyOpenAICompatibleProvider(
8529
+ contentGeneratorConfig,
8530
+ cliConfig
8531
+ );
8532
+ }
8483
8533
  if (ModelScopeOpenAICompatibleProvider.isModelScopeProvider(config)) {
8484
8534
  return new ModelScopeOpenAICompatibleProvider(
8485
8535
  contentGeneratorConfig,
@@ -8506,6 +8556,7 @@ export {
8506
8556
  DashScopeOpenAICompatibleProvider,
8507
8557
  DeepSeekOpenAICompatibleProvider,
8508
8558
  OpenRouterOpenAICompatibleProvider,
8559
+ RequestyOpenAICompatibleProvider,
8509
8560
  MiniMaxOpenAICompatibleProvider,
8510
8561
  MistralOpenAICompatibleProvider,
8511
8562
  MiMoOpenAICompatibleProvider,
@@ -3,17 +3,17 @@
3
3
  import {
4
4
  getInboxesDir,
5
5
  require_proper_lockfile
6
- } from "./chunk-M5VYHAHT.js";
6
+ } from "./chunk-26ZYKTYZ.js";
7
7
  import {
8
8
  Mutex
9
9
  } from "./chunk-OMX7CUOE.js";
10
10
  import {
11
11
  atomicWriteJSON
12
- } from "./chunk-N5QHMPZU.js";
12
+ } from "./chunk-LTN3VYMZ.js";
13
13
  import {
14
14
  createDebugLogger,
15
15
  isNodeError
16
- } from "./chunk-IKOWINH4.js";
16
+ } from "./chunk-WE6TNQJU.js";
17
17
  import {
18
18
  init_esbuild_shims
19
19
  } from "./chunk-A4BMJM77.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  createDebugLogger,
5
5
  isNodeError
6
- } from "./chunk-IKOWINH4.js";
6
+ } from "./chunk-WE6TNQJU.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";
@@ -2,17 +2,17 @@
2
2
  "use strict";
3
3
  import {
4
4
  formatFetchErrorForUser
5
- } from "./chunk-F6FP3URI.js";
5
+ } from "./chunk-ATLUHLZE.js";
6
6
  import {
7
7
  combineAbortSignals
8
8
  } from "./chunk-64WXLC72.js";
9
9
  import {
10
10
  atomicWriteFile
11
- } from "./chunk-N5QHMPZU.js";
11
+ } from "./chunk-LTN3VYMZ.js";
12
12
  import {
13
13
  Storage,
14
14
  createDebugLogger
15
- } from "./chunk-IKOWINH4.js";
15
+ } from "./chunk-WE6TNQJU.js";
16
16
  import {
17
17
  init_esbuild_shims
18
18
  } from "./chunk-A4BMJM77.js";
@@ -2,24 +2,24 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-SZWDOOGV.js";
5
+ } from "./chunk-C7JA3XCX.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-32SSXBMG.js";
9
+ } from "./chunk-VECKCOH6.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
- } from "./chunk-JIJBNW4A.js";
12
+ } from "./chunk-ID533GA3.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-6Z2MVJIJ.js";
16
+ } from "./chunk-2CNO5W47.js";
17
17
  import {
18
18
  ToolNames
19
- } from "./chunk-JJHY7NAD.js";
19
+ } from "./chunk-GOMVJKBL.js";
20
20
  import {
21
21
  DEFAULT_TOKEN_LIMIT
22
- } from "./chunk-PTGKSUUJ.js";
22
+ } from "./chunk-G4BUMVEY.js";
23
23
  import {
24
24
  init_esbuild_shims
25
25
  } from "./chunk-A4BMJM77.js";