Settings reference¶
This is the complete settings model, generated from refindery.config. Each
group below is a nested settings object; its fields map to environment variables
as REFINDERY_<GROUP>__<FIELD> (see the Configuration overview for
the mapping rules). The Settings root also holds the top-level fields
(auth_token, bind_host, bind_port, vector_store, …).
config
¶
Application settings.
Everything is configurable via environment variables with the REFINDERY_
prefix and __ as the nesting delimiter, e.g.::
REFINDERY_AUTH_TOKEN=... # single full-access token
REFINDERY_AUTH_TOKENS='[{"name": "agent", "token": "...", "scopes": ["read"]}]'
REFINDERY_VECTOR_STORE=lancedb
REFINDERY_CHUNKING__TARGET_TOKENS=448
Provider API keys use their native variables (VOYAGE_API_KEY, ...).
Scope
¶
TokenSpec
¶
Bases: BaseModel
One named bearer token with its scopes.
Configure several as JSON, e.g.::
REFINDERY_AUTH_TOKENS='[{"name":"agent","token":"...","scopes":["read"]}]'
VectorStoreKind
¶
RerankerKind
¶
TraceExporter
¶
QdrantSettings
¶
LanceDbSettings
¶
SqliteSettings
¶
DuckDbSettings
¶
HueySettings
¶
EmbedderSettings
¶
Bases: BaseModel
Active embedding model.
dim/max_input_tokens are authoritative here because not every
provider SDK exposes them.
RerankerSettings
¶
Bases: BaseModel
Reranker selection.
ChunkingSettings
¶
Bases: BaseModel
Canonical chunking parameters (model-independent).
PdfSettings
¶
Bases: BaseModel
PDF text-extraction tuning (pypdf extractor).
Running headers/footers and page-number lines otherwise repeat into every
chunk; strip_repeated_lines detects lines recurring in the top/bottom
repeated_line_scan lines of at least repeated_line_ratio of the
pages (only when a document has min_pages_for_stripping pages).
CanonicalizeSettings
¶
Bases: BaseModel
URL canonicalization overrides.
IndexingSettings
¶
Bases: BaseModel
Indexing pipeline knobs.
FetchSettings
¶
Bases: BaseModel
Outbound fetch limits for the fetch_and_index path.
The youtube_* knobs control transcript ingestion for YouTube video
URLs (requires the youtube extra): preferred caption languages,
whether auto-generated captions are acceptable, and whether captionless
videos fall back to local Whisper transcription (transcribe /
transcribe-mlx extra + ffmpeg).
The audio_* knobs control transcription of audio URLs — podcast
enclosures discovered by watches and audio files posted directly. Audio
downloads stream to a temp file bounded by audio_max_bytes and
audio_timeout_s instead of the in-memory max_bytes cap. The
Whisper model is shared with youtube_whisper_model; transcription
requires the transcribe or transcribe-mlx extra + ffmpeg.
podcast_transcripts prefers Podcasting 2.0 published transcripts and
chapter metadata when a podcast watch discovers them. It requires the
podcast extra and falls back to the audio/Whisper path above.
WatchSettings
¶
Bases: BaseModel
Watch-mode polling configuration.
default_interval_hours applies when a watch is created without an
explicit interval. poll_tick_enabled gates the minute-level scheduler
periodic (tests drive WatchService.tick directly instead).
default_interval_hours
class-attribute
instance-attribute
¶
default_interval_hours = Field(
default=24, ge=1, le=MAX_WATCH_INTERVAL_HOURS
)
max_items_per_poll
class-attribute
instance-attribute
¶
youtube_max_entries
class-attribute
instance-attribute
¶
JobsSettings
¶
Bases: BaseModel
Durable job execution parameters.
handler_timeout_s bounds one handler execution (cooperative
cancellation); None derives it from lease_minutes. It exists
mainly so tests can use sub-second timeouts.
handler_timeout_s
class-attribute
instance-attribute
¶
ResilienceSettings
¶
McpSettings
¶
Bases: BaseModel
MCP server surface configuration.
EventsSettings
¶
Bases: BaseModel
Server-sent events (GET /v1/events) configuration.
EntitySettings
¶
SearchSettings
¶
Bases: BaseModel
Search ranking defaults.
recency_half_life_days
class-attribute
instance-attribute
¶
ClusterSettings
¶
Bases: BaseModel
Clustering configuration.
idle_default_minutes
class-attribute
instance-attribute
¶
LlmSettings
¶
Bases: BaseModel
Optional OpenAI-compatible endpoint (labels, LLM entity extraction).
ObservabilitySettings
¶
Bases: BaseModel
Tracing/logging/metrics configuration.
metrics_snapshot_interval_s
class-attribute
instance-attribute
¶
Settings
¶
Bases: BaseSettings
Root settings object; the composition root builds everything from this.
model_config
class-attribute
instance-attribute
¶
model_config = SettingsConfigDict(
env_prefix="REFINDERY_",
env_nested_delimiter="__",
env_file=".env",
env_file_encoding="utf-8",
extra="ignore",
)