dsh-connect-workbuddy 5.21.4 → 5.23.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.
- package/CHANGELOG.md +157 -0
- package/README.en.md +9 -2
- package/README.md +8 -3
- package/lib/bin.js +1 -1
- package/lib/client.js +417 -80
- package/lib/{host-heartbeat-Dq3ITRhF.js → host-heartbeat-CRS-1LBA.js} +76 -2
- package/lib/index.d.ts +76 -19
- package/lib/index.js +450 -138
- package/package.json +2 -2
|
@@ -1990,6 +1990,80 @@ function queueNoticeText(report) {
|
|
|
1990
1990
|
const IMAGE_TAG_TEXT_TO_IMAGE = "text-to-image";
|
|
1991
1991
|
/** 产品配置里「图生图 / 改图」模型的标签。 */
|
|
1992
1992
|
const IMAGE_TAG_IMAGE_TO_IMAGE = "image-to-image";
|
|
1993
|
+
/** 实测通过的宽档(目录里的 `hunyuan-image-alpha` 等默认档)。 */
|
|
1994
|
+
const IMAGE_SIZE_LIMITS_WIDE = {
|
|
1995
|
+
minEdge: 512,
|
|
1996
|
+
maxEdge: 2560,
|
|
1997
|
+
maxPixels: 4194304
|
|
1998
|
+
};
|
|
1999
|
+
/**
|
|
2000
|
+
* `hunyuan-image-v3.0` 的窄档:边长 2048、总像素 1024² 顶格。
|
|
2001
|
+
*
|
|
2002
|
+
* 实测边界见 {@link WorkBuddyImageSizeLimits} 的表:`1024x1024`(1,048,576)
|
|
2003
|
+
* 通过、`1024x1025` 被拒,所以上限就是这个数,不多一位。
|
|
2004
|
+
*/
|
|
2005
|
+
const IMAGE_SIZE_LIMITS_V3 = {
|
|
2006
|
+
minEdge: 512,
|
|
2007
|
+
maxEdge: 2048,
|
|
2008
|
+
maxPixels: 1048576
|
|
2009
|
+
};
|
|
2010
|
+
/**
|
|
2011
|
+
* 按模型 id 给出它的尺寸范围。
|
|
2012
|
+
*
|
|
2013
|
+
* 判据只看 id 前缀:`hunyuan-image-v3.0` 与它的改图位(若有)同族同限。这不是
|
|
2014
|
+
* 「猜模型能力」——两条是实测过的边界,其余一律回落到实测过的宽档。
|
|
2015
|
+
*/
|
|
2016
|
+
function imageSizeLimitsOf(modelId) {
|
|
2017
|
+
return modelId.startsWith("hunyuan-image-v3") ? IMAGE_SIZE_LIMITS_V3 : IMAGE_SIZE_LIMITS_WIDE;
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* 无水印模型:`hunyuan-image-v3.0`(issue #241)。
|
|
2021
|
+
*
|
|
2022
|
+
* 2026-11-12 实测:同一个提示词、同一个账号,`hunyuan-image-alpha` 的产物右下角
|
|
2023
|
+
* 固定带「AI生成 WORKBUDD>」水印,而 `hunyuan-image-v3.0` **完全没有**——它不是
|
|
2024
|
+
* 参数开关,是产物落盘路径的差别:带水印的产物落在 COS 的 `aigc-processed/`
|
|
2025
|
+
* 前缀下,v3.0 的不落。所以「关水印」这件事在上游只有一个等价做法:换模型。
|
|
2026
|
+
*
|
|
2027
|
+
* 代价如实体现在两处:单价 6 → 11.1 积分/张,尺寸上限降到
|
|
2028
|
+
* {@link IMAGE_SIZE_LIMITS_V3}。因此它是**用户选的**,不是默认——
|
|
2029
|
+
* 见 `preferredImageModels`。
|
|
2030
|
+
*/
|
|
2031
|
+
const IMAGE_MODEL_NO_WATERMARK = "hunyuan-image-v3.0";
|
|
2032
|
+
/** 这个模型 id 是不是那条「不带水印」的模型。 */
|
|
2033
|
+
function isWatermarkFreeImageModel(modelId) {
|
|
2034
|
+
return modelId === IMAGE_MODEL_NO_WATERMARK;
|
|
2035
|
+
}
|
|
2036
|
+
/**
|
|
2037
|
+
* 「不带水印」这条可选项的目录条目。
|
|
2038
|
+
*
|
|
2039
|
+
* 它**不在** `/v3/config` 的媒体目录里——目录只发 `hunyuan-image-alpha` /
|
|
2040
|
+
* `hunyuan-image-alpha-edit` 两条。但它是官方 CLI 自己写死的文生图兜底模型
|
|
2041
|
+
* (`resolveModel` 里 `s ? "hunyuan-image-v3.0" : "hunyuan-image-v2.0-general-edit"`),
|
|
2042
|
+
* 实测也真的能出图,所以把它补成一条与目录条目同形的候选,让「选模型」这一层
|
|
2043
|
+
* 不必为它开第二条分支。
|
|
2044
|
+
*
|
|
2045
|
+
* `tags` 只给 `text-to-image`:它在 `/v2/images/edits` 上是**静默忽略输入图**的
|
|
2046
|
+
* (2026-11-12 实测:蓝底黑十字的输入图 + 「只加一颗星」,出来是灰底一颗星、
|
|
2047
|
+
* 输入图完全没进画布,照样扣 11.31 积分)。所以它绝不能出现在改图那一组里。
|
|
2048
|
+
*/
|
|
2049
|
+
const IMAGE_MODEL_NO_WATERMARK_ENTRY = {
|
|
2050
|
+
id: IMAGE_MODEL_NO_WATERMARK,
|
|
2051
|
+
name: "Hunyuan Image v3.0(无水印)",
|
|
2052
|
+
tags: [IMAGE_TAG_TEXT_TO_IMAGE]
|
|
2053
|
+
};
|
|
2054
|
+
/**
|
|
2055
|
+
* 某个 tag 组里**可选的全部**模型:目录给的,加上本插件自己补的。
|
|
2056
|
+
*
|
|
2057
|
+
* 只往 `text-to-image` 组里补 `hunyuan-image-v3.0`,其他组原样返回。目录要是哪天
|
|
2058
|
+
* 自己下发了这个 id,就以目录的那条为准(不重复、不覆盖上游的名字)。
|
|
2059
|
+
*/
|
|
2060
|
+
function imageModelChoices(models, tag) {
|
|
2061
|
+
const group = models.filter((model) => model.tags.includes(tag));
|
|
2062
|
+
if (group.length === 0) return group;
|
|
2063
|
+
if (tag !== "text-to-image") return group;
|
|
2064
|
+
if (group.some((model) => model.id === "hunyuan-image-v3.0")) return group;
|
|
2065
|
+
return [...group, IMAGE_MODEL_NO_WATERMARK_ENTRY];
|
|
2066
|
+
}
|
|
1993
2067
|
/** 生图路由。 */
|
|
1994
2068
|
const IMAGE_GENERATIONS_PATH = "/v2/images/generations";
|
|
1995
2069
|
/** 改图路由:官方 CLI 的 `ImageService.editImage` 打的就是这条(2026-10-25 国际区实测 200)。 */
|
|
@@ -10527,7 +10601,7 @@ function describeRosterSeenPayload(raw) {
|
|
|
10527
10601
|
//#endregion
|
|
10528
10602
|
//#region src/version.ts
|
|
10529
10603
|
/** The npm package version this build was produced from. */
|
|
10530
|
-
const WORKBUDDY_CONNECT_VERSION = "5.
|
|
10604
|
+
const WORKBUDDY_CONNECT_VERSION = "5.23.0";
|
|
10531
10605
|
//#endregion
|
|
10532
10606
|
//#region src/host-heartbeat.ts
|
|
10533
10607
|
/**
|
|
@@ -10738,4 +10812,4 @@ async function clearHostHeartbeat() {
|
|
|
10738
10812
|
await rm(workbuddyHostHeartbeatPath(), { force: true });
|
|
10739
10813
|
}
|
|
10740
10814
|
//#endregion
|
|
10741
|
-
export { DEFAULT_WIRE_PROFILE as $,
|
|
10815
|
+
export { DEFAULT_WIRE_PROFILE as $, parseQueueAnswer as $t, withoutRouters as A, writeFileAtomic as An, offRefused as At, defaultDesktopAuthPath as B, IMAGE_TAG_IMAGE_TO_IMAGE as Bt, setDeviceMode as C, macosNestedAppBundles as Cn, attachBusyLevels as Ct, applyContextBudgets as D, hostPeersInfo as Dn, defaultOffModelIds as Dt, WorkBuddyCatalog as E, workbuddyAppExecutableCandidates as En, REFUSES_OFF_MODEL_IDS as Et, WorkBuddyCredentialStore as F, WorkBuddyVideoError as Ft, parseWorkBuddyAuth as G, imageMimeForPath as Gt, isEncryptedCredentialError as H, MAX_INPUT_IMAGE_BYTES as Ht, WorkBuddyEncryptedCredentialError as I, parseSupportedSecondsRange as It, workbuddyOwnAuthPath as J, isBareBase64Image as Jt, preferredAccountName as K, imageModelChoices as Kt, authFileName as L, pickVideoModel as Lt, WORKBUDDY_AUTH_FILENAME as M, withEffectiveOff as Mt, WORKBUDDY_AUTH_FILE_ENV as N, VIDEO_TAG_IMAGE_TO_VIDEO as Nt, deriveCatalog as O, resolveDshHome as On, lastRefusalFor as Ot, WORKBUDDY_VAULT_DIRNAME as P, VIDEO_TAG_TEXT_TO_VIDEO as Pt, CREDENTIAL_REJECTED_CODE as Q, sniffImageMime as Qt, defaultDesktopAuthCandidates as R, resolveVideoParams as Rt, saveDeviceSdkSettings as S, macosBundleExecutable as Sn, rewriteSessionTitleModel as St, FALLBACK_WORKBUDDY_MODELS_GLOBAL as T, readAtRestKey as Tn, selectPromoBadge as Tt, isVaultAccountId as U, WorkBuddyImageError as Ut, hasEncryptedCredentialFields as V, IMAGE_TAG_TEXT_TO_IMAGE as Vt, legacyWorkbuddyOwnAuthPath as W, imageDataUrl as Wt, APP_VERSION as X, parseImageDataUrl as Xt, workbuddyVaultDir as Y, isWatermarkFreeImageModel as Yt, CONTEXT_OVERFLOW_MARKER as Z, pickMediaModel as Zt, createDeviceProfileLookup as _, fetchAtRestKeyPayload as _n, parseUpstreamModel as _t, readHostHeartbeat as a, WORKBUDDY_DEVICE_TOKEN_FILE_ENV as an, declaredTools as at, readDeviceSettings as b, isEncryptedFieldWrapper as bn, regionOf as bt, WORKBUDDY_CONNECT_VERSION as c, readDeviceSalt as cn, isContextTooLongBody as ct, rosterSeenPath as d, inspectCredentialDirectory as dn, isFirstMessageGateBody as dt, queueNoticeText as en, WORKBUDDY_FALLBACK_SYSTEM_PROMPT as et, WORKBUDDY_CN_BASE_ENV as f, protectCredentialDirectory as fn, knownRegionOf as ft, createTuringSdk as g, deriveAtRestKeyId as gn, parseReasoning as gt, createDeviceSdkPort as h, deriveAtRestKey as hn, parseCreditMultiplier as ht, processStartTimeMs as i, nativeModalityOf as in, classifyUpstreamError as it, ENCRYPTED_CREDENTIAL_CODE as j, recordRefusal as jt, fallbackModelsFor as k, withFileLock as kn, offDefaultFor as kt, createFileRosterSeenStore as l, deriveDeviceId as ln, isConversationIdGateBody as lt, piAiRuntimeInfo as m, clearAtRestKeyCache as mn, openingEvidenceOfBody as mt, clearHostHeartbeat as n, NATIVE_MODALITY_BY_MODEL_ID as nn, WorkBuddyUpstreamClient as nt, workbuddyHostHeartbeatPath as o, readDeviceTokenFile as on, describeRequestHeaderNames as ot, resolveCnGateway as p, WORKBUDDY_APP_EXECUTABLE_ENV as pn, modelIdOfBody as pt, workbuddyAccountId as q, imageSizeLimitsOf as qt, isHeartbeatProcessAlive as r, imageDefaultFor as rn, channelGateMemberOf as rt, writeHostHeartbeat as s, ensureDeviceSalt as sn, forceNeutralHead as st, WORKBUDDY_HOST_HEARTBEAT_FILENAME as t, pruneTempDir as tn, WorkBuddyCredentialRejectedError as tt, describeRosterSeenPayload as u, isDeviceId as un, isCredentialRejectedError as ut, describeDerivedDevices as v, findWorkbuddyAppExecutable as vn, perturbChannelFingerprints as vt, FALLBACK_WORKBUDDY_MODELS as w, openEncryptedField as wn, promoBadgeTone as wt, saveDeviceProfile as x, isWorkbuddyBundle as xn, requestEvidenceOf as xt, isDeviceMode as y, findWorkbuddyAppExecutableWithSource as yn, prepareChatBody as yt, defaultDesktopAuthDirs as z, IMAGE_SIZE_LIMITS_WIDE as zt };
|
package/lib/index.d.ts
CHANGED
|
@@ -2581,9 +2581,10 @@ interface WorkBuddyShimOptions {
|
|
|
2581
2581
|
* token REFRESH in one place (`store.resolve()`) instead of duplicating it on
|
|
2582
2582
|
* a path that would silently send expired tokens.
|
|
2583
2583
|
*
|
|
2584
|
-
*
|
|
2584
|
+
* The optional signal releases a request waiting for pool recovery on client
|
|
2585
|
+
* disconnect. Absent means the store's own selection always serves.
|
|
2585
2586
|
*/
|
|
2586
|
-
prepareAccount?: () => Promise<void>;
|
|
2587
|
+
prepareAccount?: (signal?: AbortSignal) => Promise<void>;
|
|
2587
2588
|
/**
|
|
2588
2589
|
* Called for every attempt that failed upstream, before the next one is tried.
|
|
2589
2590
|
*
|
|
@@ -2872,12 +2873,21 @@ declare function workBuddyThinkingLevelMap(info: WorkBuddyModelInfo): WorkBuddyT
|
|
|
2872
2873
|
*
|
|
2873
2874
|
* - `flattened`: `stopReason` is a normal completion, so `transform-messages`
|
|
2874
2875
|
* turns the block into `{type:'text', text: thinking}` — the whole reasoning
|
|
2875
|
-
* body lands in the visible answer.
|
|
2876
|
+
* body lands in the visible answer. This is the disposition up to pi-ai 1.2;
|
|
2877
|
+
* see the note on the field below for what 1.3+ does with it.
|
|
2876
2878
|
* - `dropped`: `stopReason` is `error`/`aborted`, so the entire message is
|
|
2877
2879
|
* skipped; nothing reaches the wire and nothing reaches the user. It is
|
|
2878
2880
|
* reported anyway, because it still costs context: the model's answer to
|
|
2879
2881
|
* "why did my last turn say nothing" is this line, and a caller cannot see it
|
|
2880
2882
|
* from the transcript.
|
|
2883
|
+
*
|
|
2884
|
+
* ⚠️ On pi-ai 1.3+ the `flattened` label is historical, not predictive: the
|
|
2885
|
+
* library discards a foreign block instead of rewriting it, so the "prose
|
|
2886
|
+
* leak" this name describes can no longer happen there. The label is kept
|
|
2887
|
+
* because it is what the CALLER asks about ("was this reasoning about to
|
|
2888
|
+
* become my answer?") and because the repair — which is this plugin's own
|
|
2889
|
+
* guarantee, independent of whichever pi-ai a user resolves — is still the
|
|
2890
|
+
* thing that decides.
|
|
2881
2891
|
*/
|
|
2882
2892
|
interface ForeignThinkingBlock {
|
|
2883
2893
|
/** Index of the message in the context's `messages`. */
|
|
@@ -3425,7 +3435,8 @@ interface WorkBuddyProbeResult {
|
|
|
3425
3435
|
*/
|
|
3426
3436
|
declare function parseRetryAfter(value: string | null, nowMs: number): number | undefined;
|
|
3427
3437
|
/**
|
|
3428
|
-
* The
|
|
3438
|
+
* The upstream reset metadata, if stated. A credit-package refresh timestamp
|
|
3439
|
+
* is retained for diagnostics; it is not a minimum wait or recovery evidence.
|
|
3429
3440
|
*
|
|
3430
3441
|
* Three sources, in order of authority:
|
|
3431
3442
|
*
|
|
@@ -3436,13 +3447,13 @@ declare function parseRetryAfter(value: string | null, nowMs: number): number |
|
|
|
3436
3447
|
* this service: a 429 from the Chinese gateway carries code 6004 and a
|
|
3437
3448
|
* `将在 … 重置` sentence, with no `Retry-After` header at all.
|
|
3438
3449
|
* 3. The region's monthly quota refresh point, but ONLY for an out-of-credit
|
|
3439
|
-
* outcome.
|
|
3440
|
-
*
|
|
3441
|
-
*
|
|
3450
|
+
* outcome. Check-in or a purchase can replenish credits earlier, so callers
|
|
3451
|
+
* must not render this metadata as a recovery countdown or release the
|
|
3452
|
+
* account when the timestamp passes.
|
|
3442
3453
|
*
|
|
3443
|
-
* A limited outcome with none of the three returns `{}
|
|
3444
|
-
*
|
|
3445
|
-
*
|
|
3454
|
+
* A limited outcome with none of the three returns `{}`. Rate-limit views state
|
|
3455
|
+
* that no time was given; credit-exhaustion views name the replenishment action
|
|
3456
|
+
* instead. Neither view invents a countdown.
|
|
3446
3457
|
*
|
|
3447
3458
|
* An `ok` outcome ALWAYS returns `{}`, whatever headers or body came with it.
|
|
3448
3459
|
* A successful probe has already answered "can this account serve right now?"
|
|
@@ -3619,10 +3630,12 @@ interface WorkBuddyPoolProbe {
|
|
|
3619
3630
|
*/
|
|
3620
3631
|
source?: WorkBuddyPoolProbeSource;
|
|
3621
3632
|
/**
|
|
3622
|
-
*
|
|
3633
|
+
* The upstream's reset timestamp, interpreted according to the outcome.
|
|
3623
3634
|
*
|
|
3624
3635
|
* Present for a `rate-limited` outcome whose failure body carried a reset
|
|
3625
3636
|
* sentence, and for an `out-of-credit` outcome with a known quota refresh.
|
|
3637
|
+
* For credit exhaustion this is package metadata, not a minimum wait or
|
|
3638
|
+
* proof of replenishment; later positive balance evidence clears the failure.
|
|
3626
3639
|
* ABSENT when the upstream named no time — that absence is meaningful and
|
|
3627
3640
|
* must never be turned into a locally invented countdown.
|
|
3628
3641
|
*/
|
|
@@ -4168,6 +4181,17 @@ type WorkBuddyWebUsage =
|
|
|
4168
4181
|
* deployments. Absent reads as "nothing pinned", never as a made-up id.
|
|
4169
4182
|
*/
|
|
4170
4183
|
preferredVideoModels?: Readonly<Record<string, string>>;
|
|
4184
|
+
/**
|
|
4185
|
+
* The text-to-image model this region generates with (issue #241), or `''`
|
|
4186
|
+
* for "follow the catalog".
|
|
4187
|
+
*
|
|
4188
|
+
* Travels on the Host's answer for the same measured reason as the switches
|
|
4189
|
+
* above: the picker must render the choice the TOOL will read, and the
|
|
4190
|
+
* browser settings mirror is stale for this namespace. Absent reads as "no
|
|
4191
|
+
* choice", never as the watermark-free model — that one costs twice as much
|
|
4192
|
+
* per image, so it cannot be inferred from a missing value.
|
|
4193
|
+
*/
|
|
4194
|
+
preferredImageModel?: string;
|
|
4171
4195
|
/**
|
|
4172
4196
|
* Whether the OPTIONAL CodeBuddy CLI route is mounted (tool `codebuddy_ask`
|
|
4173
4197
|
* + command `/codebuddy`).
|
|
@@ -4330,6 +4354,12 @@ type WorkBuddyWebUsage =
|
|
|
4330
4354
|
* this travels on the Host's answer instead of the browser mirror.
|
|
4331
4355
|
*/
|
|
4332
4356
|
preferredVideoModels?: Readonly<Record<string, string>>;
|
|
4357
|
+
/**
|
|
4358
|
+
* The text-to-image model this region generates with; see the signed-out
|
|
4359
|
+
* variant for why this travels on the Host's answer and why an absent value
|
|
4360
|
+
* must read as "no choice" rather than the watermark-free model.
|
|
4361
|
+
*/
|
|
4362
|
+
preferredImageModel?: string;
|
|
4333
4363
|
/**
|
|
4334
4364
|
* Whether the OPTIONAL CodeBuddy CLI route is mounted (tool `codebuddy_ask`
|
|
4335
4365
|
* + command `/codebuddy`).
|
|
@@ -5078,6 +5108,15 @@ interface WorkBuddyStatusRouteOptions {
|
|
|
5078
5108
|
* from the committed value the tool will actually read.
|
|
5079
5109
|
*/
|
|
5080
5110
|
preferredVideoModels?(region: WorkBuddyRegion): Readonly<Record<string, string>>;
|
|
5111
|
+
/**
|
|
5112
|
+
* The text-to-image model this region generates with (issue #241), or `''`.
|
|
5113
|
+
*
|
|
5114
|
+
* Optional and absent-tolerant like the pickers above: a Host that cannot
|
|
5115
|
+
* answer means "no choice", which is the pre-#241 behaviour. It must never
|
|
5116
|
+
* read as the watermark-free model — that costs roughly twice as much per
|
|
5117
|
+
* image, so a missing answer is not permission to spend more.
|
|
5118
|
+
*/
|
|
5119
|
+
preferredImageModel?(region: WorkBuddyRegion): string;
|
|
5081
5120
|
/**
|
|
5082
5121
|
* Whether the OPTIONAL CodeBuddy CLI route is mounted (`codebuddy_ask` tool +
|
|
5083
5122
|
* `/codebuddy` command).
|
|
@@ -5213,10 +5252,11 @@ interface WorkBuddyStatusRouteOptions {
|
|
|
5213
5252
|
/**
|
|
5214
5253
|
* The region's next monthly quota refresh, when the upstream declares one.
|
|
5215
5254
|
*
|
|
5216
|
-
*
|
|
5217
|
-
*
|
|
5218
|
-
*
|
|
5219
|
-
*
|
|
5255
|
+
* Recorded as upstream EVIDENCE beside an out-of-credit outcome, and nothing
|
|
5256
|
+
* more. It is deliberately NOT a "when can I use this again" answer: check-in
|
|
5257
|
+
* and top-ups replenish credits whenever they land, so this timestamp is a
|
|
5258
|
+
* package fact rather than the earliest recovery, and the pool must not release
|
|
5259
|
+
* the account when it passes (see `exclusionOf`).
|
|
5220
5260
|
*/
|
|
5221
5261
|
quotaRefreshAtMs?(region: WorkBuddyRegion): number | undefined;
|
|
5222
5262
|
/**
|
|
@@ -5672,6 +5712,20 @@ interface WorkBuddyRegionState {
|
|
|
5672
5712
|
* decides to spend, so an upgrade must never hand out a spending capability.
|
|
5673
5713
|
*/
|
|
5674
5714
|
videoToolEnabled?: boolean;
|
|
5715
|
+
/**
|
|
5716
|
+
* Which text-to-image model this region generates with (issue #241).
|
|
5717
|
+
*
|
|
5718
|
+
* Absent or `''` means "no choice" — the tool takes the catalog's first model
|
|
5719
|
+
* for that tag, so a config predating this field keeps its exact behaviour.
|
|
5720
|
+
* Set to `hunyuan-image-v3.0` to get output WITHOUT the "AI生成 WORKBUDD>"
|
|
5721
|
+
* watermark, at ~11.1 credits/image instead of ~6 and with a smaller maximum
|
|
5722
|
+
* size (2048 px edge, 1,048,576 px total).
|
|
5723
|
+
*
|
|
5724
|
+
* A free id rather than an enum, deliberately: the watermark-free model is not
|
|
5725
|
+
* in the upstream catalog (it is the official CLI's hard-coded fallback), and
|
|
5726
|
+
* a stale pick must degrade to "no choice" rather than fail a generation.
|
|
5727
|
+
*/
|
|
5728
|
+
preferredImageModel?: string;
|
|
5675
5729
|
/**
|
|
5676
5730
|
* The video model the user pinned in the card, keyed by video tag
|
|
5677
5731
|
* (`text-to-video` / `image-to-video`), value is a model id from this
|
|
@@ -6040,10 +6094,13 @@ interface Config {
|
|
|
6040
6094
|
*
|
|
6041
6095
|
* When a session moves between providers, `dsh-llm-pi-ai` rebuilds the other
|
|
6042
6096
|
* provider's assistant turns with `api: 'dsh-foreign'`, and pi-ai's
|
|
6043
|
-
* `isSameModel` then fails — so it
|
|
6044
|
-
*
|
|
6045
|
-
*
|
|
6046
|
-
*
|
|
6097
|
+
* `isSameModel` then fails — so up to pi-ai 1.2 it did not DROP their
|
|
6098
|
+
* `thinking` blocks, it rewrote each one to plain `text`. The other model's
|
|
6099
|
+
* working notes therefore arrived as this turn's answer, and the model copied
|
|
6100
|
+
* that shape on every later turn. (pi-ai 1.3 discards such a block instead,
|
|
6101
|
+
* which is the same outcome this switch produces — see the note on
|
|
6102
|
+
* `dropForeignThinking` in `adapter.ts` for why the repair still runs
|
|
6103
|
+
* unconditionally.)
|
|
6047
6104
|
*
|
|
6048
6105
|
* On, those blocks are removed from the request instead: they carry no
|
|
6049
6106
|
* `thinkingSignature` (the host builds them without one), so they could never
|