Skip to content

Models page: start Ollama, one-click deps, and local GGUF search - #27

Merged
XYAIStudio merged 1 commit into
mainfrom
cursor/local-models-ux-cf47
Sep 16, 2026
Merged

XYAIStudio merged 1 commit into
mainfrom
cursor/local-models-ux-cf47

Conversation

@XYAIStudio

Copy link
Copy Markdown
Owner

Summary

Models 页补齐桌面(尤其 Windows)本机大模型体验,不碰 Release 资产。

  1. Ollama 已安装但未运行 — 探测到本机有 Ollama、但 127.0.0.1:11434 不通时,显示 「启动 Ollama」。Windows 按已知安装路径启动 Ollama.exe / ollama app / ollama serve,轮询 API 直到就绪或给出下一步。未安装时不会假装去启动。
  2. 缺依赖时一键安装 — 推荐模型需要 Ollama 时先提示。FreeOS 能自动化的(Windows winget、macOS brew、Linux 官方脚本且可免密 sudo)提供 「一键下载安装」;否则明确写需手动安装并给出官网。
  3. 本机权重搜索 — 「搜索本机模型」 后台扫描(进度 + 取消),默认用户目录 + 常见模型目录;可选文件夹;可选「全盘」并警告耗时。识别 .gguf / .ggml,以及带 config.json + tokenizer + .safetensors 的因果 LLM 目录(避免乱报)。结果进入 本地大模型列表(路径、大小),GGUF/GGML 可 注册(ollama create + 写入 Ollama provider)。safetensors 只展示并说明需手动转 GGUF。

产品用语未改:员工 / 同事 / 专家。

Target branch

  • Base is main (requested: latest main, focused PR, no merge / no Release)

Type of change

  • New feature

Test plan

  • uv run ruff check + uv run mypy --strict src/octop (changed modules)
  • uv run pytest on new unit tests (test_ollama_paths, test_local_weights, test_local_scan, test_local_register, test_ollama_start, test_local_probe)
  • Dashboard: npx vitest run LocalHardwarePanel.test.tsx + npx tsc --noEmit
  • make all — first-run testmon was still walking the full suite in this environment; CI should be the ship bar
  • Added/updated tests

Windows verification (reviewer)

  1. 启动 Ollama — 已安装 Ollama 后退出托盘,使 http://127.0.0.1:11434 不通。打开模型页 → 应出现「启动 Ollama」。点击后应拉起已知路径下的 Ollama.exe / ollama app / ollama serve,直到标签变绿,或提示打开开始菜单里的 Ollama。
  2. 一键依赖 — 隐藏/卸载 Ollama 后刷新。推荐模型应提示缺运行时;能 winget 时点「一键下载安装」,否则文案指向 https://ollama.com/download,不要假装已安装。
  3. GGUF 搜索 → 列表 — 在「下载」或自选目录放一个 .gguf,点「搜索本机模型」(不要先勾全盘)。文件应出现在本机列表(路径 + 大小)。Ollama 运行中点「注册」,对话模型池应出现该名称。

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed) — docs/api.md local-models routes
Open in Web Open in Cursor 

@XYAIStudio
XYAIStudio marked this pull request as ready for review September 16, 2026 05:18
Start an already-installed Ollama daemon from known Windows/macOS paths,
offer honest one-click install only when a package manager can do it,
and scan for local GGUF/GGML weights in the background so they can be
registered for chat.
@cursor
cursor Bot force-pushed the cursor/local-models-ux-cf47 branch from f23de9c to f519edf Compare September 16, 2026 05:20
@XYAIStudio
XYAIStudio merged commit 73b51fa into main Sep 16, 2026
5 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/local-models-ux-cf47 branch September 16, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants