Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

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

Louis3e30c61fb03b
diff --git a/autoqa/tests/new-user/1-user-start-chatting.txt b/autoqa/tests/new-user/1-user-start-chatting.txt
index 704a90451..5fc5e7f3f 100644
--- a/autoqa/tests/new-user/1-user-start-chatting.txt
+++ b/autoqa/tests/new-user/1-user-start-chatting.txt
@@ -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.
diff --git a/web-app/src/hooks/useModelProvider.ts b/web-app/src/hooks/useModelProvider.ts
index 669bbfd88..5d32565c1 100644
--- a/web-app/src/hooks/useModelProvider.ts
+++ b/web-app/src/hooks/useModelProvider.ts
@@ -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
diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsx
index e45bb476d..845dbcccb 100644
--- a/web-app/src/routes/hub/index.tsx
+++ b/web-app/src/routes/hub/index.tsx
@@ -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,
diff --git a/web-app/src/services/providers.ts b/web-app/src/services/providers.ts
index a57df0a9c..4c73cf754 100644
--- a/web-app/src/services/providers.ts
+++ b/web-app/src/services/providers.ts
@@ -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,
(