The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(ai): guard against unexpected source kinds in model selector\n\nThe model selector now explicitly checks for `cloud` kind before constructing a cloud configuration, returning `null` for any unrecognized source kind. This prevents runtime errors when the source kind is not one of the expected values, as the managed source is intentionally excluded from this component.\n\nAuto-committed-on: macbook\n
Steven Enamakel422358836822
diff --git a/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx b/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsxindex 0cbb28f5cc..1721144bc4 100644--- a/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx+++ b/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx@@ -109,7 +109,11 @@ export const GlobalOwnModelSelector = ({? ({ kind: 'local', model: model.trim() } as const): source.kind === 'claude-code'? ({ kind: 'claude-code', model: model.trim() } as const)- : ({ kind: 'cloud', providerSlug: source.providerSlug, model: model.trim() } as const);+ : // Managed is not offered by this card (`allowManaged={false}`), so+ // it can never be the source here; narrow rather than assume.+ source.kind === 'cloud'+ ? ({ kind: 'cloud', providerSlug: source.providerSlug, model: model.trim() } as const)+ : null;const isSaved =selectedRef !== null &&saved !== null &&@@ -140,7 +144,7 @@ export const GlobalOwnModelSelector = ({await onApply({ kind: 'local', model: nextModel.trim() }, vision);} else if (nextSource.kind === 'claude-code') {await onApply({ kind: 'claude-code', model: nextModel.trim() }, vision);- } else {+ } else if (nextSource.kind === 'cloud') {await onApply({ kind: 'cloud', providerSlug: nextSource.providerSlug, model: nextModel.trim() },vision