Add tracking system to support optional PostHog tracking in AI engine (#6040)

Co-authored-by: ConnorYoh <[email protected]>
This commit is contained in:
James Brunton
2026-04-14 18:45:47 +01:00
committed by GitHub
co-authored by ConnorYoh
parent 4ada46ca56
commit 2bf5f0b18e
15 changed files with 397 additions and 112 deletions
+4
View File
@@ -19,6 +19,10 @@ class AppSettings(BaseSettings):
smart_model_max_tokens: int = Field(validation_alias="STIRLING_SMART_MODEL_MAX_TOKENS")
fast_model_max_tokens: int = Field(validation_alias="STIRLING_FAST_MODEL_MAX_TOKENS")
posthog_enabled: bool = Field(validation_alias="STIRLING_POSTHOG_ENABLED")
posthog_api_key: str = Field(validation_alias="STIRLING_POSTHOG_API_KEY")
posthog_host: str = Field(validation_alias="STIRLING_POSTHOG_HOST")
@lru_cache(maxsize=1)
def load_settings() -> AppSettings: