模型平台编辑器:预设平台 + 模型高级参数
- 新增平台时给预设 chips(智谱 / DeepSeek / 通义 / 自定义):点选填好 url 与平台名, 模型 id 用预设的 model_hint 作 placeholder,新模型行自动带上 model_defaults (extra_params / thinking_params / reasoning_ack_field) - 切换预设只覆盖「空 / 上一个预设缺省」的行,手填参数与已有模型不动; 选「自定义」清空平台字段与 Key/模型行,回到空白平台 - 每个模型卡加「高级」:display_name、profile(下拉取 model_profiles 的 key)、 extra_params / thinking_params(JSON 文本框)、reasoning_ack_field - 保存继续走细粒度 path,只推真正变化的叶子;清空写 op:delete,绝不整体替换模型对象; JSON 先前端校验,非法直接提示不发请求 - 余额类型不再让用户填:用预设新增平台时隐式按预设落 type(平台名与预设一致则不写) - 移动端模型弹窗同步放宽;去掉弹窗底部「仅写入配置…」提示 - presets:智谱 label 精简为「智谱」
This commit is contained in:
@@ -296,6 +296,8 @@
|
||||
<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<h3 id="mpe-title">编辑平台</h3>
|
||||
<!-- 平台预设:仅新增平台时展示,点选即填好 url/类型并给模型卡带上该平台的参数缺省 -->
|
||||
<div class="mpe-chips hidden" id="mpe-presets"></div>
|
||||
<input type="text" id="mpe-name" placeholder="平台名(留空取 url 主机名首段)">
|
||||
<input type="text" id="mpe-url" placeholder="平台上游地址(OpenAI 兼容 /v1)">
|
||||
<div class="mpe-sec">
|
||||
@@ -310,7 +312,6 @@
|
||||
<button class="ghost-btn danger hidden" id="mpe-del-btn" onclick="sUI.mDelPlat()">删除平台</button>
|
||||
<button class="primary-btn" onclick="sUI.mSave()">保存</button>
|
||||
</div>
|
||||
<div class="cfg-note">仅写入配置,点击「重启服务」后生效。</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user