//! 中转服务模块 pub mod types; pub mod service; pub mod handlers; pub mod key_pool; use axum::routing::{get, post}; use crate::state::AppState; /// 中转服务路由 (需要认证 + quota 中间件) pub fn routes() -> axum::Router { axum::Router::new() // Relay 核心端点 .route("/api/v1/relay/chat/completions", post(handlers::chat_completions)) .route("/api/v1/relay/tasks", get(handlers::list_tasks)) .route("/api/v1/relay/tasks/:id", get(handlers::get_task)) .route("/api/v1/relay/tasks/:id/retry", post(handlers::retry_task)) .route("/api/v1/relay/models", get(handlers::list_available_models)) }