@@ -176,6 +176,8 @@ def load(
176176 cli_log_level : Optional [str ] = None ,
177177 cli_log_format : Optional [str ] = None ,
178178 cli_provider_urls : Optional [Dict [str , str ]] = None ,
179+ model_base_path : Optional [str ] = None ,
180+ embedding_model : Optional [str ] = None ,
179181 ) -> "Config" :
180182 """Load configuration with priority resolution.
181183
@@ -193,6 +195,8 @@ def load(
193195 cli_log_level: Optional CLI log level override
194196 cli_log_format: Optional CLI log format override
195197 cli_provider_urls: Optional dict of provider URLs from CLI
198+ model_base_path: Optional path to model base directory
199+ embedding_model: Optional name of the model to use for embeddings
196200
197201 Returns:
198202 Config: Resolved configuration
@@ -223,6 +227,10 @@ def load(
223227 config .log_format = env_config .log_format
224228 if "CODEGATE_PROMPTS_FILE" in os .environ :
225229 config .prompts = env_config .prompts
230+ if "CODEGATE_MODEL_BASE_PATH" in os .environ :
231+ config .model_base_path = env_config .model_base_path
232+ if "CODEGATE_EMBEDDING_MODEL" in os .environ :
233+ config .embedding_model = env_config .embedding_model
226234
227235 # Override provider URLs from environment
228236 for provider , url in env_config .provider_urls .items ():
@@ -241,6 +249,10 @@ def load(
241249 config .prompts = PromptConfig .from_file (prompts_path )
242250 if cli_provider_urls is not None :
243251 config .provider_urls .update (cli_provider_urls )
252+ if model_base_path is not None :
253+ config .model_base_path = model_base_path
254+ if embedding_model is not None :
255+ config .embedding_model = embedding_model
244256
245257 # Set the __config class attribute
246258 Config .__config = config
0 commit comments