From 08b7d59ec88ef341ee39e4055126ffc8796d7274 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Thu, 19 Nov 2026 10:19:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=A1=AE=E5=9B=BE=E7=89=87=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E8=AE=A1=E7=AE=97=E5=87=BD=E6=95=B0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E7=A1=AC=E4=B8=8A=E9=99=90=E4=B8=8E=E8=BD=AF=E7=9B=AE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/experimental/cua/src/tool-registration.ts | 2 +- packages/llm/llm-deepseek/src/request-pricing.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/experimental/cua/src/tool-registration.ts b/packages/experimental/cua/src/tool-registration.ts index 84fe1bd10a..5ab7961065 100644 --- a/packages/experimental/cua/src/tool-registration.ts +++ b/packages/experimental/cua/src/tool-registration.ts @@ -54,7 +54,7 @@ declare module '@deepseek-ai/cordis' { * Project a configured screenshot target onto one stored image. * @param configured - Validated `screenshotTarget`. * @param image - Durable normalized screenshot. - * @returns The request target for that image: the long edge capped at the configured value, the configured byte budget. + * @returns Maximum screenshot dimensions, with the configured byte value as both the hard limit and the soft target. */ export function fixedScreenshotTarget(configured: CuaScreenshotTargetConfig, image: ImageAttachmentRef): ImageRequestTarget { return { diff --git a/packages/llm/llm-deepseek/src/request-pricing.ts b/packages/llm/llm-deepseek/src/request-pricing.ts index 8854a40470..35447b7827 100644 --- a/packages/llm/llm-deepseek/src/request-pricing.ts +++ b/packages/llm/llm-deepseek/src/request-pricing.ts @@ -42,13 +42,12 @@ export function resolveRequestImageTargetBytes(model: DeepSeekCatalogModel): num } /** - * Resolve the deterministic request target one DeepSeek model route chooses - * for one source image: the published token grid unless the model overrides - * it with a pixel budget, then the provider per-side limit, then the route's - * encoded-byte target. Small images are never enlarged. + * Resolve maximum request dimensions from the published token grid or the + * model's pixel budget, capped by the provider per-side limit. Small images + * are never enlarged. Byte limits remain separate from the dimension bounds. * @param model - Advertised model route and its optional image overrides. * @param source - intrinsic dimensions of the normalized attachment. - * @returns Complete request dimensions and encoded-byte target. + * @returns Maximum request dimensions, the fixed provider hard byte limit, and the model's soft encoded-byte target. * @internal */ export function resolveRequestImageTarget(