fix: 模型级强制参数(kimi-k2.7-code 锁 temperature=1)+ 测速超时/错误文案
- config: ModelInfo.params + MODEL_PARAM_KEYS 白名单 + _parse_model_params(写错即 ConfigError) - adapters: _forced_params 在 payload 组装后强制覆盖;_learn_from_upstream_error 按上游 400 要求修正并重发一次(非原样重试);流式已吐内容则不重发 - main: /v1/models 暴露 params;探针超时 15s→30s;_speedtest_error_text 说清超时/上游原文 - settings: 面板保存保留手写 models[].params(原先会被静默清掉) - gateway.yaml: kimi-k2.7-code params.temperature=1 - 前端: Models 挂锁+参数固定标签;Chat 温度 chip 挂锁+抽屉提示;新增 lock 图标;中英对称 - tests: +10 → 168 passed / 0 failed
This commit is contained in:
1 parent
43a4f8613b
commit
840c5c83aa
14 files changed
+631
-13
No files matched your search
@@ -30,4 +30,10 @@ def create_adapter(
|
||||
timeout=timeout,
|
||||
media=pconfig.media,
|
||||
requires_session_header=pconfig.requires_session_header,
|
||||
# 第二十五轮: 把模型级强制参数(providers.*.models[].params)随适配器带下去。
|
||||
# 适配器按 model id 查表,在**组装完 payload 之后**覆盖,客户端无法绕过。
|
||||
# 放在适配器而非每个调用点:所有入口(对话 / 流式 / 批量 / 一键测速)自动一致,
|
||||
# 不会出现"主链路修了、测速还漏着"的偏差。
|
||||
# 配置变更时 main._apply_config 会丢弃整个适配器缓存,约束不会滞留旧值。
|
||||
model_params={m.id: dict(m.params) for m in pconfig.models if m.params},
|
||||
)
|
||||
Reference in new issue
Block a user