feat(llm): refresh the model lists to each provider's current lineup

- xAI: Grok 4.6 and 4.5; DeepSeek: deepseek-flash (V4.1); Qwen: the 3.8 series; Mistral: the current dated snapshots
- every provider can name a model the picker does not list
- retired IDs stay valid, so existing configs run without a warning
This commit is contained in:
Yijia-Xiao
2026-09-18 01:14:05 +00:00
parent ed6eae44b6
commit 10cc070fa3
2 changed files with 71 additions and 18 deletions

View File

@@ -64,3 +64,37 @@ def test_legacy_ids_stay_valid_without_being_offered():
for model in ids:
assert validate_model(provider, model), model
assert model not in offered, f"{model} is legacy but still in the picker"
@pytest.mark.unit
def test_an_explicit_alias_of_a_listed_model_is_known():
"""gpt-5.6 is served under its own name and as gpt-5.6-sol; naming the
explicit one should not warn that the model is unknown."""
from tradingagents.llm_clients.validators import validate_model
assert validate_model("openai", "gpt-5.6-sol")
@pytest.mark.unit
@pytest.mark.parametrize("provider", ["openai", "anthropic", "google", "xai"])
@pytest.mark.parametrize("mode", ["quick", "deep"])
def test_every_provider_lets_you_name_your_own_model(provider, mode):
"""The docs tell users to name any model their provider serves; the picker
has to offer that too, or a new model is unreachable until we ship a list."""
from tradingagents.llm_clients.model_catalog import get_model_options
assert "custom" in [value for _, value in get_model_options(provider, mode)]
@pytest.mark.unit
@pytest.mark.parametrize("provider, model", [
("xai", "grok-4.20-0309-reasoning"),
("deepseek", "deepseek-v4-flash"),
("qwen", "qwen3.7-max"),
])
def test_a_retired_model_id_still_runs_without_a_warning(provider, model):
"""A config written against an earlier release keeps working: the provider
still serves these, they are just no longer offered in the picker."""
from tradingagents.llm_clients.validators import validate_model
assert validate_model(provider, model)