feat: add Novita AI provider

This commit is contained in:
Alex-wuhu authored and Xubin Ren committed 2026-05-21 16:16:32 +08:00
1 parent 835bab5f5a
commit 0d1d23b5fb
5 files changed
+39

No files matched your search

+16
View File
@@ -192,3 +192,19 @@ def test_match_provider_uses_preset_provider_when_forced() -> None:
})
name = config.get_provider_name()
assert name == "anthropic"
def test_match_provider_routes_novita_prefixed_models() -> None:
config = Config.model_validate({
"providers": {
"novita": {"apiKey": "sk-test"},
},
"agents": {
"defaults": {
"model": "novita/deepseek/deepseek-v4-pro",
}
},
})
assert config.get_provider_name() == "novita"
assert config.get_api_base() == "https://api.novita.ai/openai"