

























@@ -50,8 +50,8 @@ export type PluginManifestModelCatalogStatus = "available" | "preview" | "deprec
5050export type PluginManifestModelCatalogTieredCost = {
5151input: number;
5252output: number;
53-cacheRead?: number;
54-cacheWrite?: number;
53+cacheRead: number;
54+cacheWrite: number;
5555range: [number, number] | [number];
5656};
5757@@ -432,9 +432,9 @@ function normalizeStringMap(value: unknown): Record<string, string> | undefined
432432const normalized: Record<string, string> = {};
433433for (const [rawKey, rawValue] of Object.entries(value)) {
434434const key = normalizeSafeRecordKey(rawKey);
435-const value = normalizeOptionalString(rawValue) ?? "";
436-if (key && value) {
437-normalized[key] = value;
435+const strValue = normalizeOptionalString(rawValue) ?? "";
436+if (key && strValue) {
437+normalized[key] = strValue;
438438}
439439}
440440return Object.keys(normalized).length > 0 ? normalized : undefined;
@@ -728,15 +728,17 @@ function normalizeModelCatalogTieredCost(
728728) {
729729continue;
730730}
731-const rangeValues = entry.range
732-.map((rangeValue) => normalizeModelCatalogNumber(rangeValue))
733-.filter((rangeValue): rangeValue is number => rangeValue !== undefined);
731+if (entry.range.length < 1 || entry.range.length > 2) {
732+continue;
733+}
734+const rangeValues = entry.range.map((rangeValue) => normalizeModelCatalogNumber(rangeValue));
735+if (rangeValues.some((rangeValue) => rangeValue === undefined)) {
736+continue;
737+}
734738const range =
735739rangeValues.length === 1
736740 ? ([rangeValues[0]] as [number])
737- : rangeValues.length >= 2
738- ? ([rangeValues[0], rangeValues[1]] as [number, number])
739- : undefined;
741+ : ([rangeValues[0], rangeValues[1]] as [number, number]);
740742if (!range) {
741743continue;
742744}
@@ -807,6 +809,7 @@ function normalizeModelCatalogCompat(value: unknown): ModelCompatConfig | undefi
807809808810const stringListFields = [
809811"visibleReasoningDetailTypes",
812+"supportedReasoningEfforts",
810813"unsupportedToolSchemaKeywords",
811814] as const;
812815for (const field of stringListFields) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。