feat: add provider availability detection and normalize legacy "default" model IDs

This commit is contained in:
Mohamed Boudra
2026-02-12 18:04:21 +07:00
parent 8bdd083512
commit 117bbfe2f4
13 changed files with 487 additions and 43 deletions
@@ -785,6 +785,13 @@ export function DraftAgentScreen({
dispatch({ type: "DRAFT_SET_ERROR", message: "No host selected" });
throw new Error("No host selected");
}
if (providerDefinitions.length === 0) {
dispatch({
type: "DRAFT_SET_ERROR",
message: "No available providers on the selected host",
});
throw new Error("No available providers on the selected host");
}
if (gitBlockingError) {
dispatch({ type: "DRAFT_SET_ERROR", message: gitBlockingError });
throw new Error(gitBlockingError);
@@ -894,6 +901,7 @@ export function DraftAgentScreen({
isDirectoryNotExists,
isNonGitDirectory,
modeOptions,
providerDefinitions,
persistFormPreferences,
router,
selectedMode,