mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
feat: 增强 provider query 端点选择逻辑,支持 openai:responses 格式与 key 级 api_formats 过滤
- provider_query_selected_fetch_endpoints 支持按 key.api_formats 过滤可用端点 - 端点选择增加 endpoint_supports_rust_models_fetch 检查 - 支持优先级列表之外的自定义 api_format 端点 - 新增 openai:responses 端点的 provider query 集成测试 - 各 crate 补充缺失的 tracing instrument 和小修正 - 前端 Pool 管理页面补充状态逻辑
This commit is contained in:
@@ -229,6 +229,7 @@ pub fn build_admin_monitoring_cache_provider_delete_success_response(
|
||||
.into_response()
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_admin_monitoring_trace_provider_stats_payload_response(
|
||||
provider_id: String,
|
||||
total_attempts: usize,
|
||||
@@ -313,6 +314,7 @@ pub fn build_admin_monitoring_trace_request_candidate_payload(
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_admin_monitoring_system_status_payload_response(
|
||||
timestamp: chrono::DateTime<chrono::Utc>,
|
||||
total_users: u64,
|
||||
|
||||
@@ -371,6 +371,7 @@ pub fn admin_usage_aggregation_by_provider_json(
|
||||
usage: &[StoredRequestUsageAudit],
|
||||
limit: usize,
|
||||
) -> Value {
|
||||
#[allow(clippy::type_complexity)]
|
||||
let mut grouped: BTreeMap<String, (u64, u64, u64, u64, f64, f64, u64, u64)> = BTreeMap::new();
|
||||
for item in usage {
|
||||
let key = item
|
||||
@@ -458,6 +459,7 @@ pub fn admin_usage_aggregation_by_api_format_json(
|
||||
usage: &[StoredRequestUsageAudit],
|
||||
limit: usize,
|
||||
) -> Value {
|
||||
#[allow(clippy::type_complexity)]
|
||||
let mut grouped: BTreeMap<String, (u64, u64, u64, u64, f64, f64, u64)> = BTreeMap::new();
|
||||
for item in usage {
|
||||
let key = item
|
||||
@@ -1069,6 +1071,7 @@ pub fn build_admin_usage_detail_payload(
|
||||
payload
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_admin_usage_replay_plan_response(
|
||||
item: &StoredRequestUsageAudit,
|
||||
target_provider: &StoredProviderCatalogProvider,
|
||||
|
||||
@@ -133,6 +133,7 @@ fn trimmed_non_empty_string(value: Option<String>) -> Option<String> {
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_admin_provider_endpoint_record(
|
||||
id: String,
|
||||
provider_id: String,
|
||||
|
||||
@@ -86,8 +86,7 @@ fn normalize_admin_provider_oauth_kiro_import_item(item: &Value) -> Option<Value
|
||||
] {
|
||||
if let Some(value) = object.get(key) {
|
||||
if !value.is_null()
|
||||
&& !(value.is_string()
|
||||
&& value.as_str().is_some_and(|inner| inner.trim().is_empty()))
|
||||
&& !value.as_str().is_some_and(|inner| inner.trim().is_empty())
|
||||
{
|
||||
merged.insert(key.to_string(), value.clone());
|
||||
}
|
||||
|
||||
@@ -785,6 +785,7 @@ pub fn build_admin_pool_overview_payload(
|
||||
json!({ "items": items })
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_admin_pool_batch_import_key_record(
|
||||
id: String,
|
||||
provider_id: String,
|
||||
|
||||
Reference in New Issue
Block a user