Skip to content

Commit a8e9257

Browse files
committed
feat: add VECTOR_SEARCH_ENABLED feature flag (Prompt 8)
1 parent b95cb02 commit a8e9257

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Environment variables (all live in `.env`):
4747
| `ASTRA_DB_APPLICATION_TOKEN` | Token created in Astra UI |
4848
| `ASTRA_DB_KEYSPACE` | Keyspace name |
4949
| `SECRET_KEY` | JWT signing secret |
50+
| `VECTOR_SEARCH_ENABLED` | Toggle semantic vector search (true/false) |
5051

5152
---
5253

app/core/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def parsed_cors_origins(self) -> list[str]: # noqa: D401
104104

105105
INLINE_METADATA_DISABLED: bool = False
106106
ENABLE_BACKGROUND_PROCESSING: bool = True
107+
# Feature flag – enables semantic vector search endpoints
108+
VECTOR_SEARCH_ENABLED: bool = False
107109

108110
# ------------------------------------------------------------------
109111
# YouTube integration
@@ -130,7 +132,11 @@ def parsed_cors_origins(self) -> list[str]: # noqa: D401
130132
@model_validator(mode="before")
131133
@classmethod
132134
def _sanitize_bool_tokens(cls, data): # type: ignore[return-value]
133-
for key in ("INLINE_METADATA_DISABLED", "ENABLE_BACKGROUND_PROCESSING"):
135+
for key in (
136+
"INLINE_METADATA_DISABLED",
137+
"ENABLE_BACKGROUND_PROCESSING",
138+
"VECTOR_SEARCH_ENABLED",
139+
):
134140
if key in data and isinstance(data[key], str):
135141
raw = data[key]
136142
# Split at first whitespace or '#'

env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ SECRET_KEY=please-change-me-to-a-long-random-string
4141
# Access-token lifetime (minutes). 30 by default.
4242
# ACCESS_TOKEN_EXPIRE_MINUTES=30
4343

44+
# --------------------------------------------------------------------
45+
# Feature Flags
46+
# --------------------------------------------------------------------
47+
# Enable semantic vector search mode (true/false). Keep disabled until the
48+
# migrations & backfill jobs have run successfully.
49+
VECTOR_SEARCH_ENABLED=false
50+
4451
#######################################################################
4552
# End of file
4653
#######################################################################

0 commit comments

Comments
 (0)