Simplify dirs and files parsing in ChatCompletionRequest#550
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the ChatCompletionRequest schema in api/simple_chat.py by converting the file and directory inclusion/exclusion parameters from optional strings to lists of strings, utilizing a Pydantic @field_validator to handle string-to-list conversion and unquoting. This simplifies the endpoint logic by removing manual parsing. Feedback highlights a discrepancy in the field descriptions (which still refer to "Comma-separated" instead of newline-separated or list inputs) and a regression in the validator that fails to filter out empty or whitespace-only entries.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
GdoongMathew
left a comment
There was a problem hiding this comment.
prevent empty string
Summary
Move parsing dirs and files to
ChatCompletionRequest.validate_pathmethod