When switching providers (e.g., Codex -> Claude) without explicitly
specifying a model, the thread's existing model slug (a Codex slug like
'gpt-5-codex') was passed to the new provider's adapter. The Claude SDK
does not understand Codex model names, causing failures.
Now, when a provider is explicitly requested and differs from the current
provider, the code falls back to DEFAULT_MODEL_BY_PROVIDER for the
target provider instead of carrying over the thread's existing model.
Co-authored-by: Julius Marminge <[email protected]>