Some checks failed
verify / verify (push) Has been cancelled
Accept Docker Compose's exact string representation of the fixed 1024-dimensional embedding contract while rejecting every widened or ambiguous value. Entry-level smoke tests now exercise the same environment shape used by the container. Constraint: The current local Bailian credential still returns 401 for all three capabilities and is not stored in Git. Rejected: Change the field to an unconstrained integer | would allow a runtime dimension that disagrees with vector(1024). Confidence: high Scope-risk: narrow Directive: Keep the database vector dimension and provider dimension locked together through an ADR-backed migration. Tested: make verify; 75 backend tests; 14 frontend tests; rebuilt provider-smoke image; normal Compose smoke reached all three provider endpoints. Not-tested: Successful live provider response remains blocked by external authentication.
Backend
Python/FastAPI 后端代码位于本目录。实现阶段采用模块化单体,同一代码镜像分别运行 API 与持久化任务 Worker。
规划边界:
backend/
├── app/
│ ├── api/v1/ HTTP/SSE 接口
│ ├── core/ 配置、安全、日志、遥测
│ ├── domain/ 领域实体与状态机
│ ├── ports/ 外部能力协议(依赖倒置边界)
│ ├── services/ 入库、检索、生成、评测用例
│ ├── adapters/ 百炼、解析器、文件存储等外部适配器
│ ├── persistence/ SQLAlchemy 模型与仓储
│ ├── workers/ PostgreSQL 任务队列消费者
│ ├── tools/ 模型探测、seed 与离线运维入口
│ └── prompts/ 版本化提示词
└── tests/
├── unit/
├── integration/
└── contract/
前端不得直接访问百炼;API Key 读取逻辑只允许存在于后端配置层。