Make OpenAI-compatible API key optional for local codebase indexing#5849
Make OpenAI-compatible API key optional for local codebase indexing#5849Neonsy wants to merge 1 commit intoKilo-Org:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 0759ea5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Woops 😂 |
ab1edb3 to
1398844
Compare
1398844 to
f81cd6d
Compare
That fail seems to be a flaky time related error and has nothing to do with my changes |
a3ff3ae to
e456ec9
Compare
The build has been tested by a Discord user using LM Studio |
89928d7 to
4649293
Compare
I can confirm it is working as expected as I am the said Discord user. |
5258b11 to
73c8c71
Compare
73c8c71 to
0759ea5
Compare
| this._serviceFactory = serviceFactory | ||
| // kilocode_change end | ||
|
|
||
| // Clear any error state after successful recwreation |
There was a problem hiding this comment.
SUGGESTION: Typo in comment — recwreation → recreation
| // Clear any error state after successful recwreation | |
| // Clear any error state after successful recreation |
Code Review SummaryStatus: 1 Issue Found | Recommendation: Merge (minor suggestion only) Overview
Issue Details (click to expand)SUGGESTION
Review NotesThis PR makes the OpenAI-compatible API key optional for codebase indexing, enabling local/self-hosted embedding endpoints that don't require authentication. The changes are well-structured:
Files Reviewed (13 files)
|
|
Hi! Thank you for taking the time to contribute to this project—we really appreciate it. We are currently working on re-platforming the core of our VS Code and JetBrains extensions to be based on our new Kilo CLI, with a complete rebuild based on OpenCode as our new foundation, which means this PR unfortunately won't be compatible with the new architecture. If you think this feature or fix is still relevant, we'd love for you to check out the new version and consider contributing it there. The new code is now in this repository. Alternatively, if you think this is an urgent fix to the old vscode extension (like a recent model change, or an urgent bug fix), we’d welcome the PR at https://github.com/Kilo-Org/kilocode-legacy |
Context
This PR is triggered by a real user scenario discussed in Discord. With Codebase Indexing + OpenAI Compatible on local/self-hosted endpoints, leaving the API key empty caused broken runtime behavior even after settings were saved.
The reported symptoms were:
CodeIndexManager not initialized. Call initialize() first.There were also activation/runtime messages in VS Code output (
popoutButtonClicked already registered, missing activity bar container), but those are unrelated noise and not the indexing root cause.Implementation
apiKeyoptional, while requiring valid base URL + other required fields.baseUrlis presentqdrantUrlis present"EMPTY"for SDK constructor compatibility"EMPTY") so keyless local providers that still expect auth-shaped headers work_serviceFactoryis missing_serviceFactoryis assigned only after successful full service recreationCodeIndexManager not initializedinitialize()before checkingisFeatureEnabled/isFeatureConfiguredon save/start pathsHow to Test
http://127.0.0.1:1234/v1/embeddings).CodeIndexManager not initializederror appears, and LM Studio receives/v1/embeddingsrequests.cd src && pnpm test services/code-index/embedders/__tests__/openai-compatible.spec.tscd src && pnpm test services/code-index/__tests__/manager.spec.tscd src && pnpm test services/code-index/__tests__/service-factory.spec.tscd src && pnpm test services/code-index/__tests__/config-manager.spec.tscd webview-ui && pnpm test src/components/chat/__tests__/CodeIndexPopover.validation.spec.tscd webview-ui && pnpm test src/components/chat/__tests__/CodeIndexPopover.spec.tsxcd src && pnpm testpnpm lintpnpm check-typespnpm build