Skip to content

Fix: add back default local repo type in ChatCompletionRequest#556

Open
GdoongMathew wants to merge 2 commits into
AsyncFuncAI:mainfrom
GdoongMathew:fix/add_repo_local_type
Open

Fix: add back default local repo type in ChatCompletionRequest#556
GdoongMathew wants to merge 2 commits into
AsyncFuncAI:mainfrom
GdoongMathew:fix/add_repo_local_type

Conversation

@GdoongMathew

Copy link
Copy Markdown
Contributor

Summary

in #550, I missed adding local repo type in ChatCompletionRequest. This would cause pydantic validation error when sending request for indexing a new local repo.

@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 adds "local" to the allowed repository types in the ChatCompletionRequest model. The review feedback suggests updating the field's description to include "local" to ensure the documentation remains accurate.

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/chat_model.py
filePath: Optional[str] = Field(None, description="Optional path to a file in the repository to include in the prompt")
token: Optional[str] = Field(None, description="Personal access token for private repositories")
type: Optional[Literal["github", "gitlab", "bitbucket"]] = Field(
type: Optional[Literal["local", "github", "gitlab", "bitbucket"]] = Field(

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.

medium

The repository type "local" has been added to the type field's allowed Literal values, but the field's description on line 21 has not been updated to reflect this change.\n\nTo ensure the generated OpenAPI/Swagger documentation is accurate and complete, please update the description to include 'local'.\n\nFor example:\npython\n type: Optional[Literal["local", "github", "gitlab", "bitbucket"]] = Field(\n "github",\n description="Type of repository (e.g., 'local', 'github', 'gitlab', 'bitbucket')",\n )\n

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.

fixed in 4f0e4d6

Comment thread api/chat_model.py Outdated
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.

1 participant