mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-13 04:29:50 +08:00
refactor: 移除 Python upstream 依赖,清理全部 legacy/Python 兼容层
- 移除 upstream_base_url 参数及 AETHER_GATEWAY_UPSTREAM 环境变量,gateway 不再需要指向 Python 宿主 - 删除所有 LEGACY_*/PYTHON_* 常量、路由组、header 定义及 sunset/phaseout 机制 - 将 legacy_gateway_bridge 重命名为 internal_gateway,executor 相关命名统一为 execution_runtime - dev.sh 新增 Postgres/Redis 预检查,移除 upstream 相关启动参数和提示 - 新增 ai_public 路由处理器 - 全量适配 handler、test、state、control 等模块的命名和接口变更
This commit is contained in:
@@ -103,7 +103,9 @@ mod tests {
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
use super::*;
|
||||
use super::{
|
||||
prefer_local_tunnel_owner_candidates, GatewayMinimalCandidateSelectionCandidate, AppState,
|
||||
};
|
||||
use crate::gateway::tunnel::TunnelAttachmentRecord;
|
||||
use crate::gateway::GatewayDataState;
|
||||
|
||||
@@ -245,7 +247,7 @@ mod tests {
|
||||
.expect("local attachment should serialize"),
|
||||
),
|
||||
]);
|
||||
let state = AppState::new("http://127.0.0.1:1")
|
||||
let state = AppState::new()
|
||||
.expect("state should build")
|
||||
.with_data_state_for_tests(data_state)
|
||||
.with_tunnel_identity_for_tests("gateway-a", Some("http://gateway-a:8080"));
|
||||
@@ -274,7 +276,7 @@ mod tests {
|
||||
std::sync::Arc::new(provider_catalog),
|
||||
"development-key",
|
||||
);
|
||||
let state = AppState::new("http://127.0.0.1:1")
|
||||
let state = AppState::new()
|
||||
.expect("state should build")
|
||||
.with_data_state_for_tests(data_state)
|
||||
.with_tunnel_identity_for_tests("gateway-a", Some("http://gateway-a:8080"));
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
use super::*;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use serde_json::Value;
|
||||
use url::form_urlencoded;
|
||||
|
||||
use super::{
|
||||
apply_local_body_rules, build_antigravity_v1internal_url, build_claude_code_messages_url,
|
||||
build_claude_messages_url, build_gemini_content_url,
|
||||
build_kiro_generate_assistant_response_url, build_kiro_provider_request_body,
|
||||
build_passthrough_path_url, build_vertex_api_key_gemini_content_url,
|
||||
resolve_local_vertex_api_key_query_auth, sanitize_claude_code_request_body,
|
||||
AntigravityRequestUrlAction, LocalSameFormatProviderFamily, LocalSameFormatProviderSpec,
|
||||
};
|
||||
|
||||
pub(super) fn build_same_format_provider_request_body(
|
||||
body_json: &Value,
|
||||
|
||||
@@ -156,7 +156,8 @@ fn build_openai_chat_request_body(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::build_standard_request_body;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
fn builds_openai_chat_request_from_claude_chat_source() {
|
||||
|
||||
@@ -306,7 +306,8 @@ pub(crate) fn build_cross_format_openai_cli_upstream_url(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::build_cross_format_openai_cli_request_body;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
fn builds_openai_family_cross_format_request_body_from_compact_source() {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use aether_contracts::RequestBody;
|
||||
use aether_contracts::{ExecutionPlan, RequestBody};
|
||||
|
||||
use super::augment_sync_report_context;
|
||||
use super::*;
|
||||
use super::{augment_sync_report_context, LocalStreamPlanAndReport, LocalSyncPlanAndReport};
|
||||
use crate::gateway::ai_pipeline::adaptation::surfaces::provider_adaptation_requires_eventstream_accept;
|
||||
use crate::gateway::ai_pipeline::planner::generic_decision_missing_exact_provider_request;
|
||||
use crate::gateway::provider_transport::ensure_upstream_auth_header;
|
||||
use crate::gateway::{GatewayControlSyncDecisionResponse, GatewayError};
|
||||
|
||||
pub(crate) fn build_standard_sync_plan_from_decision(
|
||||
_parts: &http::request::Parts,
|
||||
|
||||
Reference in New Issue
Block a user