Repository navigation
feat(admin): 模型表单选中目录模型后自动填上下文窗口和输出上限 - #222
Merged
Merged
Conversation
Model ID 命中 models.dev 目录时,输出长度也从默认 2000 换成目录的模型输出上限;目录缺的字段保留已填值(修复命中时上下文窗口可能被清空的问题)。编辑模式打开旧模型、目录数据晚到时,未设的上下文窗口也会补上目录值,这类程序化预填不标记表单为已修改,保存才生效。 (#221)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #221
改了什么
max_output_tokens;此前只填上下文窗口和三个价格,提示行写着「输出上限 X」字段却不跟。catalogParamPrefill(context_window / max_tokens / 三个价格),目录缺失的字段保留已填值——顺带修复:目录项context_window为 null 时会把用户已填的值清空。max_tokens仅添加模式且仍是默认 2000 时补(编辑模式的已保存值视为有意设置,重选模型才会覆盖)。程序化预填不标记表单为脏,保存才生效。行为示例
添加模型 → 选智谱渠道 → 选
glm-4.7:上下文窗口自动填 200,000、输出长度自动填 32,768(原来停在 2000)、价格按目录填。提示行同步说明「上下文窗口、输出上限与费用已按目录预填」。Verification(本地,隔离 worktree
/tmp/topiceye-modelcfg)model-eval/(含新增 4 用例:未命中空补丁 / 全量预填 / 目录缺失保留已填 / 部分补填)纯前端改动(表单 + utils + 测试),无后端/协议变更。