-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Configable Ollama embedding timeout (#5733) #9885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Configable Ollama embedding timeout (#5733) #9885
Conversation
i18n: Add Ollama timeout configuration localization for all languages (by AI)
All issues have been resolved. Issues resolved:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds configurable timeout settings for Ollama embedding and validation requests, allowing users to adjust these values through the UI instead of relying on hardcoded defaults. This addresses issues where users experienced timeouts during embedding operations on slower systems or with large models.
Key Changes:
- Added two new configurable settings:
ollamaEmbeddingTimeoutMsandollamaValidationTimeoutMswith defaults of 60000ms and 30000ms respectively - Implemented UI controls in the code index popover for users to configure these timeout values
- Added comprehensive i18n support across 18 locale files
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
src/services/code-index/embedders/ollama.ts |
Core implementation of configurable timeout logic in the Ollama embedder |
src/services/code-index/config-manager.ts |
Added timeout configuration handling and change detection |
packages/types/src/provider-settings.ts |
Added schema definitions for Ollama timeout settings |
packages/types/src/codebase-index.ts |
Added schema definitions for codebase index timeout settings |
src/core/webview/ClineProvider.ts |
Added timeout settings to webview state management |
src/core/webview/webviewMessageHandler.ts |
Added timeout settings to settings update handler |
src/shared/WebviewMessage.ts |
Added timeout fields to webview message interface |
webview-ui/src/components/chat/CodeIndexPopover.tsx |
Added UI controls for configuring timeout values |
webview-ui/src/i18n/locales/*/settings.json |
Added translations for timeout settings across 18 locales |
src/services/code-index/embedders/__tests__/ollama.spec.ts |
Added tests for timeout configuration |
src/services/code-index/__tests__/config-manager.spec.ts |
Updated tests to include timeout settings |
src/services/code-index/__tests__/service-factory.spec.ts |
Updated tests to include timeout settings |
src/services/code-index/interfaces/config.ts |
Added timeout fields to config snapshot interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Related GitHub Issue
Closes: #5733 #5517
Improved: #5778
Roo Code Task Context (Optional)
Description
This PR modifies the approach in #5778 that simply increased the Ollam timeout, allowing users to modify the timeout setting in the embedded settings interface.
Test Procedure
The test was initiated by launching debug mode with F5 and opening a codebase in the debug VS Code instance to begin indexing. A low timeout was set initially, and if errors like those in #5733 occurred, the timeout was increased until the embedding could be completed successfully.
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Both added settings are very intuitive, and the interface elements are sufficient to describe themselves, so there is no need to update the documentation.
Additional Notes
Get in Touch
kagurazakanyaa
Important
Introduces configurable timeout settings for Ollama embedding and validation, with updates to code, tests, UI, and translations.
codebase-index.tsandprovider-settings.ts.ClineProvider.tsto handle new timeout settings.config-manager.spec.tsandollama.spec.tsto cover new timeout configurations.CodeIndexPopover.tsxto include new timeout settings fields.settings.jsonfiles.This description was created by
for ebb28f5. You can customize this summary. It will automatically update as commits are pushed.