test(hermes_cli): keep one opencode-go delisting invariant; record the delisting beside the keyed-suffix set
Drop the floor-pin test from #106290 (a snapshot of the static table); the end-to-end merge test through provider_model_ids with the real curated floor already fails if the slug is re-added. Note beside _OPENCODE_FREE_KEYED_SUFFIX_MODELS why ox-alpha-free stays excluded from the keyless catalog even though it left the curated floor.
This commit is contained in:
@@ -1985,6 +1985,9 @@ _OPENCODE_ZEN_FREE_BASE_URL = "https://opencode.ai/zen/v1"
|
||||
|
||||
# ``-free``-suffixed slugs that are KEYED (Go-subscription) models, NOT anonymous-servable —
|
||||
# excluded from the keyless catalog despite the suffix (ox-alpha-free is Ox Alpha's Go twin).
|
||||
# The Go relay delisted ox-alpha-free (2026-09-09; GET /zen/go/v1/models omits it, POST → 401),
|
||||
# so it is gone from the opencode-go curated floor too — the exclusion stays so a stale live
|
||||
# list can never route it into the keyless catalog.
|
||||
_OPENCODE_FREE_KEYED_SUFFIX_MODELS = frozenset({"ox-alpha-free"})
|
||||
|
||||
# In-process memo for _fetch_opencode_free_models(): (fetched_at, ids-or-None). Validation and
|
||||
|
||||
@@ -16,7 +16,6 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
from hermes_cli.models import (
|
||||
_LIVE_FIRST_PICKER_PROVIDERS,
|
||||
_PROVIDER_MODELS,
|
||||
provider_model_ids,
|
||||
)
|
||||
|
||||
@@ -107,8 +106,3 @@ class TestGenericProviderLiveCuratedMerge:
|
||||
assert "ox-alpha-free" not in result
|
||||
assert {"deepseek-v4-flash", "kimi-k3", "omen-alpha"} <= set(result)
|
||||
|
||||
def test_opencode_go_curated_floor_excludes_delisted_ox_alpha_free(self):
|
||||
"""The static floor must not carry a known-delisted Go model (offline fallback must
|
||||
not offer a model that 401s — same policy as opencode-free/x-preview-f-free)."""
|
||||
assert "ox-alpha-free" not in _PROVIDER_MODELS["opencode-go"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user