mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 18:37:46 +08:00
feat: 扩展 Rust gateway 全功能模块,新增 billing/crypto/wallet crate 及完整数据层
- 新增 aether-billing、aether-crypto、aether-wallet 独立 crate - aether-data 扩展 repository 层:announcements、auth_modules、billing、 candidate_selection、gemini_file_mappings、global_models、management_tokens、 oauth_providers、proxy_nodes、quota、users、wallet 等模块 - aether-gateway 新增 api/auth/billing/control/middleware/scheduler/usage/ video_tasks/hooks/maintenance/model_fetch/provider_transport 等功能模块 - 重构 executor decision 和 gateway state 为模块目录结构 - 新增 gateway router、frontdoor 路由层及对应测试 - Python 侧 API 路由重构,新增 compat/support 模块 - 前端 Logo 组件更新及 Provider 管理页面调整
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
use super::{classified, ClassifiedRoute};
|
||||
|
||||
pub(super) fn classify_internal_route(
|
||||
method: &http::Method,
|
||||
normalized_path: &str,
|
||||
) -> Option<ClassifiedRoute> {
|
||||
if method == http::Method::POST && normalized_path.starts_with("/api/internal/gateway/") {
|
||||
let route_kind = match normalized_path {
|
||||
"/api/internal/gateway/resolve" => "resolve",
|
||||
"/api/internal/gateway/auth-context" => "auth_context",
|
||||
"/api/internal/gateway/decision-sync" => "decision_sync",
|
||||
"/api/internal/gateway/decision-stream" => "decision_stream",
|
||||
"/api/internal/gateway/plan-sync" => "plan_sync",
|
||||
"/api/internal/gateway/plan-stream" => "plan_stream",
|
||||
"/api/internal/gateway/report-sync" => "report_sync",
|
||||
"/api/internal/gateway/report-stream" => "report_stream",
|
||||
"/api/internal/gateway/finalize-sync" => "finalize_sync",
|
||||
"/api/internal/gateway/execute-sync" => "execute_sync",
|
||||
"/api/internal/gateway/execute-stream" => "execute_stream",
|
||||
_ => "legacy_gateway",
|
||||
};
|
||||
Some(classified(
|
||||
"internal_proxy",
|
||||
"gateway_legacy",
|
||||
route_kind,
|
||||
"",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::POST && normalized_path == "/api/internal/hub/heartbeat" {
|
||||
Some(classified(
|
||||
"internal_proxy",
|
||||
"hub_manage",
|
||||
"heartbeat",
|
||||
"",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::POST && normalized_path == "/api/internal/hub/node-status" {
|
||||
Some(classified(
|
||||
"internal_proxy",
|
||||
"hub_manage",
|
||||
"node_status",
|
||||
"",
|
||||
false,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user