exo icon indicating copy to clipboard operation
exo copied to clipboard

resolve issue #1070

Open samiamjidkhan opened this issue 2 months ago • 4 comments

Motivation

https://github.com/exo-explore/exo/issues/1070

Changes

Added check in ChatForm.svelte to reset selectedChatModel when it no longer matches any running instance.

Why It Works

The $effect now detects when the selected model is stale (not in availableModels()) and resets to the first available model.

Test Plan

Manual Testing

  1. Create instance of Model A → Delete it → Create instance of Model B → Chat
  2. Verify request goes to Model B (not Model A)

samiamjidkhan avatar Jan 01 '26 00:01 samiamjidkhan

I think the better way to fix this is to auto-select an instance after launching it.

If we delete one that is selected, then we should select the most recently launched model.

Most importantly, whatever is selected in the dropdown menu should be the one that we chat to, otherwise what we display to the user is not in line with the actual model running.

AlexCheema avatar Jan 05 '26 11:01 AlexCheema

Tested this change.

Launching an instance does not select it in the model dropdown.

How to reproduce:

  • Launch an instance of Qwen 0.6B 4-bit
  • It gets auto-selected (correct)
  • Chat with Qwen 0.6B 4-bit
  • It returns correctly using Qwen 0.6B 4-bit (correct)
  • Launch an instance of Llama 1B 4-bit
  • It does not select Llama 1B 4-bit (wrong)

AlexCheema avatar Jan 08 '26 12:01 AlexCheema

  • Launch an instance of Qwen 0.6B 4-bit
  • It gets auto-selected (correct)
  • Chat with Qwen 0.6B 4-bit
  • It returns correctly using Qwen 0.6B 4-bit (correct)
  • Delete instance of Qwen 0.6B 4-bit
  • Instance gets deleted and model option disappears next to chat input
  • Chat again
  • Response is Error: API error: 404 - {"detail":"No instance found for model mlx-community/Qwen3-0.6B-4bit"} (WRONG)

The correct behavior should be when you start exo from scratch with no instances and try to chat - it returns Error: No model selected and no running instances available. Please launch an instance first. So the solution is when there are no instances it should behave like when you open the dashboard initially and no instances have been launched.

AlexCheema avatar Jan 08 '26 19:01 AlexCheema

Added an else branch to clear the selection when no instances are running @AlexCheema

samiamjidkhan avatar Jan 08 '26 20:01 samiamjidkhan