feat(cli): allow custom OpenRouter model IDs
This commit is contained in:
parent
4bcca59ee8
commit
2d41e39f89
|
|
@ -19,6 +19,31 @@ class OpenRouterModelSelectionTests(unittest.TestCase):
|
|||
)
|
||||
self.assertEqual(chosen, "minimax/minimax-m2.1")
|
||||
|
||||
def test_exit_on_no_choice(self):
|
||||
with self.assertRaises(SystemExit) as cm:
|
||||
resolve_model_choice("openrouter", None, "Quick-Thinking")
|
||||
self.assertEqual(cm.exception.code, 1)
|
||||
|
||||
def test_exit_on_empty_custom_model_input(self):
|
||||
with self.assertRaises(SystemExit) as cm:
|
||||
resolve_model_choice(
|
||||
"openrouter",
|
||||
CUSTOM_OPENROUTER_MODEL,
|
||||
"Deep-Thinking",
|
||||
prompt_fn=lambda _: " ",
|
||||
)
|
||||
self.assertEqual(cm.exception.code, 1)
|
||||
|
||||
def test_exit_on_none_custom_model_input(self):
|
||||
with self.assertRaises(SystemExit) as cm:
|
||||
resolve_model_choice(
|
||||
"openrouter",
|
||||
CUSTOM_OPENROUTER_MODEL,
|
||||
"Deep-Thinking",
|
||||
prompt_fn=lambda _: None,
|
||||
)
|
||||
self.assertEqual(cm.exception.code, 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in New Issue