Skip to content

fix: constrain Kilo indexing embedding models#10619

Merged
marius-kilocode merged 2 commits into
mainfrom
free-alyssum
May 28, 2026
Merged

fix: constrain Kilo indexing embedding models#10619
marius-kilocode merged 2 commits into
mainfrom
free-alyssum

Conversation

@marius-kilocode
Copy link
Copy Markdown
Collaborator

@marius-kilocode marius-kilocode commented May 27, 2026

Semantic indexing through Kilo is a managed path: Kilo defines the supported hosted embedding models and their compatible defaults. Exposing a free-text Kilo model override was redundant and could leave stale or unsupported model IDs configured.

This restricts Kilo indexing to hosted presets in VS Code and the CLI, and validates stored Kilo model IDs before runtime use. Custom model strings remain available for local and external providers through the normal custom-model input.

Provider or hosted-preset changes persistently reset obsolete model and dimension overrides, so an old Kilo model or incompatible vector dimension is not silently carried into the next selection.

image image

Comment thread packages/kilo-vscode/webview-ui/src/components/settings/IndexingTab.tsx Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 27, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Incremental review performed. The previous commit 3a120d93 was not reachable — fell back to full PR diff re-review. All changes remain clean.

The PR correctly implements a null-as-delete-sentinel pattern across the entire indexing config stack to allow clearing stored overrides. Key correctness points verified:

  • Zod + Effect schema, TypeScript types, SDK generated types, and OpenAPI spec all consistently accept null on every clearable field.
  • toIndexingConfigInput correctly converts null → undefined via ?? undefined before passing to the indexing engine.
  • indexing.ts model resolution falls back to the catalog default when a stored model is absent from the hosted catalog. The EMPTY_KILO_EMBEDDING_MODEL_CATALOG sentinel from fetchKiloEmbeddingModelCatalog is correctly handled: an HTTP 500 response returns an empty catalog, the model() function finds no found entry, and returns { modelId: undefined, modelDimension: undefined } as the test verifies.
  • KiloModelSelect (TUI dialog) correctly reads config fresh via getIndexing(sync) on select, avoiding stale writes.
  • saveProvider/saveEnabled/saveGlobalEnabled in IndexingTab.tsx all correctly apply the kiloDefault() || null sentinel when the catalog is still loading, preventing an empty-string model from being persisted.
  • staleKiloModel() guard correctly clears the dimension field display when the stored model is no longer in the catalog.
  • configuredProvider guard in the webview and the equivalent hasOtherProvider path in the TUI both prevent silently overwriting an existing non-Kilo provider setup when Kilo auth becomes available.
  • applyLegacySchemaOverrides additions in public.ts are properly wrapped in kilocode_change markers.
  • Test coverage is comprehensive: stale model fallback, catalog unavailability, existing provider preservation, and clear-overrides all have dedicated tests.
Files Reviewed (21 files)
  • .changeset/kilo-embedding-model-presets.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-clear-overrides-chromium-linux.png - CI baseline
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-existing-provider-with-kilo-auth-chromium-linux.png - CI baseline
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-kilo-catalog-loading-chromium-linux.png - CI baseline
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-kilo-model-preset-chromium-linux.png - CI baseline
  • packages/kilo-gateway/src/api/embedding-models.ts - no issues (EMPTY_KILO_EMBEDDING_MODEL_CATALOG fallback verified)
  • packages/kilo-indexing/src/config.ts - no issues
  • packages/kilo-vscode/tests/indexing-provider-blur-race.spec.ts - no issues
  • packages/kilo-vscode/webview-ui/src/components/settings/IndexingTab.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/stories/StoryProviders.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/stories/settings.stories.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/types/messages/config.ts - no issues
  • packages/opencode/src/kilocode/components/dialog-indexing.tsx - no issues
  • packages/opencode/src/kilocode/indexing.ts - no issues
  • packages/opencode/src/server/routes/instance/httpapi/public.ts - no issues
  • packages/opencode/test/kilocode/config/config.test.ts - no issues
  • packages/opencode/test/kilocode/indexing-startup.test.ts - no issues
  • packages/opencode/test/kilocode/server/httpapi-bridge.test.ts - no issues
  • packages/sdk/js/src/v2/gen/types.gen.ts - no issues
  • packages/sdk/openapi.json - no issues

Reviewed by claude-4.6-sonnet-20260217 · 1,075,392 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
Copy link
Copy Markdown
Collaborator Author

Removed all the unrelated changes...

@marius-kilocode marius-kilocode enabled auto-merge May 28, 2026 07:28
@marius-kilocode marius-kilocode merged commit eef0983 into main May 28, 2026
21 checks passed
@marius-kilocode marius-kilocode deleted the free-alyssum branch May 28, 2026 07:37
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