fix(context): add muse-spark 1M fallback (zen/GO SG showed 256k)

Muse Spark 1.2 family (api.meta.ai) ships 1M context (models.dev
opencode/muse-spark-1.2 = 1048576, meta/muse-spark-1.2 = 1048576).

Zen/GO SG /v1/models only returns id (no limit.context), and
models.dev lookup via opencode was missing a hardcoded fallback, so
get_model_context_length fell back to DEFAULT_FALLBACK_CONTEXT=256k.
Banner showed Context: 256,000 for both zen and router-sg lanes.

Add longest-prefix entries 'muse-spark' and 'muse' = 1_048_576 so
all variants (1.1, 1.2, contributor, contributor-free) resolve to 1M
without network.
This commit is contained in:
GTHell
2026-08-31 00:55:22 +07:00
committed by Teknium
parent fa53e4fedd
commit bb8f4afa46
+6
View File
@@ -677,6 +677,12 @@ DEFAULT_CONTEXT_LENGTHS = {
"mimo-v2-omni": 262144,
"mimo-v2-flash": 262144,
"zai-org/GLM-5": 202752,
# Meta Muse Spark — 1M context (1,048,576; verified via models.dev
# opencode/opencode-go/meta and api.commandcode.ai /models). Covers every
# variant: 1.1, 1.2, 1.3, -contributor, -contributor-free. Kept to the
# "muse-spark" prefix on purpose: a bare "muse" key would also match
# muse-image / muse-voice.
"muse-spark": 1_048_576,
}
# xAI Grok models that ACCEPT the `reasoning.effort` parameter on