@@ -145,8 +145,8 @@ class ServiceConfiguration(ConfigurationBase):
145145 workers : PositiveInt = 1
146146 color_log : bool = True
147147 access_log : bool = True
148- tls_config : TLSConfiguration = TLSConfiguration ( )
149- cors : CORSConfiguration = CORSConfiguration ( )
148+ tls_config : TLSConfiguration = Field ( default_factory = TLSConfiguration )
149+ cors : CORSConfiguration = Field ( default_factory = CORSConfiguration )
150150
151151 @model_validator (mode = "after" )
152152 def check_service_configuration (self ) -> Self :
@@ -371,7 +371,7 @@ class JwkConfiguration(ConfigurationBase):
371371 """JWK configuration."""
372372
373373 url : AnyHttpUrl
374- jwt_configuration : JwtConfiguration = JwtConfiguration ( )
374+ jwt_configuration : JwtConfiguration = Field ( default_factory = JwtConfiguration )
375375
376376
377377class AuthenticationConfiguration (ConfigurationBase ):
@@ -458,12 +458,14 @@ class Configuration(ConfigurationBase):
458458 service : ServiceConfiguration
459459 llama_stack : LlamaStackConfiguration
460460 user_data_collection : UserDataCollection
461- database : DatabaseConfiguration = DatabaseConfiguration ()
462- mcp_servers : list [ModelContextProtocolServer ] = []
463- authentication : AuthenticationConfiguration = AuthenticationConfiguration ()
461+ database : DatabaseConfiguration = Field (default_factory = DatabaseConfiguration )
462+ mcp_servers : list [ModelContextProtocolServer ] = Field (default_factory = list )
463+ authentication : AuthenticationConfiguration = Field (
464+ default_factory = AuthenticationConfiguration
465+ )
464466 authorization : Optional [AuthorizationConfiguration ] = None
465467 customization : Optional [Customization ] = None
466- inference : InferenceConfiguration = InferenceConfiguration ( )
468+ inference : InferenceConfiguration = Field ( default_factory = InferenceConfiguration )
467469
468470 def dump (self , filename : str = "configuration.json" ) -> None :
469471 """Dump actual configuration into JSON file."""
0 commit comments