mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-07-17 17:05:58 -05:00
[PR #820] [MERGED] fix: guard against empty choices and None message in DeepSeek API responses #6330
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Shubhamsaboo/awesome-llm-apps/pull/820
Author: @zavoryn
Created: 5/18/2026
Status: ✅ Merged
Merged: 5/21/2026
Merged by: @Shubhamsaboo
Base:
main← Head:fix/deepseek-empty-response-guard📝 Commits (1)
1c0a5b7fix: guard against empty choices and None message in DeepSeek API responses📊 Changes
2 files changed (+4 additions, -0 deletions)
View changed files
📝
advanced_ai_agents/autonomous_game_playing_agent_apps/ai_3dpygame_r1/ai_3dpygame_r1.py(+2 -0)📝
advanced_ai_agents/single_agent_apps/ai_system_architect_r1/ai_system_architect_r1.py(+2 -0)📄 Description
Summary
Add safety checks before accessing
deepseek_response.choices[0].messageto prevent crashes when the DeepSeek API returns empty or filtered responses.Changes
ai_3dpygame_r1.py— Guardchoices[0].message.reasoning_contentaccessai_system_architect_r1.py— Guard bothreasoning_contentandcontentaccessBoth files now raise
ValueError("DeepSeek returned an empty or filtered response")instead of crashing withIndexErrororAttributeError.Closes #817
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.