Repository navigation
Conversation
|
审核结论:问题真实,但当前修复不能合入。 GitHub JS 门禁失败的具体回归是: 需要把两个需求拆开:live discovery/cache 不应把失效模型当作 endpoint-served 模型缓存或展示;但配置模型的 published record 仍必须在设置编辑路径可用。请保留/恢复独立的 configured-record enrichment,或让设置页从明确的配置模型数据源读取并补充对应回归测试,再重新跑完整 JS 门禁。当前 PR 还有 Head contains latest base 失败,因此暂不合入。 |
A live discovery answer replaced the visible list with the endpoint's own models, then immediately re-added every stored model binding. When an upstream gateway revoked a model from the key, the refresh kept showing the dead entry, so the list never shrank without re-adding the whole channel. The live branch now returns exactly what the endpoint served; catalog and offline fallbacks keep configured bindings so editing stays usable. Pinned by a source-contract regression test alongside the existing discovery-precedence suite.
The maintainer review found the wholesale live return dropped configured bindings the endpoint no longer serves, so the settings panel lost their published capabilities. The resurrection in vastsa#1257 is a persistence concern — the durable cache already narrows to served rows via forget_missing_discovered_models — so the live return unions configured bindings again while caching only what the endpoint served. Source-slice tests pin both halves.
2d799a7 to
01fa02d
Compare
|
感谢复核,已按「拆开两个需求」重做(
验证: |
|
复核了同步到最新 main 的版本:当前 diff 已不再修改运行时行为,只增加 provider-ipc 的 source 文本断言和注释;实际根因修复已在 main 的现有路径中(live discovery 的缓存先只写 endpoint 返回行,设置页再用 source=user 的配置行补能力信息,服务可选列表过滤这些 user 行;host-core 缓存只清理 stale discovered 行)。因此这条 PR 现在是 test-only 回归覆盖,不是独立修复根因的 landing candidate。按仓库当前临时 PR 类型策略,外部 test-only PR 不合入;问题本身已由 main 修复,我会关闭这条重复 PR,不另建替代 PR。 |
Fixes #1257
Problem
When a custom OpenAI-compatible gateway (e.g. GPT-Load) revoked model entitlements from a key, refreshing the model list in PI-Desktop never shrank the list: models the upstream no longer serves kept appearing.
Root cause
The
providersListModelslive-discovery branch asked the endpoint first (correct), then passed the result throughwithConfiguredBindings, which re-added every stored model binding the endpoint had just dropped. The dead ids were therefore resurrected on every refresh, and only rows the endpoint actually served were cached, so the visible list and the cache disagreed.Fix
The live branch now returns exactly what the endpoint served. Catalog and offline fallback branches keep configured bindings so offline editing stays usable, and the settings form continues to read stored bindings from
provider.modelsdirectly.Validation
model-discovery-precedence.test.mjspins that the live branch no longer re-adds configured bindingsnode --testonmodel-discovery-precedence,model-cache,provider-model-list-scope,todo-recovery: 17/17 passgit merge-base --is-ancestor origin/main HEADverified before push