Skip to content

fix: resolve downloaded model toggle bug by handling developer prefix#7648

Merged
louis-jan merged 2 commits into
janhq:mainfrom
jamesdam:fix/downloaded-models-filter
Mar 18, 2026
Merged

fix: resolve downloaded model toggle bug by handling developer prefix#7648
louis-jan merged 2 commits into
janhq:mainfrom
jamesdam:fix/downloaded-models-filter

Conversation

@jamesdam

@jamesdam jamesdam commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Describe Your Changes

Fix the downloaded model toggle on the Hub page not showing downloaded models.

Root cause: The filter was comparing catalog variant IDs (without developer prefix) against downloaded model IDs (with developer prefix like janhq/), causing all comparisons to fail.

Fix: Updated the filter to check both direct match and with developer prefix, matching the pattern already used in DownloadButton.tsx.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@jamesdam

jamesdam commented Mar 7, 2026

Copy link
Copy Markdown
Contributor Author

The CONTRIBUTING.md mentions targeting dev branch for PRs, but this branch doesn't exist, btw.

@jamesdam

jamesdam commented Mar 7, 2026

Copy link
Copy Markdown
Contributor Author

After the fix, the downloaded model appears.

Screenshot 2026-03-07 at 11 05 57 AM

However clicking the new chat button doesn't auto-select the correct model.

Screenshot 2026-03-07 at 11 10 39 AM

Clicking on the model card doesn't show any variants as downloaded

Screenshot 2026-03-07 at 11 05 49 AM

Let's me know if this need to be fixed in this PR as well. Cheers.

louis-jan
louis-jan previously approved these changes Mar 7, 2026

@louis-jan louis-jan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will do a check then merge

@louis-jan

Copy link
Copy Markdown
Contributor

@jamesdam it would be great to have model auto selected

When clicking "new chat" from a downloaded model, use the actual
downloaded model ID (with or without developer prefix) instead of
just the variant.model_id. This ensures the model is correctly
selected in the dropdown when the chat page loads.
@jamesdam

jamesdam commented Mar 8, 2026

Copy link
Copy Markdown
Contributor Author

@louis-jan thanks for reviewing. I attempted to fix the auto-select issue. It works for me locally, but hope you can take a deeper look too (I am very new to the codebase)

@louis-jan

Copy link
Copy Markdown
Contributor

@jamesdam can you help me rebase main and consolidate the model ID fix? I think @urmauur did try to fix it too on the release branch hence it's merged before this branch.

@louis-jan louis-jan added the needs: comms Major issue - we should inform users label Mar 12, 2026
@louis-jan louis-jan merged commit 32e9b21 into janhq:main Mar 18, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this to QA in Jan Mar 18, 2026
@urmauur

urmauur commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

@jamesdam @louis-jan the auto select model is works!

Screen.Recording.2026-03-18.at.15.02.35.mp4

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

Labels

needs: comms Major issue - we should inform users

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

bug: Downloaded model toggle on Hub page doesn't show downloaded models

3 participants