pref(provider):重构配置装配、远程发现缓存与共享模型类型边界#203
Closed
phantom5099 wants to merge 11 commits into
Closed
Conversation
# Conflicts: # internal/runtime/runtime.go
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
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.
变更说明
本 PR 实现 Provider Phase 2 的第二阶段重构,重点解决 provider 来源管理、连接身份、远程模型发现缓存、selection 规则,以及 discovery/catalog 共享类型仍挂在
config包中的边界问题。主要改动
config负责扫描providers/*/provider.yaml、合并 builtin/custom、执行去重与校验。default_model,模型来源只来自远程 discovery 与本地缓存。cache/models/*.json缓存键生成。ModelDescriptor、ModelCapabilityHints等 discovery/catalog 共享类型迁移到internal/provider/types,不再继续放在config包。provider.RuntimeConfig,将 provider 层需要的最小运行时输入与ResolvedProviderConfig解耦。provider.RuntimeConfig。预期收益
provider/types成为 discovery/catalog 共享领域模型的稳定落点,降低provider -> config的反向耦合。