mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
Add test for creating models from OpenRouter API.
This commit is contained in:
parent
abbc93678b
commit
d1e0a196b5
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,12 @@ class TestModels(unittest.TestCase):
|
|||
model = Model.create("gpt-4-32k-2123")
|
||||
self.assertEqual(model.max_context_tokens, 32 * 1024)
|
||||
|
||||
def test_openrouter_models(self):
|
||||
import openai
|
||||
openai.api_base = 'https://openrouter.ai/api/v1'
|
||||
model = Model.create("gpt-3.5-turbo")
|
||||
self.assertEqual(model.name, 'openai/gpt-3.5-turbo')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue