diff --git a/backend/onyx/llm/chat_llm.py b/backend/onyx/llm/chat_llm.py index 66e65415b..aa627703b 100644 --- a/backend/onyx/llm/chat_llm.py +++ b/backend/onyx/llm/chat_llm.py @@ -271,13 +271,21 @@ class DefaultMultiLLM(LLM): # variables. We'll also try passing them in, since litellm just ignores # addtional kwargs (and some kwargs MUST be passed in rather than set as # env variables) + + # Create a dictionary for model-specific arguments if it's None + model_kwargs = model_kwargs or {} + + # Filter out empty or None values from custom_config before use if custom_config: - for k, v in custom_config.items(): + filtered_config = {k: v for k, v in custom_config.items() if v} + + # Set non-empty config entries as environment variables for litellm + for k, v in filtered_config.items(): os.environ[k] = v - model_kwargs = model_kwargs or {} - if custom_config: - model_kwargs.update(custom_config) + # Update model_kwargs with remaining non-empty config + model_kwargs.update(filtered_config) + if extra_headers: model_kwargs.update({"extra_headers": extra_headers}) if extra_body: diff --git a/backend/onyx/server/manage/llm/api.py b/backend/onyx/server/manage/llm/api.py index e37b7951f..b5979d963 100644 --- a/backend/onyx/server/manage/llm/api.py +++ b/backend/onyx/server/manage/llm/api.py @@ -57,7 +57,6 @@ def test_llm_configuration( ) functions_with_args: list[tuple[Callable, tuple]] = [(test_llm, (llm,))] - if ( test_llm_request.fast_default_model_name and test_llm_request.fast_default_model_name diff --git a/deployment/docker_compose/docker-compose.prod.yml b/deployment/docker_compose/docker-compose.prod.yml index 720bc202e..d2c8c70be 100644 --- a/deployment/docker_compose/docker-compose.prod.yml +++ b/deployment/docker_compose/docker-compose.prod.yml @@ -238,7 +238,7 @@ services: volumes: - ../data/certbot/conf:/etc/letsencrypt - ../data/certbot/www:/var/www/certbot - logging::wq + logging: driver: json-file options: max-size: "50m" @@ -260,6 +260,3 @@ volumes: # Created by the container itself model_cache_huggingface: indexing_huggingface_model_cache: - - -