fix: app should refresh local provider models list on launch (#5868)

This commit is contained in:
Louis 2025-07-23 08:36:09 +07:00 committed by GitHub
parent fe95031c6e
commit 3e30c61fb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View File

@ -4,8 +4,8 @@ You are going to test the Jan application by downloading and chatting with a mod
Step-by-step instructions:
1. Given the Jan application is already opened.
2. In the **bottom-left corner**, click the **Hub** menu item.
3. Scroll through the model list or use the search bar to find **bitcpm4**.
4. Click **Use** on the bitcpm4 model.
3. Scroll through the model list or use the search bar to find **qwen3-0.6B**.
4. Click **Use** on the qwen3-0.6B model.
5. Wait for the model to finish downloading and become ready.
6. Once redirected to the chat screen, type any message into the input box (e.g. `Hello World`).
7. Press **Enter** to send the message.

View File

@ -72,7 +72,7 @@ export const useModelProvider = create<ModelProviderState>()(
]
return {
...provider,
models: mergedModels,
models: provider.persist ? provider?.models : mergedModels,
settings: provider.settings.map((setting) => {
const existingSetting = provider.persist
? undefined

View File

@ -39,7 +39,7 @@ type ModelProps = {
type SearchParams = {
repo: string
}
const defaultModelQuantizations = ['iq4_xs.gguf', 'q4_k_m.gguf']
const defaultModelQuantizations = ['iq4_xs', 'q4_k_m']
export const Route = createFileRoute(route.hub.index as any)({
component: Hub,

View File

@ -21,6 +21,7 @@ export const getProviders = async (): Promise<ModelProvider[]> => {
if (Array.isArray(builtInModels))
models = builtInModels.map((model) => {
const modelManifest = models.find((e) => e.id === model)
// TODO: Check chat_template for tool call support
const capabilities = [
ModelCapabilities.COMPLETION,
(