feat: add Gemini Flash config vars to Settings
Adds AI_PROVIDER, GOOGLE_AI_API_KEY, AI_MODEL_GEMINI, and AI_MODEL_ANTHROPIC config vars. Updates ai_enabled to check either provider key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -78,11 +78,16 @@ class Settings(BaseSettings):
|
|||||||
AI_CONVERSATION_TTL_HOURS: int = 24
|
AI_CONVERSATION_TTL_HOURS: int = 24
|
||||||
AI_MAX_CALLS_PER_FLOW: int = 10
|
AI_MAX_CALLS_PER_FLOW: int = 10
|
||||||
AI_REQUEST_TIMEOUT_SECONDS: int = 45
|
AI_REQUEST_TIMEOUT_SECONDS: int = 45
|
||||||
|
# AI Provider selection
|
||||||
|
AI_PROVIDER: str = "gemini" # "gemini" or "anthropic"
|
||||||
|
GOOGLE_AI_API_KEY: Optional[str] = None
|
||||||
|
AI_MODEL_GEMINI: str = "gemini-2.5-flash"
|
||||||
|
AI_MODEL_ANTHROPIC: str = "claude-haiku-4-5-20251001"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ai_enabled(self) -> bool:
|
def ai_enabled(self) -> bool:
|
||||||
"""Check if AI Flow Builder is configured."""
|
"""Check if any AI provider is configured."""
|
||||||
return self.ANTHROPIC_API_KEY is not None
|
return self.ANTHROPIC_API_KEY is not None or self.GOOGLE_AI_API_KEY is not None
|
||||||
|
|
||||||
# Deployment – auto-seed test data on PR environments
|
# Deployment – auto-seed test data on PR environments
|
||||||
SEED_ON_DEPLOY: bool = False
|
SEED_ON_DEPLOY: bool = False
|
||||||
|
|||||||
Reference in New Issue
Block a user