diff --git a/src/tau_coding/data/catalog.toml b/src/tau_coding/data/catalog.toml index 65d2f8327..a15a96a04 100644 --- a/src/tau_coding/data/catalog.toml +++ b/src/tau_coding/data/catalog.toml @@ -6170,3 +6170,167 @@ context_window = 1048576 max_tokens = 131072 compat = { requiresReasoningContentOnAssistantMessages = true, thinkingFormat = "deepseek" } cost = { input = 1, output = 3, cacheRead = 0.2, cacheWrite = 0 } + +[[providers]] +name = "stepfun" +display_name = "StepFun" +kind = "openai-compatible" +base_url = "https://api.stepfun.ai/v1" +api_key_env = "STEPFUN_API_KEY" +credential_name = "stepfun" +models = ["step-3.7-flash", "step-3.5-flash", "step-3.5-flash-2603"] +default_model = "step-3.7-flash" +docs_url = "https://platform.stepfun.ai/docs" +api = "openai-completions" +thinking_levels = ["low", "medium", "high"] +thinking_default = "medium" +thinking_parameter = "reasoning_effort" + +[providers.context_windows] +"step-3.7-flash" = 262144 +"step-3.5-flash" = 262144 +"step-3.5-flash-2603" = 262144 + +[providers.model_metadata."step-3.7-flash"] +name = "Step 3.7 Flash" +reasoning = true +input = ["text", "image"] +context_window = 262144 +cost = { input = 0.2, output = 1.15, cacheRead = 0.04, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash"] +name = "Step 3.5 Flash" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash-2603"] +name = "Step 3.5 Flash (2603)" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[[providers]] +name = "stepfun-cn" +display_name = "StepFun (China)" +kind = "openai-compatible" +base_url = "https://api.stepfun.com/v1" +api_key_env = "STEPFUN_CN_API_KEY" +credential_name = "stepfun-cn" +models = ["step-3.7-flash", "step-3.5-flash", "step-3.5-flash-2603"] +default_model = "step-3.7-flash" +docs_url = "https://platform.stepfun.com/docs" +api = "openai-completions" +thinking_levels = ["low", "medium", "high"] +thinking_default = "medium" +thinking_parameter = "reasoning_effort" + +[providers.context_windows] +"step-3.7-flash" = 262144 +"step-3.5-flash" = 262144 +"step-3.5-flash-2603" = 262144 + +[providers.model_metadata."step-3.7-flash"] +name = "Step 3.7 Flash" +reasoning = true +input = ["text", "image"] +context_window = 262144 +cost = { input = 0.2, output = 1.15, cacheRead = 0.04, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash"] +name = "Step 3.5 Flash" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash-2603"] +name = "Step 3.5 Flash (2603)" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[[providers]] +name = "stepfun-step-plan" +display_name = "StepFun Step Plan" +kind = "openai-compatible" +base_url = "https://api.stepfun.ai/step_plan/v1" +api_key_env = "STEPFUN_STEP_PLAN_API_KEY" +credential_name = "stepfun-step-plan" +models = ["step-3.7-flash", "step-3.5-flash", "step-3.5-flash-2603"] +default_model = "step-3.7-flash" +docs_url = "https://platform.stepfun.ai/docs/en/step-plan/overview" +api = "openai-completions" +thinking_levels = ["low", "medium", "high"] +thinking_default = "medium" +thinking_parameter = "reasoning_effort" + +[providers.context_windows] +"step-3.7-flash" = 262144 +"step-3.5-flash" = 262144 +"step-3.5-flash-2603" = 262144 + +[providers.model_metadata."step-3.7-flash"] +name = "Step 3.7 Flash" +reasoning = true +input = ["text", "image"] +context_window = 262144 +cost = { input = 0.2, output = 1.15, cacheRead = 0.04, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash"] +name = "Step 3.5 Flash" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash-2603"] +name = "Step 3.5 Flash (2603)" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[[providers]] +name = "stepfun-step-plan-cn" +display_name = "StepFun Step Plan (China)" +kind = "openai-compatible" +base_url = "https://api.stepfun.com/step_plan/v1" +api_key_env = "STEPFUN_STEP_PLAN_CN_API_KEY" +credential_name = "stepfun-step-plan-cn" +models = ["step-3.7-flash", "step-3.5-flash", "step-3.5-flash-2603"] +default_model = "step-3.7-flash" +docs_url = "https://platform.stepfun.com/docs/zh/step-plan/overview" +api = "openai-completions" +thinking_levels = ["low", "medium", "high"] +thinking_default = "medium" +thinking_parameter = "reasoning_effort" + +[providers.context_windows] +"step-3.7-flash" = 262144 +"step-3.5-flash" = 262144 +"step-3.5-flash-2603" = 262144 + +[providers.model_metadata."step-3.7-flash"] +name = "Step 3.7 Flash" +reasoning = true +input = ["text", "image"] +context_window = 262144 +cost = { input = 0.2, output = 1.15, cacheRead = 0.04, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash"] +name = "Step 3.5 Flash" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } + +[providers.model_metadata."step-3.5-flash-2603"] +name = "Step 3.5 Flash (2603)" +reasoning = true +input = ["text"] +context_window = 262144 +cost = { input = 0.1, output = 0.3, cacheRead = 0.02, cacheWrite = 0 } diff --git a/tests/test_provider_catalog.py b/tests/test_provider_catalog.py index c87205258..ab0728019 100644 --- a/tests/test_provider_catalog.py +++ b/tests/test_provider_catalog.py @@ -72,6 +72,10 @@ def test_builtin_catalog_matches_expected_providers() -> None: "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp", + "stepfun", + "stepfun-cn", + "stepfun-step-plan", + "stepfun-step-plan-cn", ] diff --git a/tests/test_provider_config.py b/tests/test_provider_config.py index 510c28a7f..3467d2645 100644 --- a/tests/test_provider_config.py +++ b/tests/test_provider_config.py @@ -58,6 +58,10 @@ def test_load_provider_settings_missing_file_uses_openai_default(tmp_path: Path) "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp", + "stepfun", + "stepfun-cn", + "stepfun-step-plan", + "stepfun-step-plan-cn", ] assert settings.providers[0].default_model == DEFAULT_MODEL assert settings.get_provider("anthropic").api_key_env == "ANTHROPIC_API_KEY"