Skip to content

feat: local models and knowledge bases as first-class (P1.4) - #79

Merged
XYAIStudio merged 2 commits into
mainfrom
cursor/local-models-kb-first-class-2281
Sep 20, 2026
Merged

XYAIStudio merged 2 commits into
mainfrom
cursor/local-models-kb-first-class-2281

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

本机模型与本机知识库作为默认路径(FreeOS P1.4)。新用户在向导和设置里就能找到并选用本机模型、本机知识库,不必先翻云厂商。云端仍可用,只是不再当默认入口。文案偏软:本机优先,不写反官方口号。

Target branch

  • Base is main(本仓库无日常 develop 集成分支)

Type of change

  • New feature
  • Documentation

做了什么

  • 设置向导:默认先选 Ollama;本机 OpenAI 兼容地址不必填云密钥;本机路径可跳过连通测试继续(Ollama 未启动也不挡首跑)。ONNX 向量预设放在「更多」,不进精选对话卡片。
  • 模型页:默认打开「本地」标签;自定义本机 URL 密钥可选。
  • 知识库:空状态先引导本机文件夹挂接(推荐),ima 标为可选云端;向量默认本机 ONNX。
  • 后端:供应商预设顺序本机优先(ollama → onnx);127.0.0.1 / localhost / ollama / lmstudio / vllm 自动填占位密钥 local。
  • 文档:README、用户指南、configuration、桌面 README、能力迁移图对齐本机优先。

未做:拆除 Node(P2)、导出改写、双身份(已完成)、强制离线-only。组织边车 /api/settings/ai 不在本波。

Test plan

  • 新增/更新测试:tests/unit/utils/test_local_endpoint.py、test_provider_preset_expansion.py、test_gate.py、dashboard presetUtils.test.ts、KnowledgeMountHome.test.tsx
  • uv run pytest 相关单测:tests/unit/agents + tests/unit/api + tests/unit/knowledge + local-endpoint / preset expansion → 950 passed, 2 skipped
  • dashboard npx vitest run 针对 presetUtils.test.ts、KnowledgeMountHome.test.tsx → 8 passed
  • cd dashboard && npx tsc --noEmit 通过
  • 完整 make all(本环境 uv run ruff 会撞 aliyun-python-sdk-core 卸载问题;已用 .venv/bin/ruff check 扫过改动文件)

Checklist

  • Updated CHANGELOG.md(Unreleased)
  • README / docs updated
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 20, 2026 10:56
Prefer Ollama and local OpenAI-compatible endpoints in the setup wizard
and Models page; keep cloud providers optional. Knowledge empty state
leads with a local folder mount and ONNX embeddings.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Wizard featured slots previously pulled ONNX in when fewer than six cloud
brands were listed. Embedding stays under more; local chat remains first.
Guard the connectivity test when no model is selected yet.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 20, 2026 10:59
@XYAIStudio
XYAIStudio merged commit 29fec6f into main Sep 20, 2026
4 of 6 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/local-models-kb-first-class-2281 branch September 20, 2026 10:59
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