@@ -11,45 +11,45 @@ class Settings(BaseSettings):
11
11
"""Application settings."""
12
12
13
13
# Redis Configuration
14
- redis_url : str = Field (default = "redis://localhost:6379/0" , env = "REDIS_URL" )
14
+ redis_url : str = Field (default = "redis://localhost:6379/0" )
15
15
16
16
# Celery Configuration
17
17
celery_broker_url : str = Field (
18
- default = "redis://localhost:6379/0" , env = "CELERY_BROKER_URL"
18
+ default = "redis://localhost:6379/0"
19
19
)
20
20
celery_result_backend : str = Field (
21
- default = "redis://localhost:6379/0" , env = "CELERY_RESULT_BACKEND"
21
+ default = "redis://localhost:6379/0"
22
22
)
23
23
24
24
# Task Processing Configuration
25
- default_retry_ratio : float = Field (default = 0.3 , env = "DEFAULT_RETRY_RATIO" )
26
- max_retries : int = Field (default = 3 , env = "MAX_RETRIES" )
27
- max_task_age : int = Field (default = 3600 , env = "MAX_TASK_AGE" ) # 1 hour
25
+ default_retry_ratio : float = Field (default = 0.3 )
26
+ max_retries : int = Field (default = 3 )
27
+ max_task_age : int = Field (default = 3600 ) # 1 hour
28
28
29
29
# Queue Pressure Thresholds
30
- retry_queue_warning : int = Field (default = 1000 , env = "RETRY_QUEUE_WARNING" )
31
- retry_queue_critical : int = Field (default = 5000 , env = "RETRY_QUEUE_CRITICAL" )
30
+ retry_queue_warning : int = Field (default = 1000 )
31
+ retry_queue_critical : int = Field (default = 5000 )
32
32
33
33
# Circuit Breaker Configuration
34
34
circuit_failure_threshold : float = Field (
35
- default = 0.5 , env = "CIRCUIT_FAILURE_THRESHOLD"
35
+ default = 0.5
36
36
)
37
- circuit_volume_threshold : int = Field (default = 10 , env = "CIRCUIT_VOLUME_THRESHOLD" )
38
- circuit_timeout : int = Field (default = 60 , env = "CIRCUIT_TIMEOUT" )
37
+ circuit_volume_threshold : int = Field (default = 10 )
38
+ circuit_timeout : int = Field (default = 60 )
39
39
40
40
# OpenRouter Configuration
41
- openrouter_api_key : Optional [str ] = Field (default = None , env = "OPENROUTER_API_KEY" )
41
+ openrouter_api_key : Optional [str ] = Field (default = None )
42
42
openrouter_base_url : str = Field (
43
- default = "https://openrouter.ai/api/v1" , env = "OPENROUTER_BASE_URL"
43
+ default = "https://openrouter.ai/api/v1"
44
44
)
45
45
openrouter_model : str = Field (
46
- default = "meta-llama/llama-3.2-90b-text-preview" , env = "OPENROUTER_MODEL"
46
+ default = "meta-llama/llama-3.2-90b-text-preview"
47
47
)
48
- openrouter_timeout : int = Field (default = 30 , env = "OPENROUTER_TIMEOUT" )
48
+ openrouter_timeout : int = Field (default = 30 )
49
49
50
50
# Development Configuration
51
- debug : bool = Field (default = False , env = "DEBUG" )
52
- log_level : str = Field (default = "INFO" , env = "LOG_LEVEL" )
51
+ debug : bool = Field (default = False )
52
+ log_level : str = Field (default = "INFO" )
53
53
54
54
# API Configuration
55
55
api_title : str = "AsyncTaskFlow API"
@@ -58,9 +58,11 @@ class Settings(BaseSettings):
58
58
docs_url : str = "/docs"
59
59
redoc_url : str = "/redoc"
60
60
61
- class Config :
62
- env_file = ".env"
63
- case_sensitive = False
61
+ model_config = {
62
+ "env_file" : ".env" ,
63
+ "case_sensitive" : False ,
64
+ "env_prefix" : "" ,
65
+ }
64
66
65
67
66
68
# Global settings instance
0 commit comments