refactor(LLM): 列表无可用模型时复用 AgcModelResolveError 的错误码

- public_model_catalog 里硬编码的 MODEL_UNAVAILABLE 与 AgcModelResolveError::Unavailable.code() 重复
- 改为直接取枚举 code(),与 MODEL_ACCESS_UNAVAILABLE 的既有做法一致,避免两处字符串漂移
This commit is contained in:
2026-10-04 16:00:33 +08:00
parent 1e90254d0a
commit 9476290c4b
+1 -1
View File
@@ -281,7 +281,7 @@ fn public_model_catalog(
.default_model_id_for(access)
.ok_or_else(|| {
AppError::from_status(StatusCode::SERVICE_UNAVAILABLE)
.with_code("MODEL_UNAVAILABLE")
.with_code(AgcModelResolveError::Unavailable.code())
.with_message("当前会员档位没有可用模型")
})?
.to_string();