Skip to content

feat: hide Kilo Gateway models that may train on prompts#11158

Open
chrarnoldus wants to merge 6 commits into
mainfrom
hide-training-models
Open

feat: hide Kilo Gateway models that may train on prompts#11158
chrarnoldus wants to merge 6 commits into
mainfrom
hide-training-models

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

What changed

Kilo Gateway offers models from multiple providers. Some providers indicate that they may use submitted prompts for model training. This adds an opt-in Hide Prompt-Training Models toggle under Settings → Models so users can remove those models from Kilo's model pickers.

When enabled, Kilo hides only Gateway models explicitly marked mayTrainOnYourPrompts: true. Models from other providers, and Gateway models without that marker, remain visible.

How it works

The preference is stored as the global Kilo config option hide_prompt_training_models. Filtering happens in the CLI backend for both provider catalog endpoints, so the same preference applies consistently in the VS Code extension, CLI, and terminal UI. The extension refreshes its model list immediately after the setting changes.

The setting affects model listings only; it does not alter provider metadata or broadly disable Kilo Gateway.

Related change

The hosted Kilo config schema must recognize the new option for validation and autocomplete. That companion update is in Kilo-Org/cloud#3989.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jun 12, 2026
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
"settings.providers.subagentModel.title": "Subagent Model",
"settings.providers.subagentModel.description":
"Default model and reasoning effort for task-tool subagents. Leave unset to inherit the calling agent's model.",
"settings.models.hidePromptTraining.title": "Hide Prompt-Training Models",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Translation seems incomplete

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added translations for both labels across all 19 non-English locales. The locale completeness unit suite now passes.

"kilo-code": patch
---

Add a model setting to hide Kilo Gateway models that may train on your prompts.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this change not be part of the CLI backend instead? What happens for CLI users?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved the preference into the CLI config as hide_prompt_training_models and apply it to both /provider and /config/providers, so the TUI and VS Code share one filtered catalog. The extension switch now writes that global CLI setting and refreshes providers after save. Added helper, schema, endpoint integration, and extension refresh coverage, regenerated the SDK, and opened the required hosted-schema companion PR: Kilo-Org/cloud#3989.

@kilo-code-bot

kilo-code-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The latest commit (8eea56e) simplifies the hidePromptTraining.description i18n string across all 20 locales — removing the now-redundant "across Kilo clients" / "across all Kilo clients" phrase. This resolves the previously flagged concern at en.ts:1505. The rest of the incremental diff is a merge of main and contains no changes related to this PR's feature.

