Skip to content

fix(providers): handle empty choices list in openai and deepseek - #6742

Open
Adharve wants to merge 1 commit into
keephq:mainfrom
Adharve:fix/provider-empty-choices-6715
Open

fix(providers): handle empty choices list in openai and deepseek#6742
Adharve wants to merge 1 commit into
keephq:mainfrom
Adharve:fix/provider-empty-choices-6715

Conversation

@Adharve

@Adharve Adharve commented Aug 27, 2026

Copy link
Copy Markdown

Closes #6715

📄 Description

Safely handle empty choices lists in both OpenAI and DeepSeek provider responses to prevent IndexError.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Bug Something isn't working Provider Providers related issues labels Aug 27, 2026
@CLAassistant

CLAassistant commented Aug 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@shahargl

Copy link
Copy Markdown
Member

@Adharve are you using Keep?

@Adharve

Adharve commented Aug 29, 2026

Copy link
Copy Markdown
Author

@Adharve are you using Keep?

Hi @shahargl , I'm getting started with Keep and exploring the codebase while looking for ways to contribute to open source. I noticed this edge case and wanted to help fix it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Provider Providers related issues size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openai and deepseek providers crash on an empty choices list

3 participants