Skip to content

feat(dashboard): default mode.#198

Open
kevin5251984 wants to merge 1 commit into
dwgx:masterfrom
kevin5251984:feat/default-model
Open

feat(dashboard): default mode.#198
kevin5251984 wants to merge 1 commit into
dwgx:masterfrom
kevin5251984:feat/default-model

Conversation

@kevin5251984

@kevin5251984 kevin5251984 commented Jun 15, 2026

Copy link
Copy Markdown

When the requested model is not on the whitelist, this model will be used instead. Leave it blank to reject requests outside the whitelist.

改了什么 / What changed

新增「默認模型」(default model) 功能:當請求的模型不在白名單中時,系統會自動使用配置的默認模型代替直接拒絕請求。在 Dashboard 的模型訪問控制區域新增了默認模型輸入框。

为什么 / Why

解決白名單外模型請求被拒絕的問題。用戶現在可以設置一個 fallback 模型,讓不在白名單中的模型請求自動轉向該默認模型,而不是返回錯誤。這提高了系統的靈活性和用戶體驗。

测试 / Testing

  • 在 Dashboard 的「模型訪問控制」區域輸入默認模型名稱並保存
  • 使用 curl 或客戶端發送白名單外的模型請求,驗證系統自動使用默認模型響應
  • 留空默認模型時,驗證白名單外請求被正確拒絕(返回 400 錯誤)

Checklist

  • 代码风格和现有文件一致 / Code style matches existing files
  • 没有引入 npm 依赖 / No new npm dependencies (project is zero-dep)
  • 涉及 LS binary 协议改动时 在 PR 描述里注明字段号来源 / If touching LS protocol, document field-number source in the PR description
  • 涉及 dashboard UI 用 App.confirm / App.prompt 不用浏览器原生 alert/confirm / Uses App.confirm / App.prompt, not native dialogs (if dashboard)
截圖 2026-06-15 16 16 16

When the requested model is not on the whitelist, this model will be used instead. Leave it blank to reject requests outside the whitelist.
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.

2 participants