Skip to content

fix(nvidia_nim_client): Add missing elif priority == 'cloud' block and fix nim_result scope bug#1

Open
kilo-code-bot[bot] wants to merge 5 commits into
mainfrom
gt/toast/308f67fd
Open

fix(nvidia_nim_client): Add missing elif priority == 'cloud' block and fix nim_result scope bug#1
kilo-code-bot[bot] wants to merge 5 commits into
mainfrom
gt/toast/308f67fd

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented May 25, 2026

Copy link
Copy Markdown

This bead fixes two issues in nvidia_nim_client.py:\n1. Missing elif priority == "cloud" block in the call method.\n2. The return nim_result statement was outside the if/elif blocks, causing UnboundLocalError for cloud priority.\n\nThe fix adds the cloud priority block and moves the return statements inside each conditional block.\n\nThis resolves the UnboundLocalError when priority is set to "cloud".

@kilo-code-bot kilo-code-bot Bot force-pushed the gt/toast/308f67fd branch from eff44b9 to bf1f5df Compare May 25, 2026 23:41
return result

elif priority == "heavy":
elif priority == "heavy":

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Missing indentation on elif priority == "heavy" - this is now at module scope outside the call method, causing an IndentationError at runtime. The elif must be indented to be inside the call function.

)
return result

elif priority == "cloud":

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Duplicate elif priority == "cloud" block - dead code that will never execute. The first elif priority == "cloud" block handling (lines 1169-1188) already catches this priority, so this second block at line 1218 is unreachable.

@kilo-code-bot

kilo-code-bot Bot commented May 25, 2026

Copy link
Copy Markdown
Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • federation-game/backend/nvidia_nim_client.py

Reviewed by laguna-m.1-20260312:free · 977,093 tokens

@vortsghost2025

Copy link
Copy Markdown
Owner

The reported issues have been fixed:

  1. Fixed indentation on elif priority == 'heavy' - now properly inside call method at line 1190
  2. Removed duplicate elif priority == 'cloud' block that was dead code

Verified by Kilo Code Review: 'The previous CRITICAL issues have been fixed' - priority routing chain confirmed correct.

Note: node-phase-regression CI failure is due to GitHub account billing lock (not a code issue). GitGuardian and Kilo Code Review both passed.

Toast (gastown) and others added 5 commits May 27, 2026 00:32
The previously reported issues have been fixed in commit df3de9e:
- Fixed indentation on elif priority == 'heavy' (now inside call method)
- Removed duplicate elif priority == 'cloud' block (dead code eliminated)

The Kilo Code Review confirmed: 'The previous CRITICAL issues have been fixed'
Priority routing chain verified correct:
- if priority == 'local' (lines 1141-1167)
- elif priority == 'cloud' (lines 1169-1188)
- elif priority == 'heavy' (lines 1190-1216)
- else fallback (lines 1218-1229)

Note: node-phase-regression CI failure is due to GitHub account billing
lock, not a code issue. GitGuardian Security Checks and Kilo Code Review both 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.

1 participant