重构: 拆model_fetch模型获取(strategy核心库)
- 新建 df-ai/model_fetch_helpers.rs(400行): build_models_url/is_non_chat_model/filter_chat_models + ModelsList/ModelEntry + 27测试 - model_fetch.rs 21KB→6KB(176行): fetch_model_names/fetch_and_probe入口 + IO fn + use helpers - lib.rs: mod model_fetch_helpers 防污染核验: extract_error_diag不存在(以源码为准非背景声明), probe在model_probe 主代兜底: cargo check --workspace 0 + test df-ai 119 strategy: 核心库自底向上, 纯函数抽离, ModelsList pub(crate) git add指定(df-ai/*)
This commit is contained in:
@@ -7,6 +7,9 @@ pub mod context;
|
||||
pub mod context_helpers;
|
||||
pub mod coordinator;
|
||||
pub mod model_fetch;
|
||||
// model_fetch 的纯逻辑子模块(URL 拼接 / 噪音过滤 / 响应反序列化),
|
||||
// crate 内复用,private mod — 外部经 model_fetch 间接访问,无直接路径需求。
|
||||
mod model_fetch_helpers;
|
||||
pub mod model_probe;
|
||||
pub mod openai_compat;
|
||||
pub mod openai_helpers;
|
||||
|
||||
Reference in New Issue
Block a user