feat: add Novita AI provider

This commit is contained in:
Alex-wuhu
2026-05-21 16:16:32 +08:00
committed by Xubin Ren
parent 835bab5f5a
commit 0d1d23b5fb
5 changed files with 39 additions and 0 deletions
+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"