chore: post-deployment cleanup and docs update
- Make AI routing rules DB-driven (read from system_configs, removed from config.py) - Add translation quota tracking to LLM translation (OpenAIProvider) - Add Alibaba MT ECS RAM role support (STS token, no AccessKey needed) - Fix admin sidebar link for AI模型配置 page - Fix Quota.vue API path (quotas → translation-quotas) - Fix login auto-redirect to dashboard - Add provider dropdown selects to AI routing config UI - Clean up stale ai_provider_* system_configs records - Remove OpencodeGo, Spark providers (code + DB) - Update deploy config: nginx port 8000, systemd cwd
This commit is contained in:
@@ -14,11 +14,12 @@ class TestConfig:
|
||||
assert settings.REFRESH_TOKEN_EXPIRE_DAYS == 30
|
||||
|
||||
def test_ai_routing_config(self):
|
||||
assert "translate" in settings.AI_ROUTING
|
||||
assert "reply" in settings.AI_ROUTING
|
||||
assert "marketing" in settings.AI_ROUTING
|
||||
assert "extract" in settings.AI_ROUTING
|
||||
assert "primary" in settings.AI_ROUTING["translate"]
|
||||
from app.ai.router import DEFAULT_ROUTING
|
||||
assert "translate" in DEFAULT_ROUTING
|
||||
assert "reply" in DEFAULT_ROUTING
|
||||
assert "marketing" in DEFAULT_ROUTING
|
||||
assert "extract" in DEFAULT_ROUTING
|
||||
assert "primary" in DEFAULT_ROUTING["translate"]
|
||||
|
||||
def test_free_tier_limits(self):
|
||||
assert settings.FREE_DAILY_TRANSLATE_CHARS == 5000
|
||||
|
||||
Reference in New Issue
Block a user