mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-08 14:12:22 +01:00
fix: recognize Conifer as a known provider endpoint (#6429)
* fix: recognize Conifer as a known provider endpoint Recognize Conifer (api.conifer.build) in providers.js endpoint labels and map conifer.build to the openrouter curation sentinel in routes/model_routes.py so server-returned models are displayed as curated while preserving OpenAI wire compatibility. Fixes #6205 * test(providers): remove trailing blank line --------- Co-authored-by: Alexandre Teixeira <general@alexandreteixeira.dev>
This commit is contained in:
co-authored by
Alexandre Teixeira
parent
ae03bb8363
commit
37454f9d34
@@ -232,6 +232,13 @@ class TestMatchProviderCurated:
|
||||
def test_kimi_code_url(self):
|
||||
assert _match_provider_curated("https://api.kimi.com/coding/v1", "openai") == "kimi-code"
|
||||
|
||||
def test_conifer_url(self):
|
||||
assert _match_provider_curated("https://api.conifer.build/v1", "openai") == "openrouter"
|
||||
assert _match_provider_curated("https://conifer.build/v1", "openai") == "openrouter"
|
||||
|
||||
def test_conifer_lookalike_url_not_matched(self):
|
||||
assert _match_provider_curated("https://conifer.build.attacker.example/v1", "openai") == "openai"
|
||||
|
||||
def test_no_url_match_returns_provider(self):
|
||||
assert _match_provider_curated("https://localhost:1234", "openai") == "openai"
|
||||
|
||||
@@ -339,6 +346,19 @@ class TestCurateModels:
|
||||
assert curated == models
|
||||
assert extra == []
|
||||
|
||||
def test_openrouter_sentinel_returns_all_as_curated(self):
|
||||
models = ["model-a", "model-b", "any-custom-model"]
|
||||
curated, extra = _curate_models(models, "openrouter")
|
||||
assert curated == models
|
||||
assert extra == []
|
||||
|
||||
def test_conifer_curate_models_via_match(self):
|
||||
models = ["conifer-model-1", "conifer-model-2"]
|
||||
curated_key = _match_provider_curated("https://api.conifer.build/v1", "openai")
|
||||
curated, extra = _curate_models(models, curated_key)
|
||||
assert curated == models
|
||||
assert extra == []
|
||||
|
||||
def test_kimi_code_partitions(self):
|
||||
models = ["kimi-for-coding", "other-model"]
|
||||
curated, extra = _curate_models(models, "kimi-code")
|
||||
|
||||
Reference in New Issue
Block a user