Problem
When users connect via kittylitter and use third-party models through ANTHROPIC_MODEL (DeepSeek, OpenRouter, Mimo, etc.), selecting those models in Litter fails because:
runtime_for_model_hint() does not recognize third-party model names (e.g., deepseek-v4-pro[1m], mimo-v2) — they route to "codex" by default instead of "claude"
runtime_for_thread_start() has no fallback: when both resolve_model_selection() and runtime_for_model_hint() return None, it always defaults to "codex", even when the claude runtime is connected
Proposed fix
Two changes in shared/rust-bridge/codex-mobile-client/src/mobile_client/mod.rs:
1. Add common third-party provider patterns to runtime_for_model_hint()
_ if normalized.contains("deepseek") => Some("claude".to_string()),
_ if normalized.contains("openrouter") => Some("claude".to_string()),
2. Add claude runtime fallback in runtime_for_thread_start()
When no model hint matches, check if the claude runtime is connected and prefer it over the codex default:
if let Ok(session) = self.get_session(server_id) {
let runtimes = session.runtime_kinds();
if runtimes.iter().any(|k| k == "claude") {
return "claude".to_string();
}
}
"codex".to_string()
Why this is safe
- The fallback only activates when claude runtime is explicitly connected
- The existing explicit runtime override (
explicit_runtime_kind) still takes priority
- Model names not in
available_models are passed through unchanged to the host, where Claude Code handles them via ANTHROPIC_MODEL
Related
Companion fix needed in dnakov/alleycat: the Claude bridge model/list handler should advertise ANTHROPIC_MODEL env var values so custom models appear in the Litter model picker.
Problem
When users connect via kittylitter and use third-party models through
ANTHROPIC_MODEL(DeepSeek, OpenRouter, Mimo, etc.), selecting those models in Litter fails because:runtime_for_model_hint()does not recognize third-party model names (e.g.,deepseek-v4-pro[1m],mimo-v2) — they route to"codex"by default instead of"claude"runtime_for_thread_start()has no fallback: when bothresolve_model_selection()andruntime_for_model_hint()returnNone, it always defaults to"codex", even when the claude runtime is connectedProposed fix
Two changes in
shared/rust-bridge/codex-mobile-client/src/mobile_client/mod.rs:1. Add common third-party provider patterns to
runtime_for_model_hint()2. Add claude runtime fallback in
runtime_for_thread_start()When no model hint matches, check if the claude runtime is connected and prefer it over the codex default:
Why this is safe
explicit_runtime_kind) still takes priorityavailable_modelsare passed through unchanged to the host, where Claude Code handles them viaANTHROPIC_MODELRelated
Companion fix needed in
dnakov/alleycat: the Claude bridgemodel/listhandler should advertiseANTHROPIC_MODELenv var values so custom models appear in the Litter model picker.