feat(config): move the upload-size ceiling under ingestion settings

Why:
- ADR-0017 names the bound INGESTION_MAX_UPLOAD_SIZE_MB; the code had it
  as APP_MAX_UPLOAD_SIZE_MB. Reconciled to match the ADR, grouped with the
  other three ADR-0017 bounds on IngestionSettings.
This commit is contained in:
2026-08-19 15:00:02 +03:30
parent 94684d97ae
commit 3803d9c79a
2 changed files with 6 additions and 2 deletions

View File

@@ -9,7 +9,6 @@
# Application # Application
APP_ENV=local APP_ENV=local
APP_MAX_UPLOAD_SIZE_MB=25
APP_READINESS_CHECK_TIMEOUT_SECONDS=2.0 APP_READINESS_CHECK_TIMEOUT_SECONDS=2.0
# Logging # Logging
@@ -37,6 +36,7 @@ MINIO_BUCKET=chatbot-source-files
INGESTION_MAX_CONCURRENCY=4 INGESTION_MAX_CONCURRENCY=4
INGESTION_THREAD_POOL_SIZE=8 INGESTION_THREAD_POOL_SIZE=8
INGESTION_TIMEOUT_SECONDS=120.0 INGESTION_TIMEOUT_SECONDS=120.0
INGESTION_MAX_UPLOAD_SIZE_MB=25
INGESTION_MAX_CHUNKS_PER_FILE=5000 INGESTION_MAX_CHUNKS_PER_FILE=5000
INGESTION_EMBED_BATCH_SIZE=128 INGESTION_EMBED_BATCH_SIZE=128
INGESTION_EMBED_CONCURRENCY=4 INGESTION_EMBED_CONCURRENCY=4

View File

@@ -38,10 +38,15 @@ class IngestionSettings(BaseSettings):
max_concurrency: int = 4 max_concurrency: int = 4
thread_pool_size: int = 8 thread_pool_size: int = 8
timeout_seconds: float = 120.0 timeout_seconds: float = 120.0
max_upload_size_mb: int = 25
max_chunks_per_file: int = 5000 max_chunks_per_file: int = 5000
embed_batch_size: int = 128 embed_batch_size: int = 128
embed_concurrency: int = 4 embed_concurrency: int = 4
@property
def max_upload_size_bytes(self) -> int:
return self.max_upload_size_mb * 1024 * 1024
class ChunkingSettings(BaseSettings): class ChunkingSettings(BaseSettings):
"""Parsing and chunking parameters (ADR-0018). """Parsing and chunking parameters (ADR-0018).
@@ -86,7 +91,6 @@ class AppLimitSettings(BaseSettings):
model_config = SettingsConfigDict(env_prefix="APP_", extra="ignore") model_config = SettingsConfigDict(env_prefix="APP_", extra="ignore")
env: str = "local" env: str = "local"
max_upload_size_mb: int = 25
readiness_check_timeout_seconds: float = 2.0 readiness_check_timeout_seconds: float = 2.0