{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kagura-ai-com/json-schema/kagura-ai-com-context-search-config-update-schema.json",
  "title": "ContextSearchConfigUpdate",
  "description": "Request schema for updating context search configuration.\n\nIssue #160: Renamed from ProjectSearchConfigUpdate to ContextSearchConfigUpdate",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kagura-ai-com-openapi.json#/components/schemas/ContextSearchConfigUpdate",
  "properties": {
    "semantic_weight": {
      "type": "number",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Semantic Weight",
      "description": "Semantic search weight"
    },
    "bm25_weight": {
      "type": "number",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Bm25 Weight",
      "description": "BM25 keyword search weight"
    },
    "fetch_factor": {
      "type": "integer",
      "maximum": 10.0,
      "minimum": 1.0,
      "title": "Fetch Factor",
      "description": "Candidate retrieval multiplier"
    },
    "use_rerank": {
      "type": "boolean",
      "title": "Use Rerank",
      "description": "Enable/disable reranking"
    },
    "reranker_provider": {
      "type": "string",
      "title": "Reranker Provider",
      "description": "Reranker provider: 'voyage', 'cohere', or 'self_hosted'"
    },
    "reranker_model": {
      "type": "string",
      "title": "Reranker Model",
      "description": "Provider-specific model name"
    },
    "reinforce_enabled": {
      "type": "boolean",
      "title": "Reinforce Enabled",
      "description": "Enable the bounded adoption+feedback recall re-rank",
      "default": true
    },
    "reinforce_max_boost": {
      "type": "number",
      "maximum": 0.5,
      "minimum": 0.0,
      "title": "Reinforce Max Boost",
      "description": "Bound on the reinforce adjustment (factor stays in [1-b, 1+b])",
      "default": 0.15
    },
    "reinforce_require_host_arbitration": {
      "type": "boolean",
      "title": "Reinforce Require Host Arbitration",
      "description": "Forge-resistant mode — only host-arbitrated feedback (provenance='host') moves ranking; an untrusted agent's self-feedback is ignored",
      "default": false
    },
    "routing_mode": {
      "type": "string",
      "pattern": "^(off|log_only|active)$",
      "title": "Routing Mode",
      "description": "Query-intent router: off | log_only (stamp telemetry, zero ranking change) | active (routed lane used only when search_mode is omitted)",
      "default": "off"
    },
    "content_chunks_enabled": {
      "type": "boolean",
      "title": "Content Chunks Enabled",
      "description": "Embed long content (>= 1500 chars) as chunk vectors so dense retrieval sees the body, not only the summary. Turning it on also queues the context's existing long memories for chunking (drained in the background; see content_chunks_backfill_pending); turning it off deletes the chunks. When on, memory content (not only summaries) is sent to the embedding and rerank providers. Changing it takes the context owner or a workspace owner/admin (403 for an editor); sending the stored value is a no-op. Needs the Qdrant vector store: turning it on with LanceDB is refused (422)",
      "default": false
    },
    "llm_selector_enabled": {
      "type": "boolean",
      "title": "Llm Selector Enabled",
      "description": "Recall LLM selector opt-in: an MCP recall may send this context's summaries and attached content to the deployment's judge model, which keeps the results that answer the query and cuts their content to verbatim passages. Changing it takes the context owner or a workspace owner/admin (403 for an editor); sending the stored value is a no-op. Where the deployment gates it by plan (LLM_SELECTOR_REQUIRE_PLAN), turning it on needs the llm_selector feature (403 FEAT-001) and a free slot under max_llm_selector_contexts (429 QUOTA-001)",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "semantic_weight",
    "bm25_weight",
    "fetch_factor",
    "use_rerank",
    "reranker_provider",
    "reranker_model"
  ]
}