From 4e8c7d46f61200d7ccc1964900daa6831a023d13 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Fri, 13 Feb 2026 18:44:35 -0800 Subject: [PATCH] Cleanup: remove ems --- src/common/stores/llms/llms.parameters.ts | 2 +- src/common/stores/llms/llms.pricing.ts | 4 ++-- src/common/stores/llms/store-llms.ts | 2 +- src/modules/llms/components/LLMVendorIconSprite.tsx | 12 ++++++------ .../llms/server/anthropic/anthropic.models.ts | 2 +- .../llms/server/openai/models/openai.models.ts | 2 +- .../llms/vendors/anthropic/AnthropicServiceSetup.tsx | 2 +- src/server/trpc/trpc.fetchers.retrier.ts | 10 +++++----- .../gen-icon-sprites/VendorIconSprite.template.tsx | 10 +++++----- .../develop/gen-icon-sprites/generate-llm-sprites.ts | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/common/stores/llms/llms.parameters.ts b/src/common/stores/llms/llms.parameters.ts index 6b06bc632..8bfff1baf 100644 --- a/src/common/stores/llms/llms.parameters.ts +++ b/src/common/stores/llms/llms.parameters.ts @@ -69,7 +69,7 @@ interface _EnumParamDef extends _ParamDefBase { readonly enumPriceMultiplier?: { readonly [k in NoInfer]?: number }; } -/** Zero-cost identity function — TS infers V from `values` only: NoInfer constrains fallback/initial. */ +/** Zero-cost identity function - TS infers V from `values` only: NoInfer constrains fallback/initial. */ function _enumDef(def: _EnumParamDef): _EnumParamDef { return def; } diff --git a/src/common/stores/llms/llms.pricing.ts b/src/common/stores/llms/llms.pricing.ts index a69ffeecc..47968186a 100644 --- a/src/common/stores/llms/llms.pricing.ts +++ b/src/common/stores/llms/llms.pricing.ts @@ -88,7 +88,7 @@ export function getLlmCostForTokens(tierTokens: number, tokens: number, pricing: } -/// Adjusted Chat Pricing — applies registry-defined price multipliers for active enum parameters +/// Adjusted Chat Pricing - applies registry-defined price multipliers for active enum parameters /** * Returns the effective chat pricing for a model, adjusted for active parameter-based @@ -131,7 +131,7 @@ export function llmChatPricing_adjusted(llm: DLLM | null): DPricingChatGenerate * Scans parameterSpecs for enum parameters with enumPriceMultiplier in the registry. * For each, resolves the effective value (user > initial) and if it matches a multiplier key, accumulates it. * - * Note: does NOT consult `requiredFallback` — any enum with enumPriceMultiplier must have its + * Note: does NOT consult `requiredFallback` - any enum with enumPriceMultiplier must have its * effective default in initialParameters (via spec or registry `initialValue`). */ function _computePriceMultiplier(parameterSpecs: DModelParameterSpecAny[], initialParameters: DModelParameterValues | undefined, userParameters: DModelParameterValues | undefined): number { diff --git a/src/common/stores/llms/store-llms.ts b/src/common/stores/llms/store-llms.ts index f2eaeb7d2..e169e1b36 100644 --- a/src/common/stores/llms/store-llms.ts +++ b/src/common/stores/llms/store-llms.ts @@ -140,7 +140,7 @@ export const useModelsStore = create()(persist( // NOTE: no range validation for integer/float types yet. If added, be aware that // llmVndAntThinkingBudget uses initialValue: -1 (out of range [1024, 65536]) as a - // sentinel for adaptive thinking mode on hidden params — range checks must skip hidden params. + // sentinel for adaptive thinking mode on hidden params - range checks must skip hidden params. } } diff --git a/src/modules/llms/components/LLMVendorIconSprite.tsx b/src/modules/llms/components/LLMVendorIconSprite.tsx index b13c0059f..cabd0fce4 100644 --- a/src/modules/llms/components/LLMVendorIconSprite.tsx +++ b/src/modules/llms/components/LLMVendorIconSprite.tsx @@ -1,5 +1,5 @@ /** - * AUTO-GENERATED — do not edit the symbol definitions or VI entries manually. + * AUTO-GENERATED - do not edit the symbol definitions or VI entries manually. * Source of truth: individual vendor icon files in src/modules/llms/components/ * * Regenerate: npm run gen:icon-sprites @@ -10,8 +10,8 @@ import type { ModelVendorId } from '../vendors/vendors.registry'; import { PhRobot } from '~/common/components/icons/phosphor/PhRobot'; -// Symbol IDs for each vendor — generated from the vendor registry -const VI: Record & { zai: string } = { +// Symbol IDs for each vendor - generated from the vendor registry +const VI: Record = { alibaba: 'vi-alibaba', anthropic: 'vi-anthropic', azure: 'vi-azure', @@ -35,7 +35,7 @@ const VI: Record & { zai: string } = { /** * Memoized SVG sprite with all vendor icon `` definitions. - * Mount once in the app root (ProviderTheming) — all `` references resolve from here. + * Mount once in the app root (ProviderTheming) - all `` references resolve from here. * * Joy's SvgIcon sets CSS `fill: currentColor` which overrides `fill='none'` props. To match, * all `` wrappers use `fill='currentColor'`. Paths with explicit `fill='none'` still override. @@ -236,7 +236,7 @@ const _spriteContainerSx: React.CSSProperties = { position: 'absolute', width: 0 /** * Lightweight vendor icon using SVG sprite ``. - * Near-zero per-instance cost — no Emotion/styled-components. + * Near-zero per-instance cost - no Emotion/styled-components. * * Uses Joy's CSS custom properties (--Icon-fontSize, --Icon-margin, --Icon-color) * so parent components (ListItemDecorator, etc.) control sizing automatically. @@ -271,7 +271,7 @@ export function LLMVendorIconSprite({ vendorId /*, sx, className*/ }: { ); } -// Matches Joy's SvgIcon base styles — uses the same CSS custom properties +// Matches Joy's SvgIcon base styles - uses the same CSS custom properties // const _lwBaseSx: React.CSSProperties = { // width: '1em', // height: '1em', diff --git a/src/modules/llms/server/anthropic/anthropic.models.ts b/src/modules/llms/server/anthropic/anthropic.models.ts index b1efe5627..38b019b46 100644 --- a/src/modules/llms/server/anthropic/anthropic.models.ts +++ b/src/modules/llms/server/anthropic/anthropic.models.ts @@ -399,6 +399,6 @@ export function llmOrtAntLookup_ThinkingVariants(orModelName: string): OrtVendor ?.filter((spec) => _ORT_ANT_PARAM_ALLOWLIST.has(spec.paramId)) .map((spec) => ({ ...spec })); - // initialTemperature: not set — Anthropic models use the global fallback (0.5) + // initialTemperature: not set - Anthropic models use the global fallback (0.5) return { interfaces, parameterSpecs }; } diff --git a/src/modules/llms/server/openai/models/openai.models.ts b/src/modules/llms/server/openai/models/openai.models.ts index ef9c59589..d2048da8c 100644 --- a/src/modules/llms/server/openai/models/openai.models.ts +++ b/src/modules/llms/server/openai/models/openai.models.ts @@ -1276,7 +1276,7 @@ export function llmOrtOaiLookup(orModelName: string): OrtVendorLookupResult | un ?.filter(spec => _ORT_OAI_PARAM_ALLOWLIST.has(spec.paramId)) .map(spec => ({ ...spec })); - // initialTemperature: not set — OpenAI models use the global fallback (0.5); + // initialTemperature: not set - OpenAI models use the global fallback (0.5); // NoTemperature models are handled client-side via LLM_IF_HOTFIX_NoTemperature (not propagated to OR) return { interfaces, parameterSpecs }; } diff --git a/src/modules/llms/vendors/anthropic/AnthropicServiceSetup.tsx b/src/modules/llms/vendors/anthropic/AnthropicServiceSetup.tsx index 7798b77ae..78a346b45 100644 --- a/src/modules/llms/vendors/anthropic/AnthropicServiceSetup.tsx +++ b/src/modules/llms/vendors/anthropic/AnthropicServiceSetup.tsx @@ -108,7 +108,7 @@ export function AnthropicServiceSetup(props: { serviceId: DModelsServiceId }) { {(showAdvanced || !!anthropicInferenceGeo) && updateSettings({ inferenceGeoUS: on })} diff --git a/src/server/trpc/trpc.fetchers.retrier.ts b/src/server/trpc/trpc.fetchers.retrier.ts index f1667a836..05114b7f4 100644 --- a/src/server/trpc/trpc.fetchers.retrier.ts +++ b/src/server/trpc/trpc.fetchers.retrier.ts @@ -24,18 +24,18 @@ const RETRY_PROFILES = { type RetryProfile = typeof RETRY_PROFILES[keyof typeof RETRY_PROFILES]; /** - * 429 errors matching these patterns are NOT retried — they indicate permanent + * 429 errors matching these patterns are NOT retried - they indicate permanent * conditions (billing, quota, access) that won't resolve on their own. * Tested against the full TRPCFetcherError.message (which includes the module prefix). */ const _429_RETRY_DENYLIST: { test: string | RegExp; label: string }[] = [ - // Quota/billing exhausted — user needs to add credits or upgrade plan + // Quota/billing exhausted - user needs to add credits or upgrade plan { test: /quota|billing/i, label: 'quota/billing' }, - // [OpenAI] Request too large for model's TPM limit — e.g. "Request too large for o3 ... Limit 30000, Requested 56108" + // [OpenAI] Request too large for model's TPM limit - e.g. "Request too large for o3 ... Limit 30000, Requested 56108" { test: /request too large|limit \d+, requested \d+/i, label: 'request-too-large' }, - // [Anthropic research preview] Zero rate limit — org doesn't have access to the model + // [Anthropic research preview] Zero rate limit - org doesn't have access to the model { test: 'rate limit of 0 input tokens per minute', label: 'zero-rate-limit (no model access)' }, - // [Z.ai] Insufficient balance — prepaid credits exhausted + // [Z.ai] Insufficient balance - prepaid credits exhausted { test: 'Insufficient balance or no resource package', label: 'insufficient-balance (Z.ai)' }, ]; diff --git a/tools/develop/gen-icon-sprites/VendorIconSprite.template.tsx b/tools/develop/gen-icon-sprites/VendorIconSprite.template.tsx index 8045a2123..9324c5388 100644 --- a/tools/develop/gen-icon-sprites/VendorIconSprite.template.tsx +++ b/tools/develop/gen-icon-sprites/VendorIconSprite.template.tsx @@ -1,5 +1,5 @@ // /** -// * AUTO-GENERATED — do not edit the symbol definitions or VI entries manually. +// * AUTO-GENERATED - do not edit the symbol definitions or VI entries manually. // * Source of truth: individual vendor icon files in src/modules/llms/components/ // * // * Regenerate: npm run gen:icon-sprites @@ -10,7 +10,7 @@ // // import { PhRobot } from '~/common/components/icons/phosphor/PhRobot'; // -// // Symbol IDs for each vendor — generated from the vendor registry +// // Symbol IDs for each vendor - generated from the vendor registry // const VI: Record = { // /* __GENERATED_VI_ENTRIES__ */ // } as const; @@ -18,7 +18,7 @@ // // /** // * Memoized SVG sprite with all vendor icon `` definitions. -// * Mount once in the app root (ProviderTheming) — all `` references resolve from here. +// * Mount once in the app root (ProviderTheming) - all `` references resolve from here. // * // * Joy's SvgIcon sets CSS `fill: currentColor` which overrides `fill='none'` props. To match, // * all `` wrappers use `fill='currentColor'`. Paths with explicit `fill='none'` still override. @@ -38,7 +38,7 @@ // // /** // * Lightweight vendor icon using SVG sprite ``. -// * Near-zero per-instance cost — no Emotion/styled-components. +// * Near-zero per-instance cost - no Emotion/styled-components. // * // * Uses Joy's CSS custom properties (--Icon-fontSize, --Icon-margin, --Icon-color) // * so parent components (ListItemDecorator, etc.) control sizing automatically. @@ -73,7 +73,7 @@ // ); // } // -// // Matches Joy's SvgIcon base styles — uses the same CSS custom properties +// // Matches Joy's SvgIcon base styles - uses the same CSS custom properties // // const _lwBaseSx: React.CSSProperties = { // // width: '1em', // // height: '1em', diff --git a/tools/develop/gen-icon-sprites/generate-llm-sprites.ts b/tools/develop/gen-icon-sprites/generate-llm-sprites.ts index 2be8ac9d1..d7fc151bb 100644 --- a/tools/develop/gen-icon-sprites/generate-llm-sprites.ts +++ b/tools/develop/gen-icon-sprites/generate-llm-sprites.ts @@ -145,7 +145,7 @@ function stripQuotes(s: string): string { // ── Step 4: Generate output by replacing template placeholders ──────────────── function generateFromTemplate(vendors: VendorEntry[], symbols: string[]): string { - // Template lines are prefixed with '// ' (or just '//') to avoid linter/tsc processing — strip them + // Template lines are prefixed with '// ' (or just '//') to avoid linter/tsc processing - strip them const template = readFileSync(TEMPLATE_FILE, 'utf-8') .split('\n').map(l => l.startsWith('// ') ? l.slice(3) : l === '//' ? '' : l).join('\n');