/** * @file web/src/components/launch/IncompatibleFallbackModal.jsx * @description Web equivalent of the TUI incompatible-fallback overlay. Lets the * user switch to a compatible endpoint target or install a similar model endpoint. * * @functions IncompatibleFallbackModal → switch-tool and similar-model picker * @exports IncompatibleFallbackModal */ import { IconAlertTriangle, IconPlugConnected, IconTool, IconX } from '@tabler/icons-react' import { findSimilarCompatibleModels, getCompatibleTools, getToolMeta, } from '../../../../src/core/tool-metadata.js' import styles from './LaunchModal.module.css' export default function IncompatibleFallbackModal({ request, models = [], onClose, onSwitchToolLaunch, onLaunchSimilar }) { if (!request?.model) return null const { model, toolMode } = request const activeMeta = getToolMeta(toolMode) const compatibleTools = getCompatibleTools(model.providerKey) const similar = findSimilarCompatibleModels(model.sweScore, toolMode, models, 3) .filter((candidate) => candidate.modelId !== model.modelId || candidate.providerKey !== model.providerKey) return (
event.stopPropagation()}>

Incompatible model

{model.label} cannot be installed in {activeMeta.emoji} {activeMeta.label}

Switch tool

This provider can be configured in these tools. Pick one and FCM installs the endpoint.

{compatibleTools.map((mode) => { const meta = getToolMeta(mode) return ( ) })}

Similar models

Or keep {activeMeta.label} and install a compatible model close to the same SWE score.

{similar.length === 0 &&

No close compatible alternative found yet.

} {similar.map((candidate) => ( ))}
) }