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:
fawney19
2026-03-31 19:19:04 +08:00
parent b5a0070023
commit ddf18fed9a
690 changed files with 235087 additions and 16301 deletions

View File

@@ -9,6 +9,7 @@ from src.services.request.executor_plan import (
ExecutionPlanTimeouts,
ExecutionProxySnapshot,
build_execution_plan_body,
should_bypass_remote_executor_url,
)
@@ -342,3 +343,43 @@ def test_prepared_execution_plan_remote_eligible_allows_empty_get_body() -> None
)
assert prepared.remote_eligible is True
def test_prepared_execution_plan_remote_eligible_rejects_codex_cli_transport() -> None:
prepared = PreparedExecutionPlan(
contract=ExecutionPlan(
request_id="req-1",
candidate_id=None,
provider_name="codex",
provider_id="prov-1",
endpoint_id="ep-1",
key_id="key-1",
method="POST",
url="https://chatgpt.com/backend-api/codex/responses",
headers={"content-type": "application/json"},
body=ExecutionPlanBody(json_body={"model": "gpt-5.4", "input": []}),
stream=True,
provider_api_format="openai:cli",
client_api_format="openai:cli",
model_name="gpt-5.4",
),
payload={"model": "gpt-5.4", "input": []},
headers={"content-type": "application/json"},
upstream_is_stream=True,
needs_conversion=False,
provider_type="codex",
request_timeout=30.0,
)
assert prepared.remote_eligible is False
def test_should_bypass_remote_executor_url_accepts_backendapi_codex_variant() -> None:
assert (
should_bypass_remote_executor_url(
"https://chatgpt.com/backendapi/codex/responses",
provider_api_format="openai:cli",
client_api_format="openai:cli",
)
is True
)