feat: add Chinese UI, Responses models, and mirrored Windows setup
Localize the web console and persist custom model and capability settings. Use OpenAI Responses exclusively and move runtime limits into environment configuration. Bootstrap uv and the virtual environment on Windows, support optional China mirrors, and package source distributions without environments, build output, or credentials. Update regression tests and repository quality checks for the new behavior.
This commit is contained in:
1 parent
371aa6df56
commit
2ddec53954
183 files changed
+3427
-11857
No files matched your search
@@ -93,25 +93,23 @@ def test_settings_and_api_key_fallbacks(monkeypatch):
|
||||
OCR_API_KEY=SecretStr("ocr_key_789"),
|
||||
)
|
||||
# Automatic fallback should populate GOOGLE_API_KEY from GEMINI_API_KEY
|
||||
assert custom_settings.GOOGLE_API_KEY is not None
|
||||
assert custom_settings.GOOGLE_API_KEY.get_secret_value() == "gemini_key_123"
|
||||
assert custom_settings.get_api_key("ocr").get_secret_value() == "ocr_key_789"
|
||||
|
||||
assert custom_settings.get_api_key("google").get_secret_value() == "gemini_key_123"
|
||||
assert custom_settings.get_api_key("gemini").get_secret_value() == "gemini_key_123"
|
||||
assert custom_settings.get_api_key("google") is None
|
||||
assert custom_settings.get_api_key("gemini") is None
|
||||
assert custom_settings.get_api_key("openai").get_secret_value() == "openai_key_456"
|
||||
assert custom_settings.get_api_key("nonexistent") is None
|
||||
|
||||
# Test dynamic set_api_key
|
||||
custom_settings.set_api_key("xai", "xai_test_key", persist_to_env=False)
|
||||
assert custom_settings.get_api_key("xai").get_secret_value() == "xai_test_key"
|
||||
custom_settings.set_api_key("openai", "new_test_key", persist_to_env=False)
|
||||
assert custom_settings.get_api_key("openai").get_secret_value() == "new_test_key"
|
||||
|
||||
|
||||
def test_placeholder_api_key_filtering(monkeypatch):
|
||||
"""Test that default template placeholders are filtered out and treated as unconfigured."""
|
||||
from artemis.config.settings import is_placeholder_key
|
||||
|
||||
assert is_placeholder_key("your_gemini_api_key_here") is True
|
||||
assert is_placeholder_key("your_openai_api_key_here") is True
|
||||
assert is_placeholder_key("your_google_cloud_vision_api_key_here") is True
|
||||
assert is_placeholder_key("your_openai_api_key_here") is True
|
||||
assert is_placeholder_key("your_custom_key_here") is True
|
||||
@@ -138,7 +136,7 @@ def test_placeholder_api_key_filtering(monkeypatch):
|
||||
|
||||
placeholder_settings = Settings(
|
||||
_env_file=None,
|
||||
GEMINI_API_KEY=SecretStr("your_gemini_api_key_here"),
|
||||
GEMINI_API_KEY=SecretStr("your_openai_api_key_here"),
|
||||
OPENAI_API_KEY=SecretStr("your_openai_api_key_here"),
|
||||
OCR_API_KEY=SecretStr("your_google_cloud_vision_api_key_here"),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user