feat(webui): show resolved Auto API in preset selector
This commit is contained in:
1 parent
994ce51502
commit
73a27e0726
28 files changed
+464
-259
No files matched your search
@@ -356,6 +356,16 @@ def test_github_copilot_catalog_routes_advertised_model_apis(
|
||||
provider = GitHubCopilotProvider(default_model="github-copilot/unknown-responses-only")
|
||||
assert provider._should_use_responses_api(None, None)
|
||||
assert not provider._should_use_responses_api("github-copilot/claude-sonnet", "high")
|
||||
from nanobot.config.schema import Config, ModelPresetConfig
|
||||
from nanobot.providers.factory import resolve_automatic_model_api
|
||||
|
||||
for model, effort, expected in (
|
||||
("github-copilot/unknown-responses-only", None, "responses"),
|
||||
("github-copilot/claude-sonnet", "high", "chat_completions"),
|
||||
):
|
||||
assert resolve_automatic_model_api(Config(), preset=ModelPresetConfig(
|
||||
provider="github_copilot", model=model, reasoning_effort=effort,
|
||||
)) == ("github_copilot", expected)
|
||||
assert len(captured) == 2
|
||||
assert captured[0].headers["Authorization"] == "token github-secret"
|
||||
assert captured[1].headers["Authorization"] == "Bearer copilot-secret"
|
||||
|
||||
Reference in new issue
Block a user