保留禁用聚合 API 的模型池#309
Open
DemosHume wants to merge 1 commit into
Open
Conversation
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.
改动文件
crates/service/src/apikey/apikey_models.rs解决问题
聚合 API 禁用后,如果页面或接口触发模型路由 bootstrap,原逻辑会把非 active 的聚合 API 当作 stale source 清理,导致该聚合 API 的模型池、模型映射和映射偏好被删除。再次启用后模型池看起来被重置。
本次调整为:
影响范围
验证
cargo test -p codexmanager-service aggregate_bootstrap -- --nocapturecargo test -p codexmanager-service bootstrap_aggregate -- --nocapture风险
风险较低。主要行为变化是 disabled 聚合 API 不再被当成 stale source 清理;真正不存在的 source 仍会被清理。这样禁用/启用不会丢失用户维护的模型池和映射偏好。