docs: pin register_provider as pure function per plan review

Also note that the seven architecture amendments predate the plan,
tighten T12 to independent implementation layers, and add fallback
guidance for read-only reference protocol imports.
This commit is contained in:
2026-07-20 06:26:46 -04:00
parent f5623166a6
commit b568b61a34
2 changed files with 8 additions and 7 deletions
@@ -190,7 +190,7 @@ class ProviderProfile:
supports_native_schema: bool = False
```
首发注册:`qwen`(`{"enable_thinking": True}` / `{"enable_thinking": False}`、剥 think 标签)、`deepseek`(`{"thinking": {"type": "enabled"}}` / `{"thinking": {"type": "disabled"}}`)、`openai`(全空,基线)。`reasoning_content` 增量提取是 OpenAI 兼容 SSE 的通用行为,归 transport 不进 profile。查找按 `SourceConfig.provider` **精确匹配**,未注册即装配期报错(消灭子串猜测);`register_provider(profile)` 公开,新 provider 一个条目零核心改动(D11)。
首发注册:`qwen`(`{"enable_thinking": True}` / `{"enable_thinking": False}`、剥 think 标签)、`deepseek`(`{"thinking": {"type": "enabled"}}` / `{"thinking": {"type": "disabled"}}`)、`openai`(全空,基线)。`reasoning_content` 增量提取是 OpenAI 兼容 SSE 的通用行为,归 transport 不进 profile。查找按 `SourceConfig.provider` **精确匹配**,未注册即装配期报错(消灭子串猜测);`register_provider` 公开,新 provider 一个条目零核心改动(D11)。**形态定稿(2026-07-20 计划审查修订)**: 纯函数 `register_provider(profile, *, base: Mapping | None = None) -> dict[str, ProviderProfile]`,返回 base(缺省模块级不可变 `DEFAULT_PROFILES`)+ 新条目的新表;client/from_env 收 `registry: Mapping | None = None`——无可变全局状态(铁律)。
## 8. 配置面定稿(from_env 键名全集)