Skip to content

fix(dashboard): show a warning, not success, when model import fell back to the local catalog - #15169

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.52from
shipsfromrio:fix/model-import-local-catalog-warning
Oct 8, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.52from
shipsfromrio:fix/model-import-local-catalog-warning

Conversation

@shipsfromrio

Copy link
Copy Markdown
Contributor

Problem

When the model import falls back to the local catalog (the provider's /models endpoint was unreachable) and every model in that catalog is already registered, the import modal ends in the success state with "No new models to import". The user reads that as "the provider's list was checked and nothing is new", while the provider was never reached.

Closes #15069

Fix

  • resolveNoNewModelsPhase() (pure, in modelImportWarning.ts) returns "warning" when the response carries the fallback warning and "done" only when the remote catalog was actually fetched.
  • useModelImportHandlers.ts uses it in the zero-new-models branch; ImportProgress.phase gains "warning".
  • ImportProgressModal.tsx and ProviderModalsPanel.tsx treat "warning" as a terminal phase (warning icon, close buttons, close handling), so the modal can't get stuck.
  • New i18n key providers.localCatalogFallbackStatus, added to every locale file.

Tests

tests/unit/model-import-fallback-status.test.ts (7 cases): the fallback-with-no-new-models path fails without the fix (it returned "done"), plus the helper cases and a check that the new key exists in en.json.

shipsfromrio and others added 3 commits September 30, 2026 01:51
…thor

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
# Conflicts:
#	src/app/(dashboard)/dashboard/providers/[id]/hooks/modelImportWarning.ts
#	src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelImportHandlers.ts
@diegosouzapw
diegosouzapw merged commit 0548149 into diegosouzapw:release/v3.8.52 Oct 8, 2026
27 of 51 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @shipsfromrio — merged into release/v3.8.52; it ships in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: model import reports 'All models already imported' as success when discovery fell back to the local catalog

2 participants