From 6b0dd3c4e9e41824f12aa259e647dbfcf0275091 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 27 May 2026 23:08:11 +0800 Subject: [PATCH] fix(omo): sync recommended models with upstream and improve Fill Recommended feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Fill Recommended button was misleading — it showed toast.success even when most slots couldn't be filled due to model ID mismatches with the user's configured providers. Changes: - Sync OMO_BUILTIN_AGENTS/CATEGORIES recommended fields with upstream oh-my-openagent model-requirements (gpt-5.4→5.5, kimi-k2.5→claude-sonnet-4-6, etc.) - Add toast.warning tier when unmatched >= filled, showing slot:model pairs (e.g. "Sisyphus: claude-opus-4-7") so users know exactly what to configure - Upgrade fillRecommendedNoMatch to also show examples - Add fillRecommendedMostlyUnmatched i18n key (zh/en/ja/zh-TW) --- .../providers/forms/OmoFormFields.tsx | 30 +++++++++++++++++-- src/i18n/locales/en.json | 3 +- src/i18n/locales/ja.json | 3 +- src/i18n/locales/zh-TW.json | 3 +- src/i18n/locales/zh.json | 3 +- src/types/omo.ts | 29 +++++++++--------- 6 files changed, 51 insertions(+), 20 deletions(-) diff --git a/src/components/providers/forms/OmoFormFields.tsx b/src/components/providers/forms/OmoFormFields.tsx index c1a316515..7702f9a9d 100644 --- a/src/components/providers/forms/OmoFormFields.tsx +++ b/src/components/providers/forms/OmoFormFields.tsx @@ -725,12 +725,19 @@ export function OmoFormFields({ let filledCount = 0; let alreadySetCount = 0; let unmatchedCount = 0; + const unmatchedExamples: string[] = []; + + const formatExample = (display: string, recommended?: string) => + recommended ? `${display}: ${recommended}` : display; const updatedAgents = { ...agents }; for (const agentDef of builtinAgentDefs) { const recommendedValue = resolveRecommendedModel(agentDef.recommended); if (!recommendedValue) { unmatchedCount++; + unmatchedExamples.push( + formatExample(agentDef.display, agentDef.recommended), + ); } else if (updatedAgents[agentDef.key]?.model) { alreadySetCount++; } else { @@ -749,6 +756,9 @@ export function OmoFormFields({ const recommendedValue = resolveRecommendedModel(catDef.recommended); if (!recommendedValue) { unmatchedCount++; + unmatchedExamples.push( + formatExample(catDef.display, catDef.recommended), + ); } else if (updatedCategories[catDef.key]?.model) { alreadySetCount++; } else { @@ -762,6 +772,10 @@ export function OmoFormFields({ onCategoriesChange(updatedCategories); } + const exampleNames = unmatchedExamples.slice(0, 3).join(", "); + const examples = + unmatchedExamples.length > 3 ? `${exampleNames}…` : exampleNames; + if (filledCount > 0 && unmatchedCount === 0) { toast.success( t("omo.fillRecommendedSuccess", { @@ -769,7 +783,7 @@ export function OmoFormFields({ count: filledCount, }), ); - } else if (filledCount > 0 && unmatchedCount > 0) { + } else if (filledCount > unmatchedCount) { toast.success( t("omo.fillRecommendedPartial", { defaultValue: @@ -778,6 +792,16 @@ export function OmoFormFields({ unmatched: unmatchedCount, }), ); + } else if (filledCount > 0) { + toast.warning( + t("omo.fillRecommendedMostlyUnmatched", { + defaultValue: + "Filled only {{filled}}, {{unmatched}} unmatched (e.g. {{examples}}). Configure providers offering these models or pick a substitute.", + filled: filledCount, + unmatched: unmatchedCount, + examples, + }), + ); } else if (alreadySetCount > 0 && unmatchedCount === 0) { toast.info( t("omo.fillRecommendedAllSet", { @@ -787,7 +811,9 @@ export function OmoFormFields({ } else { toast.warning( t("omo.fillRecommendedNoMatch", { - defaultValue: "Recommended models not found in configured providers", + defaultValue: + "Recommended models not found in configured providers (e.g. {{examples}})", + examples, }), ); } diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 8dfdb5a70..0919e41c7 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -2542,8 +2542,9 @@ "fillRecommended": "Fill Recommended", "fillRecommendedSuccess": "Filled {{count}} recommended models", "fillRecommendedPartial": "Filled {{filled}} recommended models, {{unmatched}} unmatched", + "fillRecommendedMostlyUnmatched": "Filled only {{filled}}, {{unmatched}} unmatched (e.g. {{examples}}). Configure providers offering these models or pick a substitute.", "fillRecommendedAllSet": "All slots already have models configured", - "fillRecommendedNoMatch": "Recommended models not found in configured providers", + "fillRecommendedNoMatch": "Recommended models not found in configured providers (e.g. {{examples}})", "configSummary": "{{agents}} agents, {{categories}} categories configured · Click ⚙ for advanced params", "enabledModelsCount": "{{count}} configured models available", "source": "from:", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 087551def..6dec87961 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -2542,8 +2542,9 @@ "fillRecommended": "推奨を入力", "fillRecommendedSuccess": "推奨モデル {{count}} 件を設定しました", "fillRecommendedPartial": "推奨モデル {{filled}} 件を設定、{{unmatched}} 件は未一致", + "fillRecommendedMostlyUnmatched": "{{filled}} 件のみ設定、{{unmatched}} 件は未一致(例: {{examples}})。これらのモデルを提供するプロバイダーを設定するか、代替を選択してください。", "fillRecommendedAllSet": "すべてのスロットにモデルが設定済みです", - "fillRecommendedNoMatch": "推奨モデルが設定済みプロバイダーに見つかりませんでした", + "fillRecommendedNoMatch": "推奨モデルが設定済みプロバイダーに見つかりませんでした(例: {{examples}})", "configSummary": "{{agents}} 個の Agent、{{categories}} 個の Category を設定済み · ⚙ で詳細を展開", "enabledModelsCount": "設定済みモデル {{count}} 件", "source": "出典:", diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index 8b70c0ebe..0f3a04068 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -2488,8 +2488,9 @@ "fillRecommended": "填入推薦", "fillRecommendedSuccess": "已填入 {{count}} 個推薦模型", "fillRecommendedPartial": "已填入 {{filled}} 個推薦模型,{{unmatched}} 個未比對成功", + "fillRecommendedMostlyUnmatched": "僅填入 {{filled}} 個,{{unmatched}} 個未比對成功(如 {{examples}})。請設定提供這些模型的供應商,或手動選擇替代項。", "fillRecommendedAllSet": "所有槽位已有模型設定", - "fillRecommendedNoMatch": "推薦模型在已設定的供應商中未找到相符項目", + "fillRecommendedNoMatch": "推薦模型在已設定的供應商中未找到相符項目(如 {{examples}})", "configSummary": "已設定 {{agents}} 個 Agent,{{categories}} 個 Category · 點擊 ⚙ 展開進階參數", "enabledModelsCount": "可選已設定模型 {{count}} 個", "source": "來源:", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index ba01d5f56..da304dfce 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -2542,8 +2542,9 @@ "fillRecommended": "填充推荐", "fillRecommendedSuccess": "已填充 {{count}} 个推荐模型", "fillRecommendedPartial": "已填充 {{filled}} 个推荐模型,{{unmatched}} 个未匹配", + "fillRecommendedMostlyUnmatched": "仅填充了 {{filled}} 个,{{unmatched}} 个未匹配(如 {{examples}})。请配置提供这些模型的供应商,或手动选择替代项。", "fillRecommendedAllSet": "所有槽位已有模型配置", - "fillRecommendedNoMatch": "推荐模型在已配置的供应商中未找到匹配", + "fillRecommendedNoMatch": "推荐模型在已配置的供应商中未找到匹配(如 {{examples}})", "configSummary": "已配置 {{agents}} 个 Agent,{{categories}} 个 Category · 点击 ⚙ 展开高级参数", "enabledModelsCount": "可选已配置模型 {{count}} 个", "source": "来源:", diff --git a/src/types/omo.ts b/src/types/omo.ts index 665306c88..d516339c7 100644 --- a/src/types/omo.ts +++ b/src/types/omo.ts @@ -37,7 +37,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Hephaestus", descKey: "omo.agentDesc.hephaestus", tooltipKey: "omo.agentTooltip.hephaestus", - recommended: "gpt-5.4", + recommended: "gpt-5.5", group: "main", }, { @@ -53,7 +53,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Atlas", descKey: "omo.agentDesc.atlas", tooltipKey: "omo.agentTooltip.atlas", - recommended: "kimi-k2.5", + recommended: "claude-sonnet-4-6", group: "main", }, { @@ -61,7 +61,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Oracle", descKey: "omo.agentDesc.oracle", tooltipKey: "omo.agentTooltip.oracle", - recommended: "gpt-5.4", + recommended: "gpt-5.5", group: "sub", }, { @@ -69,7 +69,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Librarian", descKey: "omo.agentDesc.librarian", tooltipKey: "omo.agentTooltip.librarian", - recommended: "gemini-3-flash", + recommended: "gpt-5.4-mini-fast", group: "sub", }, { @@ -77,7 +77,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Explore", descKey: "omo.agentDesc.explore", tooltipKey: "omo.agentTooltip.explore", - recommended: "grok-code-fast-1", + recommended: "gpt-5.4-mini-fast", group: "sub", }, { @@ -85,7 +85,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Multimodal-Looker", descKey: "omo.agentDesc.multimodalLooker", tooltipKey: "omo.agentTooltip.multimodalLooker", - recommended: "kimi-k2.5", + recommended: "gpt-5.5", group: "sub", }, { @@ -93,7 +93,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Metis", descKey: "omo.agentDesc.metis", tooltipKey: "omo.agentTooltip.metis", - recommended: "claude-opus-4-7", + recommended: "claude-sonnet-4-6", group: "sub", }, { @@ -101,7 +101,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Momus", descKey: "omo.agentDesc.momus", tooltipKey: "omo.agentTooltip.momus", - recommended: "gpt-5.4", + recommended: "gpt-5.5", group: "sub", }, { @@ -109,6 +109,7 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [ display: "Sisyphus-Junior", descKey: "omo.agentDesc.sisyphusJunior", tooltipKey: "omo.agentTooltip.sisyphusJunior", + recommended: "claude-sonnet-4-6", group: "sub", }, ]; @@ -119,35 +120,35 @@ export const OMO_BUILTIN_CATEGORIES: OmoCategoryDef[] = [ display: "Visual Engineering", descKey: "omo.categoryDesc.visualEngineering", tooltipKey: "omo.categoryTooltip.visualEngineering", - recommended: "gemini-3-pro", + recommended: "gemini-3.1-pro", }, { key: "ultrabrain", display: "Ultrabrain", descKey: "omo.categoryDesc.ultrabrain", tooltipKey: "omo.categoryTooltip.ultrabrain", - recommended: "gpt-5.4", + recommended: "gpt-5.5", }, { key: "deep", display: "Deep", descKey: "omo.categoryDesc.deep", tooltipKey: "omo.categoryTooltip.deep", - recommended: "gpt-5.4", + recommended: "gpt-5.5", }, { key: "artistry", display: "Artistry", descKey: "omo.categoryDesc.artistry", tooltipKey: "omo.categoryTooltip.artistry", - recommended: "gemini-3-pro", + recommended: "gemini-3.1-pro", }, { key: "quick", display: "Quick", descKey: "omo.categoryDesc.quick", tooltipKey: "omo.categoryTooltip.quick", - recommended: "claude-haiku-4-5", + recommended: "gpt-5.4-mini", }, { key: "unspecified-low", @@ -168,7 +169,7 @@ export const OMO_BUILTIN_CATEGORIES: OmoCategoryDef[] = [ display: "Writing", descKey: "omo.categoryDesc.writing", tooltipKey: "omo.categoryTooltip.writing", - recommended: "gemini-3-flash", + recommended: "k2p5", }, ];