mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
cleaning up openrouter code
This commit is contained in:
parent
668a0500ff
commit
0826e116da
3 changed files with 5 additions and 5 deletions
|
@ -28,6 +28,7 @@ class TestModels(unittest.TestCase):
|
|||
@patch('openai.Model.list')
|
||||
def test_openrouter_model_properties(self, mock_model_list):
|
||||
import openai
|
||||
old_base = openai.api_base
|
||||
openai.api_base = 'https://openrouter.ai/api/v1'
|
||||
mock_model_list.return_value = {
|
||||
'data': [
|
||||
|
@ -49,6 +50,7 @@ class TestModels(unittest.TestCase):
|
|||
self.assertEqual(model.max_context_tokens, 8192)
|
||||
self.assertEqual(model.prompt_price, 0.06)
|
||||
self.assertEqual(model.completion_price, 0.12)
|
||||
openai.api_base = old_base
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue