From a87ca2513178be316897c8ec62bbe10ca23e6854 Mon Sep 17 00:00:00 2001 From: nordiskfamily Date: Tue, 10 Nov 2026 04:09:29 +0800 Subject: [PATCH 1/2] fix(catalog): ship a complete static fallback model list --- __init__.py | 17 ++++++++++++++++- tests/test_muse_code_provider.py | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index b78bcd3..f2ade9b 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 list so a picker (Settings -> Model) always has models to + # show even when the live probe cannot run in that process: a single + # or empty fallback renders as "Could not load models" and blocks + # Apply. Mirrors the chat ids GET /v1/models returns on a standard + # subscription; muse-wonder-full-1.0 (Power/Maximum tier) is excluded + # so the fallback never advertises a model most subscribers cannot + # use. Live discovery still wins when it can run. + 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..92d5b8c 100644 --- a/tests/test_muse_code_provider.py +++ b/tests/test_muse_code_provider.py @@ -125,7 +125,23 @@ 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(): + _, 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 def test_client_restriction_is_not_classified_as_invalid_auth(tmp_path, monkeypatch): From 90db04ed7350658c86695287355b80536921174e Mon Sep 17 00:00:00 2001 From: nordiskfamily Date: Tue, 10 Nov 2026 04:23:52 +0800 Subject: [PATCH 2/2] fix(catalog): make fallback test hermetic, correct comment, add changelog --- CHANGELOG.md | 10 ++++++++++ __init__.py | 14 +++++++------- tests/test_muse_code_provider.py | 9 ++++++++- 3 files changed, 25 insertions(+), 8 deletions(-) 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 f2ade9b..790318e 100644 --- a/__init__.py +++ b/__init__.py @@ -300,13 +300,13 @@ 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. - # Static list so a picker (Settings -> Model) always has models to - # show even when the live probe cannot run in that process: a single - # or empty fallback renders as "Could not load models" and blocks - # Apply. Mirrors the chat ids GET /v1/models returns on a standard - # subscription; muse-wonder-full-1.0 (Power/Maximum tier) is excluded - # so the fallback never advertises a model most subscribers cannot - # use. Live discovery still wins when it can run. + # 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", diff --git a/tests/test_muse_code_provider.py b/tests/test_muse_code_provider.py index 92d5b8c..16e35d7 100644 --- a/tests/test_muse_code_provider.py +++ b/tests/test_muse_code_provider.py @@ -136,12 +136,19 @@ def test_provider_registered_with_expected_wiring(tmp_path, monkeypatch): ) -def test_fallback_never_advertises_full_tier_models(): +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):