From 7bda09fca5c3fcf3d9c27f6a89a7f9f38633abd3 Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Thu, 19 Jun 2025 09:04:51 -0400 Subject: [PATCH] Made lume provider visible in docker agent UI --- libs/agent/agent/ui/gradio/app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/agent/agent/ui/gradio/app.py b/libs/agent/agent/ui/gradio/app.py index 0593d776..bafa6c3e 100644 --- a/libs/agent/agent/ui/gradio/app.py +++ b/libs/agent/agent/ui/gradio/app.py @@ -132,6 +132,10 @@ class GradioChatScreenshotHandler(DefaultCallbackHandler): # Detect if current device is MacOS is_mac = platform.system().lower() == "darwin" +# Detect if lume is available (host device is macOS) +is_arm64 = platform.machine().lower() == "arm64" +is_lume_available = is_mac or (is_arm64 and os.environ.get("LUME_HOST", "localhost") != "localhost") + # Map model names to specific provider model names MODEL_MAPPINGS = { "openai": { @@ -733,9 +737,9 @@ if __name__ == "__main__": is_mac = platform.system().lower() == "darwin" providers = ["cloud"] - if is_mac: + if is_lume_available: providers += ["lume"] - elif is_windows: + if is_windows: providers += ["winsandbox"] computer_provider = gr.Radio(