为减少重复维护,本仓库文档按“入口文档 + 专题文档”拆分。建议从下列顺序阅读:
- 文档更新必须以实际代码实现为依据:总路由装配看
internal/server/router.go,协议/resource 路由看internal/httpapi/*/**/routes.go与internal/httpapi/admin/handler.go,配置默认值看internal/config/*,模型/alias 看internal/config/models.go,prompt 兼容链路看docs/prompt-compatibility.md列出的代码入口。 README.MD/README.en.md:面向首次接触用户,保留“是什么 + 怎么快速跑起来”。docs/ARCHITECTURE*.md:面向开发者,集中维护项目结构、模块职责与调用链。API*.md:面向客户端接入者,聚焦接口行为、鉴权和示例。docs/prompt-compatibility.md:面向维护者,集中维护“API -> 网页对话纯文本上下文”的统一兼容语义;相关行为修改时必须同步更新。- 其他
docs/*.md:主题化说明,避免在多个文档重复粘贴同一段内容。
To reduce maintenance drift, docs are split into an “entry doc + topical docs” layout.
Recommended reading order:
- Project overview (README)
- Architecture and project layout
- API reference
- Deployment guide
- Testing guide
- Developer quick reference
- Contributing guide
- API -> pure-text web-chat compatibility pipeline
- Tool-calling unified semantics
- DeepSeek SSE behavior notes (reverse-engineered)
- Documentation updates must be grounded in the actual implementation: root routing lives in
internal/server/router.go, protocol/resource routes live ininternal/httpapi/*/**/routes.goandinternal/httpapi/admin/handler.go, config defaults ininternal/config/*, models/aliases ininternal/config/models.go, and the prompt compatibility pipeline in the code entrypoints listed bydocs/prompt-compatibility.md. README.MD/README.en.md: onboarding-oriented (“what + quick start”).docs/ARCHITECTURE*.md: developer-oriented source of truth for module boundaries and execution flow.API*.md: integration-oriented behavior/contracts.docs/prompt-compatibility.md: maintainer-oriented source of truth for the “API -> pure-text web-chat context” compatibility flow; update it whenever related behavior changes.- Other
docs/*.md: focused topics, avoid copy-pasting the same section into multiple files.