858 Commits

Author SHA1 Message Date
Dinh Long Nguyen
b5b6e1dc19
add mcp for web (#6411)
* add mcp for web

* update /jan/v1 endpoint to /v1

* update mise and makefile

* update yarn lock

* use mcp oauth properly
2025-09-12 12:14:10 +07:00
Faisal Amir
4293fe7edc fix: avoid error validate nested dom 2025-09-12 10:58:34 +07:00
Dinh Long Nguyen
db52057030
fix ollama error (#6418) 2025-09-11 18:38:06 +07:00
Faisal Amir
e709d200aa
Merge pull request #6416 from menloresearch/enhancement/experimental-label
enhancement: add label experimental for optimize setting
2025-09-11 16:12:35 +07:00
Dinh Long Nguyen
4856cfbfc4
bug: Deleted model file from imported models blocking model loading (#6317) (#6417) 2025-09-11 15:56:19 +07:00
Faisal Amir
19aa15ffcd chore: update return value 2025-09-11 15:51:21 +07:00
Akarshan
8f67f29317
feat: add support for mmproj offload setting
Expose the new `mmproj_offload` option in the model settings UI and include it in the `ModelPlan` type. The component now collects the offload flag (`result.offloadMmproj`) and queues it with other setting updates to ensure a single atomic change, preventing race conditions when toggling this feature. This enables users to control MMProj offloading directly from the app.
2025-09-11 13:08:01 +05:30
Faisal Amir
14c7fc0450 chore: update argument 2025-09-11 14:23:56 +07:00
Faisal Amir
198955285e
Merge pull request #6412 from menloresearch/fix/render-new-line
fix: render new line for user message
2025-09-11 13:29:18 +07:00
Faisal Amir
bc29046c06 enhancement: send params mmptoj_path for optimize setting 2025-09-11 13:23:25 +07:00
Faisal Amir
791563e6ba enhancement: add label experimental for optimize setting 2025-09-11 13:11:37 +07:00
Faisal Amir
6067ffe107
chore: fix conflict 2025-09-11 09:52:09 +05:30
Faisal Amir
cbd2651a63
chore: update copy and refresh list when import from local machine 2025-09-11 09:52:09 +05:30
Faisal Amir
ba4dc6d1eb
enhancement: update ui dialog update llamacpp backend 2025-09-11 09:52:09 +05:30
Akarshan Biswas
7a174e621a
feat: Smart model management (#6390)
* feat: Smart model management

* **New UI option** – `memory_util` added to `settings.json` with a dropdown (high / medium / low) to let users control how aggressively the engine uses system memory.
* **Configuration updates** – `LlamacppConfig` now includes `memory_util`; the extension class stores it in a new `memoryMode` property and handles updates through `updateConfig`.
* **System memory handling**
  * Introduced `SystemMemory` interface and `getTotalSystemMemory()` to report combined VRAM + RAM.
  * Added helper methods `getKVCachePerToken`, `getLayerSize`, and a new `ModelPlan` type.
* **Smart model‑load planner** – `planModelLoad()` computes:
  * Number of GPU layers that can fit in usable VRAM.
  * Maximum context length based on KV‑cache size and the selected memory utilization mode (high/medium/low).
  * Whether KV‑cache must be off‑loaded to CPU and the overall loading mode (GPU, Hybrid, CPU, Unsupported).
  * Detailed logging of the planning decision.
* **Improved support check** – `isModelSupported()` now:
  * Uses the combined VRAM/RAM totals from `getTotalSystemMemory()`.
  * Applies an 80% usable‑memory heuristic.
  * Returns **GREEN** only when both weights and KV‑cache fit in VRAM, **YELLOW** when they fit only in total memory or require CPU off‑load, and **RED** when the model cannot fit at all.
* **Cleanup** – Removed unused `GgufMetadata` import; updated imports and type definitions accordingly.
* **Documentation/comments** – Added explanatory JSDoc comments for the new methods and clarified the return semantics of `isModelSupported`.

* chore: migrate no_kv_offload from llamacpp setting to model setting

* chore: add UI auto optimize model setting

* feat: improve model loading planner with mmproj support and smarter memory budgeting

* Extend `ModelPlan` with optional `noOffloadMmproj` flag to indicate when a multimodal projector can stay in VRAM.
* Add `mmprojPath` parameter to `planModelLoad` and calculate its size, attempting to keep it on GPU when possible.
* Refactor system memory detection:
  * Use `used_memory` (actual free RAM) instead of total RAM for budgeting.
  * Introduced `usableRAM` placeholder for future use.
* Rewrite KV‑cache size calculation:
  * Properly handle GQA models via `attention.head_count_kv`.
  * Compute bytes per token as `nHeadKV * headDim * 2 * 2 * nLayer`.
* Replace the old 70 % VRAM heuristic with a more flexible budget:
  * Reserve a fixed VRAM amount and apply an overhead factor.
  * Derive usable system RAM from total memory minus VRAM.
* Implement a robust allocation algorithm:
  * Prioritize placing the mmproj in VRAM.
  * Search for the best balance of GPU layers and context length.
  * Fallback strategies for hybrid and pure‑CPU modes with detailed safety checks.
* Add extensive validation of model size, KV‑cache size, layer size, and memory mode.
* Improve logging throughout the planning process for easier debugging.
* Adjust final plan return shape to include the new `noOffloadMmproj` field.

* remove unused variable

---------

Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-09-11 09:48:03 +05:30
Faisal Amir
9e592b2aca fix: render new line for user message 2025-09-11 10:29:34 +07:00
Faisal Amir
86dcfc10cf enhancement: rollback edit capabilities for local model 2025-09-10 19:43:44 +07:00
Dinh Long Nguyen
5cd81bc6e8
feat: improve testing (#6395)
* add more test rust test

* fix servicehub test

* fix tauri failing on windows
2025-09-09 12:16:25 +07:00
Faisal Amir
5e30e10bf4
Merge pull request #6388 from menloresearch/feat/import-vision-model
feat: allow user import model include mmproj file
2025-09-09 09:41:58 +07:00
Faisal Amir
a5b0ced9a9 chore: update logic turn on / off mmproj 2025-09-09 00:01:56 +07:00
lugnicca
dbcc1db0b9 Merge branch 'dev' into feat/model-selector 2025-09-08 17:51:03 +02:00
lugnicca
2db9af94fa fix: use serviceHub to fetch models and fix error message on app 2025-09-08 17:45:35 +02:00
Faisal Amir
94dc298181 chore: update validation logic 2025-09-08 22:37:55 +07:00
Faisal Amir
f2594134c7 chore: update UI 2025-09-08 21:20:21 +07:00
Faisal Amir
be851ebcf1 chore: validate gguf file base metadata architecture 2025-09-08 20:16:20 +07:00
Faisal Amir
9b13b140d5 chore: update mcp delete dialog 2025-09-08 19:43:38 +07:00
Faisal Amir
836990b7d9 chore: update fn check mmproj file 2025-09-08 11:10:00 +07:00
Faisal Amir
4141910ee2 chore: remove validate ext file 2025-09-08 00:07:20 +07:00
Faisal Amir
1b035fd2f1 feat: allow user import model include mmproj file 2025-09-08 00:00:46 +07:00
lugnicca
9fcd9503e7 fix: error on message with "fetch" 2025-09-06 17:42:54 +02:00
Faisal Amir
a49008e02d enhancement: responsive dialog modals 2025-09-06 21:48:09 +07:00
lugnicca
66af5c7386 fix: use webprovider services to fetch models 2025-09-05 19:56:28 +02:00
lugnicca
045778406f Merge branch 'dev' into feat/model-selector 2025-09-05 19:51:17 +02:00
Dinh Long Nguyen
d490174544
feat: Web use jan model (#6374)
* call jan api

* fix lint

* ci: add jan server web

* chore: add Dockerfile

* clean up ui ux and support for reasoning fields, make app spa

* add logo

* chore: update tag for preview image

* chore: update k8s service name

* chore: update image tag and image name

* fixed test

---------

Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
2025-09-05 16:18:30 +07:00
Dinh Long Nguyen
a30eb7f968
feat: Jan Web (reusing Jan Desktop UI) (#6298)
* add platform guards

* add service management

* fix types

* move to zustand for servicehub

* update App Updater

* update tauri missing move

* update app updater

* refactor: move PlatformFeatures to separate const file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* change tauri fetch name

* update implementation

* update extension fetch

* make web version run properly

* disabled unused web settings

* fix all tests

* fix lint

* fix tests

* add mock for extension

* fix build

* update make and mise

* fix tsconfig for web-extensions

* fix loader type

* cleanup

* fix test

* update error handling + mcp should be working

* Update mcp init

* use separate is_web_app build property

* Remove fixed model catalog url

* fix additional tests

* fix download issue (event emitter not implemented correctly)

* Update Title html

* fix app logs

* update root tsx render timing

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-05 01:47:46 +07:00
Faisal Amir
b2c4e89402
Merge pull request #6364 from menloresearch/feat/local-api-server
feat: allow see Apikey when server local status running
2025-09-03 20:05:57 +07:00
Faisal Amir
38629afc89 chore: avoid duplicated fn 2025-09-03 18:37:49 +07:00
Faisal Amir
5f9f766965 fix: search hgf repo and downloaded filter 2025-09-03 18:31:07 +07:00
Faisal Amir
cb4641e4ad feat: allow see apikey when server local status running 2025-09-03 17:55:52 +07:00
Faisal Amir
0ea9da95c8 fix: remove timezone specific from utils 2025-09-03 17:12:47 +07:00
lugnicca
3d0ce15fe8 fix: prevent stale provider model requests from polluting UI state 2025-09-02 18:19:12 +02:00
lugnicca
70bf257e75 fix: put refresh button directly in input instead of in dropdown 2025-09-02 18:18:05 +02:00
Faisal Amir
1544aac663 chore: change useMemo to useEffect to avoid side effect 2025-09-02 09:40:29 +07:00
Faisal Amir
12118192ef chore: fix id codeblock for avoid duplicate same state 2025-09-01 13:02:53 +07:00
Faisal Amir
7a657477de
Merge pull request #6316 from menloresearch/fix/handle-checking-model-gated
fix: handle checking model gated
2025-08-28 13:58:24 +07:00
Dinh Long Nguyen
eab4b277a2
make validation message infinite (#6318) 2025-08-28 13:47:46 +07:00
Faisal Amir
328d680f73 chore: fix status model id 2025-08-28 13:15:58 +07:00
Faisal Amir
5257a24181 chore: fix status 2025-08-28 13:10:08 +07:00
Faisal Amir
11a7bf7331 chore: remove log 2025-08-28 13:04:13 +07:00
Faisal Amir
85b614f44a chore: update test 2025-08-28 12:58:12 +07:00