mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 18:59:50 +08:00
refactor: 大规模模块拆分与代码精简,新增 ai-pipeline/data-contracts 独立 crate
- 新增 aether-ai-pipeline 和 aether-data-contracts crate,将 pipeline 逻辑与数据契约从 gateway 中解耦 - 重构 admin handlers:拆分单体模块为 auth/billing/endpoint/features/model/observability/provider/system 等独立子模块 - 合并 chat/cli 重复代码路径:精简 conversion、finalize、planner 中的 sync/chat/cli 分支 - 重构 scheduler/executor/data 层,引入 facade 模式降低模块间耦合 - 移除冗余的 intent 模块,将 plan_fallback/policy/stream_path/sync_path 迁移至 executor - 前端适配:调整 admin API 调用和 provider 模型测试对话框
This commit is contained in:
@@ -1,119 +1,11 @@
|
||||
use super::{
|
||||
admin_clear_oauth_invalid_key_id, admin_export_key_id, admin_provider_id_for_refresh_quota,
|
||||
admin_reveal_key_id, admin_update_key_id, build_admin_provider_key_response,
|
||||
INTERNAL_GATEWAY_PATH_PREFIXES,
|
||||
};
|
||||
pub(crate) mod shared;
|
||||
|
||||
mod adaptive;
|
||||
mod api_keys;
|
||||
mod billing;
|
||||
mod catalog_write_helpers;
|
||||
mod core;
|
||||
mod endpoints;
|
||||
pub(crate) mod endpoints_health_helpers;
|
||||
mod gemini_files;
|
||||
mod global_models;
|
||||
mod ldap;
|
||||
pub(crate) mod misc_helpers;
|
||||
mod models_helpers;
|
||||
mod monitoring;
|
||||
mod oauth_helpers;
|
||||
mod payments;
|
||||
mod pool;
|
||||
mod provider_models;
|
||||
#[path = "provider_oauth/dispatch.rs"]
|
||||
mod provider_oauth_dispatch;
|
||||
#[path = "provider_oauth/quota.rs"]
|
||||
mod provider_oauth_quota;
|
||||
#[path = "provider_oauth/refresh.rs"]
|
||||
pub(crate) mod provider_oauth_refresh;
|
||||
#[path = "provider_oauth/state.rs"]
|
||||
mod provider_oauth_state;
|
||||
pub(crate) mod provider_ops;
|
||||
mod provider_query;
|
||||
mod provider_strategy;
|
||||
mod providers;
|
||||
mod providers_helpers;
|
||||
mod proxy_nodes;
|
||||
mod security;
|
||||
pub(crate) mod stats;
|
||||
mod usage;
|
||||
mod users;
|
||||
mod video_tasks;
|
||||
mod wallets;
|
||||
|
||||
pub(crate) use self::adaptive::maybe_build_local_admin_adaptive_response;
|
||||
use self::adaptive::*;
|
||||
pub(crate) use self::api_keys::maybe_build_local_admin_api_keys_response;
|
||||
use self::api_keys::*;
|
||||
pub(crate) use self::billing::maybe_build_local_admin_billing_response;
|
||||
use self::billing::*;
|
||||
use self::catalog_write_helpers::*;
|
||||
pub(crate) use self::core::maybe_build_local_admin_core_response;
|
||||
use self::core::*;
|
||||
pub(crate) use self::endpoints::maybe_build_local_admin_endpoints_response;
|
||||
use self::endpoints::*;
|
||||
use self::endpoints_health_helpers::{
|
||||
build_admin_create_provider_endpoint_record, build_admin_endpoint_health_status_payload,
|
||||
build_admin_endpoint_payload, build_admin_health_summary_payload,
|
||||
build_admin_key_health_payload, build_admin_key_rpm_payload,
|
||||
build_admin_provider_endpoints_payload, build_admin_update_provider_endpoint_record,
|
||||
recover_admin_key_health, recover_all_admin_key_health,
|
||||
};
|
||||
pub(crate) use self::gemini_files::maybe_build_local_admin_gemini_files_response;
|
||||
use self::gemini_files::*;
|
||||
pub(crate) use self::global_models::maybe_build_local_admin_global_models_response;
|
||||
use self::global_models::*;
|
||||
pub(crate) use self::ldap::maybe_build_local_admin_ldap_response;
|
||||
use self::ldap::*;
|
||||
use self::misc_helpers::{
|
||||
admin_default_body_rules_api_format, admin_endpoint_id, admin_health_key_id,
|
||||
admin_provider_id_for_endpoints, admin_recover_key_id, admin_rpm_key_id,
|
||||
attach_admin_audit_response, build_admin_provider_endpoint_response,
|
||||
endpoint_key_counts_by_format, endpoint_timestamp_or_now, json_truthy,
|
||||
key_api_formats_without_entry,
|
||||
};
|
||||
use self::models_helpers::*;
|
||||
pub(crate) use self::monitoring::maybe_build_local_admin_monitoring_response;
|
||||
use self::oauth_helpers::*;
|
||||
pub(crate) use self::payments::maybe_build_local_admin_payments_response;
|
||||
use self::payments::*;
|
||||
pub(crate) use self::pool::maybe_build_local_admin_pool_response;
|
||||
use self::pool::*;
|
||||
pub(crate) use self::provider_models::maybe_build_local_admin_provider_models_response;
|
||||
use self::provider_models::*;
|
||||
pub(crate) use self::provider_oauth_dispatch::maybe_build_local_admin_provider_oauth_response;
|
||||
use self::provider_oauth_dispatch::*;
|
||||
use self::provider_oauth_quota::{
|
||||
normalize_string_id_list, refresh_antigravity_provider_quota_locally,
|
||||
refresh_codex_provider_quota_locally, refresh_kiro_provider_quota_locally,
|
||||
};
|
||||
use self::provider_oauth_refresh::{
|
||||
build_internal_control_error_response, normalize_provider_oauth_refresh_error_message,
|
||||
};
|
||||
pub(crate) use self::provider_ops::admin_provider_ops_local_action_response;
|
||||
pub(crate) use self::provider_ops::maybe_build_local_admin_provider_ops_response;
|
||||
pub(crate) use self::provider_query::maybe_build_local_admin_provider_query_response;
|
||||
use self::provider_query::*;
|
||||
pub(crate) use self::provider_strategy::maybe_build_local_admin_provider_strategy_response;
|
||||
use self::provider_strategy::*;
|
||||
pub(crate) use self::providers::maybe_build_local_admin_providers_response;
|
||||
use self::providers::*;
|
||||
use self::providers_helpers::*;
|
||||
pub(crate) use self::proxy_nodes::maybe_build_local_admin_proxy_nodes_response;
|
||||
use self::proxy_nodes::*;
|
||||
pub(crate) use self::security::maybe_build_local_admin_security_response;
|
||||
use self::security::*;
|
||||
pub(crate) use self::stats::maybe_build_local_admin_stats_response;
|
||||
use self::stats::{
|
||||
aggregate_usage_stats, list_usage_for_optional_range, parse_bounded_u32, round_to,
|
||||
AdminStatsTimeRange, AdminStatsUsageFilter,
|
||||
};
|
||||
pub(crate) use self::usage::maybe_build_local_admin_usage_response;
|
||||
use self::usage::*;
|
||||
pub(crate) use self::users::maybe_build_local_admin_users_response;
|
||||
use self::users::*;
|
||||
pub(crate) use self::video_tasks::maybe_build_local_admin_video_tasks_response;
|
||||
use self::video_tasks::*;
|
||||
pub(crate) use self::wallets::maybe_build_local_admin_wallets_response;
|
||||
use self::wallets::*;
|
||||
pub(crate) mod auth;
|
||||
pub(crate) mod billing;
|
||||
pub(crate) mod endpoint;
|
||||
pub(crate) mod features;
|
||||
pub(crate) mod model;
|
||||
pub(crate) mod observability;
|
||||
pub(crate) mod provider;
|
||||
pub(crate) mod system;
|
||||
pub(crate) mod users;
|
||||
|
||||
Reference in New Issue
Block a user