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(