opencode-free had no PROVIDER_TO_MODELS_DEV entry, so every models.dev lookup on the free tier missed and Muse Spark fell to the 256K default. The free tier is served by the Zen relay (hermes_cli/models.py: "opencode-free is Zen-hosted"), and models.dev's "opencode" provider is the catalog that lists muse-spark-1.2 / -1.2-contributor-free / -1.3-contributor-free at 1,048,576 — so the alias is "opencode", not "opencode-go" (Go's catalog carries only the paid -contributor SKUs). Missing alias identified by @Steve-prog001 in #101905. Tests: one parametrized offline invariant (models.dev + live /models mocked away) asserting 1,048,576 on opencode-free / opencode-go / meta-ai / commandcode — fails on main, passes here — plus the alias pin.
14 lines
485 B
Python
14 lines
485 B
Python
"""Muse Spark hosts map to the right models.dev provider id (context/pricing)."""
|
|
|
|
from agent.models_dev import PROVIDER_TO_MODELS_DEV
|
|
|
|
|
|
def test_meta_ai_maps_to_meta():
|
|
assert PROVIDER_TO_MODELS_DEV.get("meta-ai") == "meta"
|
|
assert PROVIDER_TO_MODELS_DEV.get("meta") == "meta"
|
|
|
|
|
|
def test_opencode_free_maps_to_zen_catalog():
|
|
# The free tier is served by the Zen relay, whose models.dev id is "opencode".
|
|
assert PROVIDER_TO_MODELS_DEV.get("opencode-free") == "opencode"
|