fix(cli): Fix CLI compatibility issue with SDK response objects#161
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces dictionary .get() calls with getattr() when retrieving fields from response objects across deployments.py, files.py, and fine_tunes.py. The reviewer pointed out that if these response objects are standard Python dictionaries, getattr() will fail because dictionaries do not expose keys as attributes. The feedback recommends safely handling both dictionary and object types by checking if the response is an instance of dict before falling back to getattr().
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Description
[Describe what this PR does and why]
Related Issue: Fixes #[issue_number] or Relates to #[issue_number]
Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]
Type of Change
Component(s) Affected
Checklist
Testing
[How to test these changes]
Additional Notes
[Optional: any other context]