Fix NoneType errors from null parameters and array items in Gemini pipeline #141
+117
−87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pipeline crashed with
'NoneType' object has no attribute 'get'when optional parameters or array items were null—occurring in basic chat scenarios with default Open WebUI configurations.Root Causes
Null optional parameters:
__metadata__,__user__,__event_emitter__, andfile_obj.metacan be None when no filters installed, in system contexts, or during testing.Null items in arrays:
messagesandcontent_listarrays can contain None items during error conditions or data corruption.Changes
Optional parameter guards (4 locations):
Array iteration guards (4 locations):
Applied to loops in:
_extract_history_images,_prepare_content,_process_multimodal_content,_build_image_generation_contents.Impact
Eliminates crashes in basic chat workflows. Pipeline now gracefully handles null data from Open WebUI's stable release and edge cases during error recovery.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.