Skip to content

feat(kiloclaw): enable Exa provider defaults in runtime image#2386

Open
joshavant wants to merge 4 commits intomainfrom
feat/kiloclaw-exa-image-runtime
Open

feat(kiloclaw): enable Exa provider defaults in runtime image#2386
joshavant wants to merge 4 commits intomainfrom
feat/kiloclaw-exa-image-runtime

Conversation

@joshavant
Copy link
Copy Markdown
Contributor

Summary

  • Add KiloClawCustomizer runtime support for Exa web search gating, including plugin config schema and createTool() soft-disable behavior.
  • Update controller config writer to handle Exa mode as tri-state (kilo-proxy / disabled / unset), preserve explicit providers, and auto-assign kilo-exa when provider is missing on upgraded images.
  • Extend controller tests for provider auto-assignment and preserve/disable paths.

Verification

  • pnpm --filter kiloclaw test -- controller/src/config-writer.test.ts
  • pnpm test -- src/kilo-exa-web-search-provider.test.ts (in services/kiloclaw/plugins/kiloclaw-customizer)
  • git push -u origin feat/kiloclaw-exa-image-runtime (pre-push checks passed: oxfmt --list-different . and affected-package typecheck)

Visual Changes

  • N/A

Reviewer Notes

  • This PR is intentionally image/runtime-only so it can deploy before dashboard exposure.
  • Follow-up dashboard PR will gate Exa UI by controller calver and wire user-facing controls.

customizerWebSearchConfig.enabled = false;

const braveConfigured = Boolean(env.BRAVE_API_KEY?.trim());
if (braveConfigured) {
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.

WARNING: This overrides explicit non-Exa providers

When KILO_EXA_SEARCH_MODE=disabled and BRAVE_API_KEY is set, this branch rewrites any existing provider to brave. That clobbers explicit selections like perplexity or grok, even though this PR is supposed to preserve explicit providers. Limit the Brave fallback to the unset / existing kilo-exa cases.

Suggested change
if (braveConfigured) {
if (braveConfigured && (!hasExplicitSearchProvider || config.tools?.web?.search?.provider === KILO_EXA_PROVIDER_ID)) {

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 13, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • services/kiloclaw/controller/src/config-writer.test.ts
  • services/kiloclaw/controller/src/config-writer.ts

Reviewed by gpt-5.4-2026-03-05 · 546,563 tokens

Comment on lines +329 to +334
customizerWebSearchConfig.enabled = true;
config.tools = config.tools ?? {};
config.tools.web = config.tools.web ?? {};
config.tools.web.search = config.tools.web.search ?? {};
config.tools.web.search.enabled = true;
config.tools.web.search.provider = KILO_EXA_PROVIDER_ID;
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.

I think this is the same as the branch on line 302? If so, can't we just write if (kiloExaSearchMode === "kilo-proxy" || kiloExaSearchmode === "unset")?

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