Merge origin/main into feat/discord-system (keep cameras + discord routers)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,11 +30,35 @@ class Settings(BaseSettings):
|
||||
openai_api_key: Optional[str] = None
|
||||
stt_model: str = "whisper-1" # whisper-1 | gpt-4o-mini-transcribe | gpt-4o-transcribe
|
||||
|
||||
# AI request timeouts (server-26#153). Without these the OpenAI SDK waits
|
||||
# up to 600s per attempt and retries twice, and the google-genai client
|
||||
# waits forever, so a hung provider call had no upper bound at all — and
|
||||
# recorrelation_sweep.py's hold-back could only guess at one. Every OpenAI
|
||||
# client is built by app/internal/ai_clients.py and the one Gemini client
|
||||
# by app/internal/gemini.py; both read these. A timeout raises like any
|
||||
# other provider error, so every call site's existing fallback applies
|
||||
# (rules-only correlation, raw transcript, no summary, ...).
|
||||
# The timeout bounds each phase of one HTTP attempt (connect/write/read);
|
||||
# these endpoints are non-streaming, so in practice it bounds the attempt.
|
||||
stt_timeout_seconds: float = 120.0 # Whisper: uploads up to MAX_RECORDING_SECONDS of audio
|
||||
openai_timeout_seconds: float = 60.0 # chat completions + embeddings
|
||||
# Retries per OpenAI request (SDK default 2). The SDK retries timeouts too,
|
||||
# so each one multiplies the worst case by another full timeout.
|
||||
openai_max_retries: int = 1
|
||||
# google-genai does not retry unless told to, so this is the whole bound.
|
||||
gemini_timeout_seconds: float = 60.0
|
||||
|
||||
# Google Maps (geocoding)
|
||||
google_maps_api_key: Optional[str] = None
|
||||
# 511NY developer key (server-26#183). Optional: the API answered without one
|
||||
# as of 2026-09-27, but its terms require a registered key.
|
||||
# 511NY developer key (server-26#183/#198). Issued with the NYSDOT Developer
|
||||
# Access Agreement grant; the keyless legacy API is gone since the 511x cutover.
|
||||
ny511_api_key: Optional[str] = None
|
||||
# Base URL for the 511NY feed. Defaults to the legacy API, which is dead since
|
||||
# the 511x cutover (server-26#198); set it to whatever the DAA grant documents.
|
||||
ny511_api_base: Optional[str] = None
|
||||
# Camera providers (app/internal/cameras). Keys only; every provider is still
|
||||
# OFF until an admin enables it, and licence-gated ones need an acknowledgement.
|
||||
ontario511_api_key: Optional[str] = None
|
||||
|
||||
# Gemini (intelligence extraction, embeddings, incident summaries)
|
||||
gemini_api_key: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user