/** Harnesses with a verified catalog and model-selection path. */ export function supportsChatModels(backend) { return ["", "opencode", "codex", "claude"].includes(String(backend ?? "").trim()); } /** Never turn an unknown remote model into an invented model name. */ export function chatModelLabel(session) { const model = String(session?.model ?? "").trim() || "Model"; return session?.model_selection === "next_turn" ? `${model} ยท next turn` : model; } export function chatModelSelectionNote(backend) { if (backend === "codex") { return "Saved by Pipelines for the next turn you send. Does not resume this thread or edit global Codex configuration."; } if (backend === "claude") { return "Saved by Pipelines for the next turn you send. Does not edit your global Claude Code configuration."; } return "Applies to the next turn in this chat."; }