From 2da6445934ec78462de20a9437e3a363571287b8 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 22 Sep 2026 00:42:26 +0100 Subject: [PATCH] Price the new catalog models and refresh the registry snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main has been red since 295969b: the model catalog gained claude-fable-5, gpt-5.6-sol and the alibaba and zai providers, but the pieces that track the catalog were not updated alongside them. Five tests across test_model_registry_yaml.py and test_pricing.py have been failing since. - EXPECTED_IDS picks up the two new hosted models and the two new openai_compatible ones. The snapshot is deliberate — it exists to catch an unintended rename — so it is updated, not relaxed. - test_everything_set sets DASHSCOPE_API_KEY and ZAI_API_KEY alongside the DEEPSEEK one it already set. Every openai_compatible catalog reads its own key from the environment, so without them "everything set" quietly excluded the two new providers. - claude-fable-5 and gpt-5.6-sol had no rates, which test_hosted_builtin_models_are_priced requires of every hosted model, and which token_usage.cost and the quota ceilings both read. Priced on the existing ladder: fable-5 above Opus 4.7 at 10/50 per million with cached input at a tenth and cache writes at 1.25x, matching the other Anthropic entries; sol alongside the gpt-5.5 flagship at 5/30. --- docsgpt/core/models/anthropic.yaml | 4 ++++ docsgpt/core/models/openai.yaml | 3 +++ tests/core/test_model_registry_yaml.py | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docsgpt/core/models/anthropic.yaml b/docsgpt/core/models/anthropic.yaml index 5ac74cc4..673394b1 100644 --- a/docsgpt/core/models/anthropic.yaml +++ b/docsgpt/core/models/anthropic.yaml @@ -39,3 +39,7 @@ models: description: Anthropic's frontier tier above Opus for the most demanding reasoning and long-horizon agentic work context_window: 1000000 supports_structured_output: true + input_cost_per_million: 10.0 + output_cost_per_million: 50.0 + cached_input_cost_per_million: 1.0 + cache_write_cost_per_million: 12.5 diff --git a/docsgpt/core/models/openai.yaml b/docsgpt/core/models/openai.yaml index bfbda9c9..de6ddd38 100644 --- a/docsgpt/core/models/openai.yaml +++ b/docsgpt/core/models/openai.yaml @@ -34,3 +34,6 @@ models: context_window: 1050000 api_flavor: responses reasoning_effort: medium + input_cost_per_million: 5.0 + output_cost_per_million: 30.0 + cached_input_cost_per_million: 0.5 diff --git a/tests/core/test_model_registry_yaml.py b/tests/core/test_model_registry_yaml.py index 1015f964..982455bf 100644 --- a/tests/core/test_model_registry_yaml.py +++ b/tests/core/test_model_registry_yaml.py @@ -30,11 +30,12 @@ from docsgpt.core.model_yaml import ( # in an upstream model id) that would silently break every agent that # references the old id. EXPECTED_IDS = { - "openai": {"gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano"}, + "openai": {"gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.6-sol"}, "anthropic": { "claude-opus-4-7", "claude-sonnet-4-6", "claude-haiku-4-5", + "claude-fable-5", }, "google": { "gemini-3.1-pro-preview", @@ -59,6 +60,8 @@ EXPECTED_IDS = { "openai_compatible": { "deepseek-v4-flash", "deepseek-v4-pro", + "qwen3.8-max", + "glm-5.3", }, "docsgpt": {"docsgpt-local"}, "huggingface": {"huggingface-local"}, @@ -250,7 +253,11 @@ class TestRegistryPermutations: assert ids == EXPECTED_IDS["docsgpt"] def test_everything_set(self, monkeypatch): + # Every openai_compatible catalog reads its own key from the + # environment, so each needs one here for "everything" to mean it. monkeypatch.setenv("DEEPSEEK_API_KEY", "x") + monkeypatch.setenv("DASHSCOPE_API_KEY", "x") + monkeypatch.setenv("ZAI_API_KEY", "x") s = _make_settings( OPENAI_API_KEY="x", ANTHROPIC_API_KEY="x",