feat: unify model selection and complete favorite settings

This commit is contained in:
chenmingxuan committed 2026-10-18 20:03:41 +08:00
1 parent a4a5430922
commit 50638d4130
24 files changed
+347 -90

No files matched your search

@@ -91,19 +91,27 @@ def test_new_install_uses_playones_endpoint_without_overriding_saved_url(monkeyp
assert service.get_model_settings()["base_url"] == "https://saved.example/v1"
def test_model_presets_include_flash_pro_and_luna_without_restricting_custom_names():
def test_model_presets_keep_supported_choices_without_restricting_custom_names():
presets = service.get_model_settings()["model_presets"]
assert presets == [
"gpt-6-luna",
"gpt-6.1-sol",
"gpt-6-astra",
"gpt-5.6-luna",
"gpt-6-luna",
"mimo-v2.6-flash",
"mimo-v2.6-pro",
]
assert service.ModelSettingsUpdate(model="custom/model-v2").model == "custom/model-v2"
def test_new_install_defaults_to_luna_high_and_preserves_saved_model(isolated_settings):
from artemis.config.constants import DEFAULT_MODEL
fresh = Settings(_env_file=None)
assert DEFAULT_MODEL == fresh.OPENAI_MODEL == "gpt-6-luna"
assert fresh.OPENAI_REASONING_EFFORT == "high"
isolated_settings.write_text("OPENAI_MODEL=custom/existing\n", encoding="utf-8")
assert Settings(_env_file=isolated_settings).OPENAI_MODEL == "custom/existing"
@pytest.mark.parametrize(
"url",
[