mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-07-18 02:09:32 -05:00
[PR #817] [CLOSED] fix: guard against empty choices and message=None in DeepSeek response #14000
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/817
Author: @qizwiz
Created: 5/17/2026
Status: ❌ Closed
Base:
main← Head:fix/guard-unguarded-llm-choices📝 Commits (1)
cd34184fix: guard against empty choices and message=None in DeepSeek response📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
advanced_ai_agents/autonomous_game_playing_agent_apps/ai_3dpygame_r1/ai_3dpygame_r1.py(+2 -0)📄 Description
Problem
In
ai_3dpygame_r1.py, the DeepSeek API response is accessed without checking ifchoicesis empty ormessageisNone:This crashes with:
IndexErrorwhenchoicesis[](API returns no completions)AttributeErrorwhenchoices[0].messageisNone(filtered/refused content)Fix
2 lines added, 0 deleted.
Verification
Detected by pact static analysis (
llm_response_unguardedrule). Confirmed: Gemini 2.5 Flash returns HTTP 200 withchoices[0].message=Noneon prohibited content.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.