Files
RAG/docs/adr/0002-separate-bailian-protocols.md
YoVinchen ec1acb36b5
Some checks failed
secret-scan / scan (push) Has been cancelled
Establish a safe foundation before implementing the geology RAG system
The project begins with architecture, data governance, reproducible evaluation, deployment boundaries, and secret-handling contracts so later code has measurable acceptance criteria.

Constraint: Real provider credentials, workspace identities, and restricted geological data must never enter Git

Rejected: Add placeholder runnable services in the design commit | would imply unverified implementation readiness

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Run make verify before every commit and update ADRs when architecture boundaries change

Tested: Secret scan, Markdown links, YAML parse, shell syntax, and staged diff validation

Not-tested: Application runtime is intentionally deferred to the implementation stage
2026-07-12 14:42:11 +08:00

19 lines
825 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ADR-0002分离百炼协议适配器
- Status: accepted
- Date: 2026-07-11
## Context
百炼 Chat/Embedding 使用 `/compatible-mode/v1`,而 `qwen3-rerank` 使用独立的 `/compatible-api/v1/reranks`。把它们封装成一个通用 OpenAI 客户端容易误拼路径,并掩盖不同错误和限流语义。
## Decision
后端建立独立的 `EmbeddingProvider``Reranker``Generator` 接口。OpenAI 兼容客户端承担 Chat 与基础 Embedding独立 HTTP 客户端承担 Rerank。实验需要 `text_type=query/document` 时,由原生 Embedding 适配器承担。
## Consequences
- 三类端点和错误处理可以独立做契约测试。
- Anthropic 兼容地址不进入本项目运行配置。
- 模型凭证仍只在服务端配置层读取,任何适配器都不得记录鉴权请求头。