Skip to content

fix: disable playground request parameters by default - #6541

Open
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/034c4e927
Open

fix: disable playground request parameters by default#6541
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/034c4e927

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

⚠️ 提交说明 / PR Notice

Playground 的参数面板目前默认启用 temperature、top_p、frequency_penalty、presence_penalty 四个参数。但现在很多新模型不支持这些参数,收到会直接返回 400,新用户选中这类模型发第一条消息就报错,参数面板又比较隐蔽
image

这个 PR 把 DEFAULT_PARAMETER_ENABLED 全部改为默认关闭, 想调参的用户可以手动开

老用户不受影响:开关状态已持久化在 localStorage,初始化时会覆盖默认值。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

Summary by CodeRabbit

  • Improvements
    • Simplified the playground’s default settings by disabling advanced generation parameters initially.
    • Parameters such as temperature, top-p, frequency penalty, and presence penalty can still be enabled when needed.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The playground now disables temperature, top_p, frequency_penalty, and presence_penalty by default. max_tokens remains disabled.

Changes

Playground parameter defaults

Layer / File(s) Summary
Update default parameter flags
web/src/features/playground/constants.ts
DEFAULT_PARAMETER_ENABLED now disables four configurable parameters by default while retaining the existing max_tokens setting.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: calcium-ion

Poem

I’m a bunny tuning flags with care,
Four parameters now start bare.
max_tokens stays asleep,
Defaults settle in a heap—
Hop, review, and breathe fresh air!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: disabling playground request parameters by default.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant