Skip to content

Simplify dirs and files parsing in ChatCompletionRequest#550

Merged
sng-asyncfunc merged 5 commits into
AsyncFuncAI:mainfrom
GdoongMathew:refactor/chat_completion_req
Jul 20, 2026
Merged

Simplify dirs and files parsing in ChatCompletionRequest#550
sng-asyncfunc merged 5 commits into
AsyncFuncAI:mainfrom
GdoongMathew:refactor/chat_completion_req

Conversation

@GdoongMathew

Copy link
Copy Markdown
Contributor

Summary

Move parsing dirs and files to ChatCompletionRequest.validate_path method

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread api/simple_chat.py Outdated
Comment thread api/simple_chat.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@GdoongMathew GdoongMathew left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

prevent empty string

Comment thread api/simple_chat.py Outdated
@GdoongMathew
GdoongMathew marked this pull request as draft July 20, 2026 02:19
@GdoongMathew
GdoongMathew marked this pull request as ready for review July 20, 2026 02:31
@sng-asyncfunc
sng-asyncfunc merged commit 88a47bf into AsyncFuncAI:main Jul 20, 2026
3 checks 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.

2 participants