context-search-config

Update Context Search Config

Update context search configuration.

Updates hybrid search weights, fetch factor, and/or reranker settings. Validates that weights sum to 1.0 and model matches provider.

Context owners and editors may change every field except content_chunks_enabled and llm_selector_enabled: changing either (on or off) takes the context owner or a workspace owner/admin, since turning it on sends memory content to the embedding and rerank providers (#2015) or to the deployment's judge model at recall time (#2144). Sending the stored value is not a change and is allowed.

Args: context_id: Context UUID update_data: Configuration update request current_user: Current authenticated user db: Database session

Returns: Updated ContextSearchConfigResponse

Raises: HTTPException: 400 if validation fails, 403 if the caller may not change content_chunks_enabled, 404 if context not found, 500 on error ValidationError: 422 when turning content_chunks_enabled on with the LanceDB vector store, which has no content chunk vectors (#2072) FeatureNotAvailableError: 403 FEAT-001 when turning it on on a plan without content_chunks (only where CONTENT_CHUNKS_REQUIRE_PLAN is on, #2103) QuotaExceededError: 429 QUOTA-001 when turning it on with the workspace at the plan's max_content_chunk_contexts (likewise). The same 403 / 429 for llm_selector_enabled against llm_selector / max_llm_selector_contexts, only where LLM_SELECTOR_REQUIRE_PLAN is on (#2144)

put/api/v1/contexts/{context_id}/search-config

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/contexts/{context_id}/search-config
  • Auth: none declared

Path parameters

context_idstring uuid required

Headers

authorizationstring nullable

Request body

semantic_weightnumber required

Semantic search weight

bm25_weightnumber required

BM25 keyword search weight

fetch_factorinteger required

Candidate retrieval multiplier

use_rerankboolean required

Enable/disable reranking

reranker_providerstring required

Reranker provider: 'voyage', 'cohere', or 'self_hosted'

reranker_modelstring required

Provider-specific model name

reinforce_enabledboolean

Enable the bounded adoption+feedback recall re-rank

reinforce_max_boostnumber

Bound on the reinforce adjustment (factor stays in [1-b, 1+b])

reinforce_require_host_arbitrationboolean

Forge-resistant mode — only host-arbitrated feedback (provenance='host') moves ranking; an untrusted agent's self-feedback is ignored

routing_modestring

Query-intent router: off | log_only (stamp telemetry, zero ranking change) | active (routed lane used only when search_mode is omitted)

content_chunks_enabledboolean

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)

llm_selector_enabledboolean

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)

Response

Successful Response

context_idunknown required
semantic_weightunknown required
bm25_weightunknown required
fetch_factorunknown required
use_rerankunknown required
reranker_providerunknown required
reranker_modelunknown required
embedding_modelunknown required
embedding_dimensionsunknown required
reinforce_enabledunknown
reinforce_max_boostunknown
reinforce_require_host_arbitrationunknown
routing_modeunknown
content_chunks_enabledunknown
content_chunks_can_changeunknown
content_chunks_supportedunknown
embedding_providerunknown
content_chunks_backfill_pendingunknown
content_chunks_effectiveunknown
content_chunks_limitunknown
content_chunks_in_useunknown
content_chunks_disabled_reasonunknown
llm_selector_enabledunknown
llm_selector_effectiveunknown
llm_selector_limitunknown
llm_selector_in_useunknown
llm_selector_disabled_reasonunknown
llm_selector_can_changeunknown
created_atunknown required
updated_atunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.