Skip to content

Conversation

@JannikSt
Copy link
Member

@JannikSt JannikSt commented Dec 31, 2025

Fixes crash when API times out and returns empty completion.

  • Return None instead of crashing with IndexError when no assistant messages
  • Added test cases for empty completions

Note

Prevents crashes when completions lack assistant messages.

  • Update parse_answer to safely handle empty lists or completions without assistant messages by returning None
  • Add tests: test_parse_answer_with_empty_completion and test_parse_answer_with_no_assistant_messages to validate behavior

Written by Cursor Bugbot for commit a43bc49. This will update automatically on new commits. Configure here.

@JannikSt JannikSt requested a review from willccbb December 31, 2025 09:39
@willccbb willccbb merged commit 3ca3445 into main Jan 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants