docs: document sampling passthrough and the empty thinking profiles

This commit is contained in:
2026-07-31 21:41:34 -04:00
parent a5ebf72f17
commit 2958dc8231
5 changed files with 45 additions and 5 deletions
+8 -1
View File
@@ -19,6 +19,10 @@ class ProviderProfile:
True/False 时并入请求体的参数片段(None 时二者都不注入,用模型默认);
strip_think_tags 声明响应 content 需剥离 ``<think>`` 标签(qwen 系);
supports_native_schema 供 D14 阶梯选择原生 response_format 策略。
注: 某个 provider 的两档若皆为空字典(如 openai/minimax),说明该 provider
无已知的推理开关参数——此时 `enable_thinking` 对它**不产生任何效果**,
而非静默生效。需要下发自定义参数时用 `SourceConfig.extra_body`。
"""
name: str
@@ -43,13 +47,16 @@ DEFAULT_PROFILES: Mapping[str, ProviderProfile] = MappingProxyType(
thinking_off={"thinking": {"type": "disabled"}},
strip_think_tags=False,
),
# 两档皆空 ⇒ `enable_thinking` 对本 provider **不产生任何效果**(调用方
# 以为关掉了实际没关)。真需要控制推理时经 `SourceConfig.extra_body` 下发
"openai": ProviderProfile(
name="openai",
thinking_on={},
thinking_off={},
strip_think_tags=False,
),
# OpenAI 兼容基线,无已知注入差异;reasoning_content 由 transport 通用处理
# OpenAI 兼容基线,无已知注入差异;reasoning_content 由 transport 通用处理
# 同上: 两档皆空 ⇒ `enable_thinking` 对 MiniMax 源不产生任何效果
"minimax": ProviderProfile(
name="minimax",
thinking_on={},