diff --git a/CHANGELOG.md b/CHANGELOG.md index c5a2e80..2b75eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- The `muse-code` provider ships a static `fallback_models` list covering all + chat models a standard subscription exposes instead of only + `muse-spark-1.3`. A process where the live catalog probe cannot run shows + only the fallback ids in the model picker, so the previous single-model + fallback left every other subscription model unselectable there. + ## [0.6.1] - 2026-11-08 ### Fixed diff --git a/__init__.py b/__init__.py index b78bcd3..790318e 100644 --- a/__init__.py +++ b/__init__.py @@ -300,7 +300,22 @@ def build_api_kwargs_extras( # default_aux_model intentionally unset (= main model): the bundled # profile's contributor-tier default would silently opt background # compression into data training. - fallback_models=("muse-spark-1.3",), + # Static fallback mirroring the chat ids GET /v1/models returns on a + # standard subscription. When the live catalog probe cannot run in a + # process, the picker shows only these ids, so any subscription model + # missing here is unselectable there; when the probe succeeds, Hermes + # prepends this curated list ahead of the live results. + # muse-wonder-full-1.0 (Power/Maximum tier) is excluded so the + # fallback never advertises a model most subscribers cannot use. + fallback_models=( + "muse-wonder-1.0", + "muse-wonder-1.0-contributor", + "muse-spark-1.3", + "muse-spark-1.3-contributor", + "muse-spark-1.2", + "muse-spark-1.2-contributor", + "muse-spark-1.1", + ), ) register_provider(muse_code) diff --git a/tests/test_muse_code_provider.py b/tests/test_muse_code_provider.py index d9e86c0..16e35d7 100644 --- a/tests/test_muse_code_provider.py +++ b/tests/test_muse_code_provider.py @@ -125,7 +125,30 @@ def test_provider_registered_with_expected_wiring(tmp_path, monkeypatch): assert profile.api_mode == "codex_responses" assert profile.auth_type == "api_key" assert profile.env_vars == ("MUSE_CODE_SUB_TOKEN",) - assert profile.fallback_models == ("muse-spark-1.3",) + assert profile.fallback_models == ( + "muse-wonder-1.0", + "muse-wonder-1.0-contributor", + "muse-spark-1.3", + "muse-spark-1.3-contributor", + "muse-spark-1.2", + "muse-spark-1.2-contributor", + "muse-spark-1.1", + ) + + +def test_fallback_never_advertises_full_tier_models(tmp_path, monkeypatch): + monkeypatch.setenv("MUSE_CODE_SUB_CREDENTIALS", str(tmp_path / "absent.json")) + _, registered = _load_plugin() + fallback = registered["muse-code"].fallback_models + assert fallback, "fallback list must not be empty" + assert all(model.startswith("muse-") for model in fallback) + assert "muse-wonder-full-1.0" not in fallback + # Both subscription families must be represented, and more than one + # model, so a probe-less process never degrades the picker to a single + # entry. + assert "muse-wonder-1.0" in fallback + assert "muse-spark-1.3" in fallback + assert len(fallback) > 1 def test_client_restriction_is_not_classified_as_invalid_auth(tmp_path, monkeypatch):