fix: filter out None values from OCROptions kwargs

Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
James R. Barlow
2025-12-21 12:21:47 -08:00
co-authored by aider
parent 48a2fdb0f2
commit a869a4ac42
+3
View File
@@ -203,6 +203,9 @@ def create_options(
# Keep the stream object as-is - OCROptions can handle it
pass
# Remove None values to let OCROptions use its defaults
options_kwargs = {k: v for k, v in options_kwargs.items() if v is not None}
# Remove any kwargs that aren't OCROptions fields and store in extra_attrs
extra_attrs = {}
ocr_fields = set(OCROptions.model_fields.keys())