@qwen-code/qwen-code 0.18.4-preview.0 → 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.
- package/bundled/qc-helper/docs/configuration/auth.md +7 -6
- package/bundled/qc-helper/docs/configuration/model-providers.md +16 -2
- package/bundled/qc-helper/docs/configuration/settings.md +26 -26
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -0
- package/bundled/qc-helper/docs/features/mcp.md +49 -0
- package/chunks/{agent-PPGQVSZN.js → agent-2TEY55UD.js} +21 -21
- package/chunks/{agent-headless-5SGQIWGS.js → agent-headless-SCUAXEEE.js} +21 -21
- package/chunks/{anthropicContentGenerator-OLOGBVLP.js → anthropicContentGenerator-5S4OMMNL.js} +9 -7
- package/chunks/{askUserQuestion-ANRVSBIJ.js → askUserQuestion-WHVYL2S2.js} +2 -2
- package/chunks/{ca-K6MD665I.js → ca-7WC7ELX6.js} +1 -0
- package/chunks/{chunk-M5VYHAHT.js → chunk-26ZYKTYZ.js} +2 -2
- package/chunks/{chunk-JP3LQIMW.js → chunk-2CNO5W47.js} +14 -14
- package/chunks/{chunk-7OCZ77KA.js → chunk-2O3NAOJG.js} +1 -1
- package/chunks/{chunk-HU3RKEK2.js → chunk-42HGOMED.js} +1 -1
- package/chunks/{chunk-WWU2KUSR.js → chunk-AE6RQU6F.js} +1 -1
- package/chunks/{chunk-F6FP3URI.js → chunk-ATLUHLZE.js} +1 -1
- package/chunks/{chunk-4HMWGHPP.js → chunk-C6MI2ASN.js} +2 -2
- package/chunks/{chunk-VNMHFAZ3.js → chunk-C7JA3XCX.js} +11 -11
- package/chunks/{chunk-VWPDSQZY.js → chunk-CTHZVIMD.js} +2 -2
- package/chunks/{chunk-IUEQOXOI.js → chunk-CX3SGIPK.js} +2 -2
- package/chunks/{chunk-A6OKBLUA.js → chunk-F5E6IKYN.js} +7 -7
- package/chunks/{chunk-FPZF3BNV.js → chunk-FH4P6RQA.js} +1 -1
- package/chunks/{chunk-PTGKSUUJ.js → chunk-G4BUMVEY.js} +11 -1
- package/chunks/{chunk-JN6FVOPP.js → chunk-GBN55AWZ.js} +2 -2
- package/chunks/{chunk-JJHY7NAD.js → chunk-GOMVJKBL.js} +1 -1
- package/chunks/{chunk-JIJBNW4A.js → chunk-ID533GA3.js} +1 -1
- package/chunks/{chunk-E5SRTXRG.js → chunk-KGV3F6UF.js} +1 -1
- package/chunks/{chunk-IS4QOHTV.js → chunk-KZGQ3G3Q.js} +62 -11
- package/chunks/{chunk-4TW2JM5Q.js → chunk-LF6BKGZT.js} +3 -3
- package/chunks/{chunk-N5QHMPZU.js → chunk-LTN3VYMZ.js} +1 -1
- package/chunks/{chunk-DZCZZPCY.js → chunk-MSJ2MXJ6.js} +3 -3
- package/chunks/{chunk-BR6DF3Y4.js → chunk-SIJKWK35.js} +6 -6
- package/chunks/{chunk-MP436DDQ.js → chunk-VECKCOH6.js} +3202 -2678
- package/chunks/{chunk-AQDPHFDZ.js → chunk-VKILGMZQ.js} +1 -1
- package/chunks/{chunk-IKOWINH4.js → chunk-WE6TNQJU.js} +6 -2
- package/chunks/{chunk-2ES3D3TW.js → chunk-XGU3ETVO.js} +3 -3
- package/chunks/{chunk-7GX7XYZU.js → chunk-XU7BKR3B.js} +3 -3
- package/chunks/{computer-use-LPHSGISW.js → computer-use-OB3C5QG2.js} +23 -22
- package/chunks/{contextCommand-SQPW6JX7.js → contextCommand-3327KUC4.js} +23 -23
- package/chunks/{cron-create-OKGQO6GX.js → cron-create-THNDTYXU.js} +4 -4
- package/chunks/{cron-delete-DTJP7L6O.js → cron-delete-BS5H6TFJ.js} +4 -4
- package/chunks/{cron-list-VKZUASFG.js → cron-list-7OBVHT7K.js} +4 -4
- package/chunks/{de-K2F3T3TR.js → de-ACHALDED.js} +1 -0
- package/chunks/{dist-OLC6NBSB.js → dist-DZ6AJDX4.js} +1 -1
- package/chunks/{dist-QUSDBLAK.js → dist-GKRNVFBH.js} +4 -0
- package/chunks/{edit-OPGWEYXB.js → edit-GNCLIF67.js} +21 -21
- package/chunks/{en-KGSAKBJP.js → en-S3OQBISC.js} +1 -0
- package/chunks/{enter-worktree-JLFLU22E.js → enter-worktree-E7BNZOGT.js} +21 -21
- package/chunks/{enterPlanMode-JFBUNYML.js → enterPlanMode-IA42A5EU.js} +26 -26
- package/chunks/{exit-worktree-NU64ZZRI.js → exit-worktree-QJ2K74UT.js} +21 -21
- package/chunks/{exitPlanMode-UR6YQE64.js → exitPlanMode-UKKHBUYJ.js} +21 -21
- package/chunks/{fr-2CAQEOK6.js → fr-GVKZ27MF.js} +1 -0
- package/chunks/{geminiContentGenerator-KUVZXCGX.js → geminiContentGenerator-ICSDM37U.js} +4 -4
- package/chunks/{glob-RNX6IBFD.js → glob-IGD7LWYX.js} +21 -21
- package/chunks/{grep-5GUNAZFX.js → grep-IZM3IVND.js} +21 -21
- package/chunks/{ja-QWL7V6OJ.js → ja-FKZ2WZ4D.js} +1 -0
- package/chunks/{keychain-token-storage-ALKQXYJQ.js → keychain-token-storage-YHXIWXIB.js} +2 -2
- package/chunks/{loop-wakeup-RX6YIUSG.js → loop-wakeup-SSBWZ64K.js} +5 -5
- package/chunks/{ls-6PLNWHMU.js → ls-YPFUHZRQ.js} +3 -3
- package/chunks/{lsp-3HFQU4OF.js → lsp-FD6DNVAF.js} +2 -2
- package/chunks/{monitor-LYHRV6SR.js → monitor-ALJNE3R4.js} +21 -21
- package/chunks/{notebook-edit-B5FEP65B.js → notebook-edit-7XRZX55T.js} +21 -21
- package/chunks/{openaiContentGenerator-XYMMXZFG.js → openaiContentGenerator-FWKITDFJ.js} +13 -11
- package/chunks/{pt-2SPOLMAY.js → pt-SY5NCFGR.js} +1 -0
- package/chunks/{qwenContentGenerator-QWPW3P7K.js → qwenContentGenerator-5RPGQZ63.js} +24 -24
- package/chunks/{qwenOAuth2-XWC5SU63.js → qwenOAuth2-WZ54YZ4J.js} +4 -4
- package/chunks/{read-file-ROEHCU4A.js → read-file-4WN2DT5N.js} +8 -8
- package/chunks/{ripGrep-YBPCCX22.js → ripGrep-4ZKT6KBQ.js} +21 -21
- package/chunks/{ru-35IVJTEH.js → ru-FWNXJG4F.js} +1 -0
- package/chunks/{scheduler-NIQSNCLH.js → scheduler-O2E65VDK.js} +21 -21
- package/chunks/{send-message-IIT3SHA7.js → send-message-FWFTX62Q.js} +2 -2
- package/chunks/{serve-GME2SMSV.js → serve-3DM6CRGD.js} +6942 -6809
- package/chunks/{shell-E7NADQBV.js → shell-ARVZK6RF.js} +21 -21
- package/chunks/{skill-WVYNAGWW.js → skill-BFUBGA4I.js} +10 -10
- package/chunks/{src-4HJAM36V.js → src-5YMCDSII.js} +47 -21
- package/chunks/{syntheticOutput-H67FYXU7.js → syntheticOutput-JY5NEDTV.js} +3 -3
- package/chunks/{task-create-OVXHSHAI.js → task-create-IGILDV25.js} +6 -6
- package/chunks/{task-list-QUUCQJ3U.js → task-list-KBEJVAAG.js} +5 -5
- package/chunks/{task-stop-WA5DMTKK.js → task-stop-WFTMQ6AC.js} +2 -2
- package/chunks/{task-update-PC5427TI.js → task-update-UIVX7ZEV.js} +6 -6
- package/chunks/{team-create-BOSQOS35.js → team-create-HRBV5ATK.js} +21 -21
- package/chunks/{team-delete-ZTEMYRJ3.js → team-delete-LPOXDPVB.js} +5 -5
- package/chunks/{todoWrite-J6L6ELD6.js → todoWrite-R4RIJKOD.js} +4 -4
- package/chunks/{tool-search-PPLILX5J.js → tool-search-67HI54YA.js} +8 -8
- package/chunks/{web-fetch-6XLPPTP7.js → web-fetch-JU7SS6KE.js} +4 -4
- package/chunks/{workflow-CDROZNXC.js → workflow-W4SCLWLU.js} +22 -22
- package/chunks/{write-file-QY4X7MMO.js → write-file-TLNXC2NR.js} +21 -21
- package/chunks/{zh-X4KM6MTW.js → zh-QXLZV2PX.js} +1 -0
- package/chunks/{zh-TW-BSG6BUWK.js → zh-TW-3OKU7LDA.js} +1 -0
- package/cli.js +956 -636
- package/locales/ca.js +2 -1
- package/locales/de.js +1 -0
- package/locales/en.js +1 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +1 -0
- package/locales/zh.js +1 -0
- 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-
|
|
8
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
9
9
|
import {
|
|
10
10
|
Storage,
|
|
11
11
|
getProjectHash
|
|
12
|
-
} from "./chunk-
|
|
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-
|
|
5
|
+
} from "./chunk-VECKCOH6.js";
|
|
6
6
|
import {
|
|
7
7
|
Storage
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
173
|
-
"./locales/de.js": () => import("./de-
|
|
174
|
-
"./locales/en.js": () => import("./en-
|
|
175
|
-
"./locales/fr.js": () => import("./fr-
|
|
176
|
-
"./locales/ja.js": () => import("./ja-
|
|
177
|
-
"./locales/pt.js": () => import("./pt-
|
|
178
|
-
"./locales/ru.js": () => import("./ru-
|
|
179
|
-
"./locales/zh-TW.js": () => import("./zh-TW-
|
|
180
|
-
"./locales/zh.js": () => import("./zh-
|
|
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-
|
|
5
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
6
6
|
import {
|
|
7
7
|
Storage,
|
|
8
8
|
createDebugLogger
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
6
|
+
} from "./chunk-42HGOMED.js";
|
|
7
7
|
import {
|
|
8
8
|
createDebugLogger
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
21
|
+
} from "./chunk-VECKCOH6.js";
|
|
22
22
|
import {
|
|
23
23
|
isWithinRoot,
|
|
24
24
|
stripRuntimeSnapshotPrefix
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2CNO5W47.js";
|
|
26
26
|
import {
|
|
27
27
|
atomicWriteFileSync
|
|
28
|
-
} from "./chunk-
|
|
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-
|
|
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.
|
|
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 = "
|
|
20237
|
+
var GIT_COMMIT_INFO = "2937b09cf";
|
|
20238
20238
|
|
|
20239
20239
|
// packages/cli/src/utils/systemInfo.ts
|
|
20240
20240
|
var debugLogger4 = createDebugLogger("STATUS");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
14
|
+
} from "./chunk-GOMVJKBL.js";
|
|
15
15
|
import {
|
|
16
16
|
init_esbuild_shims
|
|
17
17
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
RequestTokenizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CX3SGIPK.js";
|
|
6
6
|
import {
|
|
7
7
|
OpenAIContentConverter,
|
|
8
8
|
TaggedThinkingParser,
|
|
9
9
|
openaiRequestCaptureContext
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
7029
|
-
|
|
7030
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
12
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
13
13
|
import {
|
|
14
14
|
createDebugLogger,
|
|
15
15
|
isNodeError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WE6TNQJU.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esbuild_shims
|
|
19
19
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
formatFetchErrorForUser
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
11
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
12
12
|
import {
|
|
13
13
|
Storage,
|
|
14
14
|
createDebugLogger
|
|
15
|
-
} from "./chunk-
|
|
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-
|
|
5
|
+
} from "./chunk-C7JA3XCX.js";
|
|
6
6
|
import {
|
|
7
7
|
computeThresholds,
|
|
8
8
|
getCoreSystemPrompt
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VECKCOH6.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillLlmContent
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ID533GA3.js";
|
|
13
13
|
import {
|
|
14
14
|
DiscoveredMCPTool,
|
|
15
15
|
uiTelemetryService
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2CNO5W47.js";
|
|
17
17
|
import {
|
|
18
18
|
ToolNames
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GOMVJKBL.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TOKEN_LIMIT
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-G4BUMVEY.js";
|
|
23
23
|
import {
|
|
24
24
|
init_esbuild_shims
|
|
25
25
|
} from "./chunk-A4BMJM77.js";
|