Repository navigation
WebUI: Reduce adjustment granularity of Temperature and Top-p controls - #11176
Closed
Sha1rholder wants to merge 1 commit into
Closed
Sha1rholder wants to merge 1 commit into
Sha1rholder wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dashboard/src/components/shared/ObjectEditor.vue" line_range="169" />
<code_context>
:model-value="getTemplateValue(templateKey)"
@update:model-value="updateTemplateValue(templateKey, $event)"
type="number"
+ :step="!pluginName && configKey.split('.').pop() === 'custom_extra_body' && ['temperature', 'top_p'].includes(templateKey) ? 0.05 : 1"
density="compact"
variant="outlined"
</code_context>
<issue_to_address>
**Slider increments ignore finer field steps**
When a user adjusts temperature or top-p with a template slider, the template sliders use `template.slider.step`, so temperature changes by 0.1 and top-p by 0.01 instead of matching the number field’s 0.05 step; users get different increments depending on the control.
Use the same 0.05 step for the corresponding template sliders and number fields.
</issue_to_address>
### Comment 2
<location path="dashboard/src/components/shared/ObjectEditor.vue" line_range="169" />
<code_context>
:model-value="getTemplateValue(templateKey)"
@update:model-value="updateTemplateValue(templateKey, $event)"
type="number"
+ :step="!pluginName && configKey.split('.').pop() === 'custom_extra_body' && ['temperature', 'top_p'].includes(templateKey) ? 0.05 : 1"
density="compact"
variant="outlined"
</code_context>
<issue_to_address>
**Top-k fields keep whole-number steps**
When a provider’s `custom_extra_body` contains a numeric `top_k` parameter, the step condition excludes `top_k`, so its number field keeps the default increment of 1 instead of allowing 0.05 increments.
Include `top_k` in the condition that sets the number-field step to 0.05.
</issue_to_address>
### Comment 3
<location path="dashboard/src/components/shared/ObjectEditor.vue" line_range="76-78" />
<code_context>
</template>
-
+
<v-text-field
v-model.number="pair.value"
type="number"
</code_context>
<issue_to_address>
**Unrelated numeric inputs are added**
When the object contains a non-template numeric key, `ObjectEditor` adds a number input to non-template numeric keys in the general object editor, expanding editing behavior beyond the provider temperature and top-p controls. Users see new inputs for unrelated dictionary settings.
Remove the generic number-input addition or limit it to a demonstrated need for the provider controls.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: dashboard/src/components/shared/ObjectEditor.vue:169, dashboard/src/components/shared/ObjectEditor.vue:169
from 1 to 0.05 in "Providers".
Sha1rholder
force-pushed
the
reduce-granularity-of-some-controls
branch
from
November 16, 2026 09:18
0ef80ad to
6a26373
Compare
Contributor
Author
|
如果合并了 #11187 的话这个PR就不需要了 |
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.
Modifications / 改动点
WebUI: Reduce adjustment granularity of temperature and top-k controls from 1 to 0.05 in “Providers”.
Screenshots or Test Results / 运行截图或测试结果
before.webm
after.webm
Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
📚 I checked the affected WebUI instructions and screenshots in
docs/zhanddocs/enagainst the changed navigation, page structure, and labels, and updated them in this PR (or explained why no documentation update is needed). For renamed, moved, or merged entry points, I included an old entry → new entry mapping in the documentation and changelog./ 我已对照变化后的 WebUI 入口、页面结构和术语,核对并在本 PR 中更新
docs/zh和docs/en的相关操作说明与截图(或说明无需更新文档的原因)。入口改名、移动或合并时,已在文档和 changelog 中补充 旧入口 → 新入口 对照。🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in
requirements.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
Summary by Sourcery
Enhancements: