Repository navigation
refactor!: 删掉统一供应商编辑器已替代的旧 llm-settings 面板 - #375
Merged
Merged
Conversation
- pricing-panel.ts 移到 features/providers/pricing.ts,它用的十九条文案并入供应商页的 十一种语言表;表单、币种校验、完整 JSON 规则、报价快照与草稿行为不变。 - WebUiPageHost 不再接 builtins:面板声明了 builtin 时,页签、插槽与端点编辑页三条挂载 路径都在那一块显示「内置面板不存在」,不去加载页面扩展。 - 只覆盖旧面板界面的测试删除;报价编辑器的六条测试改为直接挂编辑器,宿主的挂载、插槽与 错误隔离测试改用页面扩展的面板,llamacpp 运行时面板测试自建端点配置。 BREAKING CHANGE: WebUI 不再带 llm-settings 面板。面板声明 builtin: 'llm-settings' 时显示错误卡; builtin 只在 llm:* 页上点名端点编辑页自带的四块段落(CONNECTION_EDITOR_BLOCKS)。端点在供应商页 编辑。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ProviderSettings 不再声明 settings 面板,页面 invoke 只转给模块自己的面板;只为它服务的 activate、delete、setSecret 与私有的 assertNewName、directoryExtras、probe 一并删除, 文案表删掉七条只有它用的。 - ProviderHub.action 不带草稿时直接用已保存端点的实例:模型列表走 registry.resolve, 测试走 ProviderSettings.probeClient。请求与回执形状不变;端点没有模型时的报错改用与草稿 相同的「请选择模型」。 - 旧数据面测试按能力改挂:密钥状态、模型名与探测提示留在 provider-settings 测试,已保存 端点的模型列表与探测移到 hub 测试;Cormini 与全系统集成测试改走 /api/providers。 BREAKING CHANGE: /api/webui/providers/llm:<模块>/panels/settings/<方法> 删除,方法有 state、 create、activate、save、delete、duplicate、setSecret、models、probe、extras。改用 /api/providers: 列表 GET /api/providers,详情 GET /api/providers/:name,新建 POST /api/providers(复制是带 copyFrom 的新建),保存 POST /api/providers/:name/save(整条提交,带 expectedRevision,密钥值放 secretValue),设为当前 POST /api/providers/:name/activate,删除 POST /api/providers/:name/delete, 测试与模型列表 POST /api/providers/:name/test、/models;模块的推理档、服务档与默认地址在 GET /api/provider-modules。extras(列端点目录里的文件)没有替代。不设弃用期。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 4, 2026
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.
中文
删掉统一供应商编辑器已经替代的旧
llm-settings面板:服务端的声明与专属操作、WebUI 的面板实现与内置面板表、只服务它的文案和测试。@kwk1001 这次按你在 issue 里列的边界做:保留ProviderSettings、sources()、模块自定义栏目与它们的invoke分发、底层的保存、密钥状态、探测与报价能力;报价编辑器连同十一种语言的文案先迁进features/providers/再删旧目录;公共协议的builtin字段保留;旧的#/provider/llm:<kind>链接照旧跳到供应商页。两个提交:
refactor(webui)!:pricing-panel.ts移到src/web/client/features/providers/pricing.ts,用到的十九条文案并入供应商页的语言表;删掉webui-pages/builtins/与builtins.ts。WebUiPageHost不再接builtins,面板声明了builtin时页签、插槽、端点编辑页三条挂载路径都在那一块显示「内置面板不存在」,不去加载页面扩展。refactor(providers/webui)!:llm:<模块>页不再声明settings面板,页面invoke只转给模块自己的面板;删掉只为它服务的ProviderSettings.activate/delete/setSecret和私有的assertNewName/directoryExtras/probe,以及七条只有它用的文案。ProviderHub.action不带草稿时直接用已保存端点的实例(模型列表走registry.resolve,测试走ProviderSettings.probeClient),请求和回执形状不变,仍然不要求带草稿;端点没有模型时的报错改成和草稿相同的「请选择模型」。BREAKING
/api/webui/providers/llm:<模块>/panels/settings/<方法>删除,方法有state、create、activate、save、delete、duplicate、setSecret、models、probe、extras。改用/api/providers:列表GET /api/providers,详情GET /api/providers/:name,新建POST /api/providers(复制是带copyFrom的新建),保存POST /api/providers/:name/save(整条提交,带expectedRevision,密钥值放secretValue),设为当前POST /api/providers/:name/activate,删除POST /api/providers/:name/delete,测试与模型列表POST /api/providers/:name/test、/models;模块的推理档、服务档与默认地址在GET /api/provider-modules。extras(列端点目录里的文件)没有替代。WebUI 不再带llm-settings面板,面板声明builtin: 'llm-settings'会显示错误卡。不设弃用期。测试
llm-settings-open-ui、model-temperature-ui、service-tier-ui与它们的夹具)。tests/web/feature-providers-pricing.test.ts)。webui-builtins去掉注册表断言,挂载、插槽、错误隔离与卸载改用页面扩展的面板,并断言声明了builtin的面板显示错误卡且不加载扩展。provider-settings;已保存端点不带草稿的模型列表与探测移到hub.test.ts;Cormini 与全系统集成测试改走/api/providers。验证
pnpm run typecheck、pnpm typecheck:web、pnpm test(全量)、pnpm build:web通过。scripts/dev-webui.ts假数据(端口 8871)里打开供应商页:旧链接#/provider/llm:llamacpp落到#/providers;llamacpp 端点的运行时、模型两块模块面板照常挂上;对local端点「测试连接」出回执(假 llama-server 不答/chat/completions,回执是 404 提示)、「获取模型列表」列出 2 个模型;报价三格表填币种和输出单价后完整规则 JSON 同步更新、卡片标草稿,保存后GET /api/providers/local读回这份报价;新建 llamacpp 连接llama-two,取模型列表后选一个保存,列表里显示可连接。POST /api/providers/local/models回 2 个模型,/test回 404 提示的回执,没选模型的external回 400「请选择模型。」;旧的/api/webui/providers/llm%3Allamacpp/panels/settings/state回 404;manifest 里llm:*页只剩编辑页段落与模块面板。没验证
/chat/completions,所以测试回执是 404 的失败提示)。extensions/下的 provider 扩展都没有调用。Fixes #365
English
Removes the old
llm-settingspanel that the unified provider editor replaced: its server-side declaration and operations, the WebUI panel and the built-in panel registry, and the strings and tests that served only it. @kwk1001 this follows the boundary you listed in the issue:ProviderSettings,sources(), module sections with theirinvokedispatch, and the underlying save, secret status, probe and pricing capabilities stay; the pricing editor and its strings in all eleven languages move intofeatures/providers/before the old directory goes; the publicbuiltinprotocol field stays; old#/provider/llm:<kind>links still redirect to the providers page.Two commits:
refactor(webui)!:pricing-panel.tsmoves tosrc/web/client/features/providers/pricing.tsand its nineteen strings join the providers page tables;webui-pages/builtins/andbuiltins.tsare deleted.WebUiPageHostno longer takesbuiltins; a panel that declaresbuiltingets an error card on all three mount paths (tab, slot, connection editor) without loading the page's extension.refactor(providers/webui)!:llm:<module>pages no longer declare thesettingspanel and the pageinvokeforwards only to the module's own panels;ProviderSettings.activate/delete/setSecret, the privateassertNewName/directoryExtras/probeand seven strings used only by them are deleted.ProviderHub.actionwithout a draft now uses the saved endpoint's instance directly (registry.resolvefor models,ProviderSettings.probeClientfor the probe); request and receipt shapes are unchanged and a draft is still optional. An endpoint without a model now reports the same "Model is required." as a draft.BREAKING
/api/webui/providers/llm:<module>/panels/settings/<method>is removed, coveringstate,create,activate,save,delete,duplicate,setSecret,models,probeandextras. Use/api/providers: listGET /api/providers, detailGET /api/providers/:name, createPOST /api/providers(duplicate is a create withcopyFrom), savePOST /api/providers/:name/save(whole entry, withexpectedRevision, key value insecretValue), activatePOST /api/providers/:name/activate, deletePOST /api/providers/:name/delete, probe and model listPOST /api/providers/:name/testand/models; module reasoning tiers, service tiers and default URL are inGET /api/provider-modules.extras(listing files in the endpoint directory) has no replacement. The WebUI no longer ships thellm-settingspanel; a panel declaringbuiltin: 'llm-settings'shows an error card. No deprecation period.Verified
pnpm run typecheck,pnpm typecheck:web, fullpnpm test,pnpm build:web.scripts/dev-webui.tsfake data (port 8871):#/provider/llm:llamacpplands on#/providers; the llamacpp runtime and models module panels mount; on thelocalendpoint "Test connection" returns a receipt (the fake llama-server does not answer/chat/completions, so it is the 404 hint) and "Fetch models" lists 2 models; filling currency and output rate in the three-rate pricing form updates the full-rules JSON and marks the card as a draft, and after savingGET /api/providers/localreturns that pricing; a new llamacpp connectionllama-twowas created, given a model from the fetched list, saved, and listed as ready.POST /api/providers/local/modelsreturns 2 models,/testreturns the 404-hint receipt,external(no model) returns 400 "请选择模型。"; the old/api/webui/providers/llm%3Allamacpp/panels/settings/statereturns 404;llm:*pages in the manifest carry only the editor blocks and module panels.Not verified
/chat/completions, so the probe receipt is the 404 hint).extensions/does.🤖 Generated with Claude Code