Skip to content

Commit 3e30c61

Browse files
authored
fix: app should refresh local provider models list on launch (#5868)
1 parent fe95031 commit 3e30c61

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

autoqa/tests/new-user/1-user-start-chatting.txt

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

web-app/src/hooks/useModelProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const useModelProvider = create<ModelProviderState>()(
7272
]
7373
return {
7474
...provider,
75-
models: mergedModels,
75+
models: provider.persist ? provider?.models : mergedModels,
7676
settings: provider.settings.map((setting) => {
7777
const existingSetting = provider.persist
7878
? undefined

web-app/src/routes/hub/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type ModelProps = {
3939
type SearchParams = {
4040
repo: string
4141
}
42-
const defaultModelQuantizations = ['iq4_xs.gguf', 'q4_k_m.gguf']
42+
const defaultModelQuantizations = ['iq4_xs', 'q4_k_m']
4343

4444
export const Route = createFileRoute(route.hub.index as any)({
4545
component: Hub,

web-app/src/services/providers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const getProviders = async (): Promise<ModelProvider[]> => {
2121
if (Array.isArray(builtInModels))
2222
models = builtInModels.map((model) => {
2323
const modelManifest = models.find((e) => e.id === model)
24+
// TODO: Check chat_template for tool call support
2425
const capabilities = [
2526
ModelCapabilities.COMPLETION,
2627
(

0 commit comments

Comments
 (0)