Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
25 changes: 24 additions & 1 deletion tests/test_muse_code_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading