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

@@ -6,6 +6,7 @@ from urllib.parse import parse_qs, urlparse
import httpx
import pytest
from src.services.auth.oauth.models import OAuthFlowError
from src.services.auth.oauth.providers.linuxdo import LinuxDoOAuthProvider
@@ -33,6 +34,28 @@ def test_linuxdo_authorization_url_omits_empty_scope() -> None:
assert params["state"] == ["state-1"]
@pytest.mark.asyncio
async def test_linuxdo_exchange_code_requires_rust_executor() -> None:
provider = LinuxDoOAuthProvider()
with pytest.raises(OAuthFlowError) as exc_info:
await provider.exchange_code(_make_config(), "code-0")
assert exc_info.value.error_code == "provider_unavailable"
assert exc_info.value.detail == "OAuth 仅支持 Rust executor"
@pytest.mark.asyncio
async def test_linuxdo_get_user_info_requires_rust_executor() -> None:
provider = LinuxDoOAuthProvider()
with pytest.raises(OAuthFlowError) as exc_info:
await provider.get_user_info(_make_config(), "access-token")
assert exc_info.value.error_code == "provider_unavailable"
assert exc_info.value.detail == "OAuth 仅支持 Rust executor"
@pytest.mark.asyncio
async def test_linuxdo_exchange_code_uses_basic_auth(monkeypatch: pytest.MonkeyPatch) -> None:
provider = LinuxDoOAuthProvider()