Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/llm/test_xai.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_init_default(self):
)

# Check default model
self.assertEqual(llm.model, "grok-2-latest")
self.assertEqual(llm.model, "grok-4")

def test_init_with_api_key_from_env(self):
"""Test initialization with API key from environment variable."""
Expand Down Expand Up @@ -112,7 +112,7 @@ def test_chat_single_message(self):
# Check that completions.create was called correctly
self.mock_completions.create.assert_called_once()
call_args = self.mock_completions.create.call_args
self.assertEqual(call_args[1]["model"], "grok-2-latest")
self.assertEqual(call_args[1]["model"], "grok-4")
self.assertEqual(call_args[1]["messages"], messages)

# Check response
Expand All @@ -137,7 +137,7 @@ def test_chat_multiple_messages(self):
# Check that completions.create was called correctly
self.mock_completions.create.assert_called_once()
call_args = self.mock_completions.create.call_args
self.assertEqual(call_args[1]["model"], "grok-2-latest")
self.assertEqual(call_args[1]["model"], "grok-4")
self.assertEqual(call_args[1]["messages"], messages)

# Check response
Expand All @@ -162,4 +162,4 @@ def test_chat_with_error(self):


if __name__ == "__main__":
unittest.main()
unittest.main()