All prior review items are resolved:

  • ✅ Translation completeness: all 19 non-English locales updated consistently.
  • ✅ CLI backend placement: filtering lives in packages/opencode/src/kilocode/provider/model-filter.ts, applied to both /provider and /config/providers endpoints.
  • ✅ Memory leak: modelConfigDisposable / cachedProviders removed from KiloProvider.
  • ✅ Cloud config schema: hide_prompt_training_models added to Config.Info. Companion cloud repo PR (Gemini CLI - Pro Plan - Rate Limit #3989) noted in PR description.
Files Reviewed (45 files, incremental)
  • packages/kilo-vscode/webview-ui/src/i18n/en.tshidePromptTraining.description simplified
  • packages/kilo-vscode/webview-ui/src/i18n/ar.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/br.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/bs.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/da.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/de.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/es.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/fr.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/it.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/ja.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/ko.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/nl.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/no.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/pl.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/ru.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/th.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/tr.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/uk.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/zh.ts — updated
  • packages/kilo-vscode/webview-ui/src/i18n/zht.ts — updated
  • All other changed files are from the main branch merge (unrelated to this PR's feature)
Previous Review Summary (commit 4dc1fd9)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 4dc1fd9)

Status: No Issues Found | Recommendation: Merge

The new commit (4dc1fd9) correctly moves the prompt-training model filter from the VS Code extension layer into the CLI backend. This is the right architectural direction — the feature now applies uniformly across all clients (TUI, CLI, VS Code) and the setting is stored in opencode.json rather than VS Code settings.

Changes since last review:

  • model-settings.ts, model-filter.ts (vscode), and provider-model-filter.test.ts (vscode) deleted — VSCode-side filtering entirely removed, no dangling references.
  • modelConfigDisposable and cachedProviders removed from KiloProvider — no memory leak, both code paths (setupWebviewMessageHandler and dispose()) cleaned up consistently.
  • filterPromptTrainingModels / nonEmptyProviders now live in packages/opencode/src/kilocode/provider/model-filter.ts and are applied in both /provider and /config/providers handlers.
  • hide_prompt_training_models added to Config.Info in packages/opencode/src/config/config.ts as an optional boolean. Reminder (not checked by CI): the matching JSON Schema entry should also be added in the cloud repo (apps/web/src/app/config.json/extras.ts).
  • en.ts description updated to "...across Kilo clients" — resolves the previous incomplete-translation observation.
  • The previous concern about validModelSetting silently blocking future settings is moot now that the entire models section gate has been removed.
  • Three new CLI-side tests added (unit + integration) with good coverage.

No new issues found in the incremental diff.

Files Reviewed (43 files)
  • .changeset/hide-prompt-training-models.md
  • packages/kilo-vscode/package.json
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/src/kilo-provider/model-filter.ts (deleted)
  • packages/kilo-vscode/src/kilo-provider/model-settings.ts (deleted)
  • packages/kilo-vscode/tests/unit/kilo-provider-indexing-refresh.test.ts
  • packages/kilo-vscode/tests/unit/provider-model-filter.test.ts (deleted)
  • packages/kilo-vscode/webview-ui/src/components/settings/ModelsTab.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/settings-io.ts
  • packages/kilo-vscode/webview-ui/src/context/config.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ar.ts
  • packages/kilo-vscode/webview-ui/src/i18n/br.ts
  • packages/kilo-vscode/webview-ui/src/i18n/bs.ts
  • packages/kilo-vscode/webview-ui/src/i18n/da.ts
  • packages/kilo-vscode/webview-ui/src/i18n/de.ts
  • packages/kilo-vscode/webview-ui/src/i18n/es.ts
  • packages/kilo-vscode/webview-ui/src/i18n/fr.ts
  • packages/kilo-vscode/webview-ui/src/i18n/it.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ja.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ko.ts
  • packages/kilo-vscode/webview-ui/src/i18n/nl.ts
  • packages/kilo-vscode/webview-ui/src/i18n/no.ts
  • packages/kilo-vscode/webview-ui/src/i18n/pl.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ru.ts
  • packages/kilo-vscode/webview-ui/src/i18n/th.ts
  • packages/kilo-vscode/webview-ui/src/i18n/tr.ts
  • packages/kilo-vscode/webview-ui/src/i18n/uk.ts
  • packages/kilo-vscode/webview-ui/src/i18n/zh.ts
  • packages/kilo-vscode/webview-ui/src/i18n/zht.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/config.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/kilocode/provider/model-filter.ts
  • packages/opencode/src/server/routes/instance/httpapi/handlers/config.ts
  • packages/opencode/src/server/routes/instance/httpapi/handlers/provider.ts
  • packages/opencode/test/kilocode/config/hide-prompt-training-models.test.ts
  • packages/opencode/test/kilocode/provider/model-filter.test.ts
  • packages/opencode/test/kilocode/server/prompt-training-model-filter.test.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json

Reviewed by claude-4.6-sonnet-20260217 · 443,797 tokens

Review guidance: REVIEW.md from base branch main

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus changed the title feat(vscode): hide prompt-training gateway models feat: hide Kilo Gateway models that may train on prompts Jun 12, 2026
chrarnoldus and others added 2 commits June 15, 2026 09:49
Refactor the description for the `settings.models.hidePromptTraining` setting across all supported languages to remove the redundant "across all Kilo clients" phrase, making the text more concise.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
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