chore: checkpoint pi lab rust integration work

This commit is contained in:
Agent Board
2026-07-11 20:39:18 +08:00
parent d47f6447fd
commit d16eccfe10
39 changed files with 4843 additions and 455 deletions
@@ -1177,7 +1177,8 @@ pub async fn admin_put_user_settings(
// ─── Constants ──────────────────────────────────────────────────────────
const DEFAULT_PI_MODEL: &str = "omniroute/freefirst";
const DEFAULT_PI_MODEL: &str = "omniroute/gpt-5.4-mini";
const FREEFIRST_PI_MODEL: &str = "omniroute/freefirst";
const LIGHTRAG_PROVIDER: &str = "lightrag";
const LIGHTRAG_PROVIDER_DESCRIPTION: &str = "MNote 知识库默认提供者(LightRAG)";
const SOURCE_OF_TRUTH: &str = "directory_grants";
@@ -1904,6 +1905,12 @@ pub(crate) fn load_effective_ai_runtime_policy(
.into_iter()
.filter_map(|entry| normalize_model_ref(Some(&default_provider), &entry.id))
.collect::<Vec<_>>();
if !allowed_models.iter().any(|model| model == FREEFIRST_PI_MODEL) {
allowed_models.push(FREEFIRST_PI_MODEL.to_string());
}
if !allowed_models.iter().any(|model| model == DEFAULT_PI_MODEL) {
allowed_models.push(DEFAULT_PI_MODEL.to_string());
}
allowed_models.sort();
allowed_models.dedup();