Hmbown/CodeWhale · error

current Codewhale route cannot be carried by DSH: {reason}

Error message

current Codewhale route cannot be carried by DSH: {reason}

What it means

`dsh::plan` maps the Codewhale route identity onto a DSH adapter via `map_identity` before rendering the overlay; when mapping yields `DshAdapter::Unsupported`, `render_overlay` returns None and this error surfaces with the adapter's reason. Grounded reasons (identity.rs:202-268): the base_url is not structural (e.g. embeds userinfo), the route speaks the OpenAI Responses protocol, or the Anthropic Messages protocol — the adapter only carries DeepSeek-native routes and `openai-completions` hand-declared routes.

Source

Thrown at crates/tui/src/integrations/dsh/mod.rs:329

    pub(crate) profile: String,
    pub(crate) launch_command: String,
    pub(crate) env_exports: Vec<(String, String)>,
    pub(crate) shadowing_namespaces: Vec<String>,
    pub(crate) disclosures: Vec<String>,
}

pub(crate) fn plan(
    paths: &DshPaths,
    detection: &DshDetection,
    identity: &CodewhaleRouteIdentity,
    profile: &str,
    allow_full_access: bool,
    skin: bool,
) -> Result<DshPlan> {
    let mapped = map_identity(identity, allow_full_access);
    let overlay_text = render_overlay(&mapped).ok_or_else(|| match &mapped.adapter {
        DshAdapter::Unsupported { reason } => {
            anyhow::anyhow!("current Codewhale route cannot be carried by DSH: {reason}")
        }
        _ => anyhow::anyhow!("overlay could not be rendered"),
    })?;
    let overlay_sha256 = sha256_hex(overlay_text.as_bytes());
    let mut disclosures = mapped.disclosures.clone();
    let shadowing = shadowing_namespaces(detection);
    if !shadowing.is_empty() {
        disclosures.push(format!(
            "$DSH_HOME/settings.yaml has [{}] sections; DSH layers those over the overlay per field, so the saved DSH selection can shadow the pinned identity until you clear it in DSH.",
            shadowing.join(", ")
        ));
    }
    if !detection.profiles.iter().any(|p| p == profile) {
        disclosures.push(format!(
            "DSH profile `{profile}` is not initialized yet; dsh will create $DSH_HOME/profiles/{profile} on first launch (its own documented behavior)."
        ));
    }
    if skin {

View on GitHub (pinned to 8880682c63)

Solutions

  1. Switch the active Codewhale route to a provider the adapter carries: DeepSeek (deepseek/deepseek-cn) or any ChatCompletions-compatible provider
  2. Remove credentials embedded in the base_url — put them in the provider's key env var instead
  3. Preview mappability without side effects: `codewhale integrations dsh plan` fails with the same reason before anything is written
  4. If you need Responses/Anthropic routes, do not connect DSH through Codewhale; run dsh with its own configuration

Example fix

// before — plan and fail late
let plan = dsh::plan(&paths, &detection, &identity, &profile, allow_full_access, skin)?;

// after — check mappability first (identity.rs provides MappedIdentity::mappable)
let mapped = dsh::map_identity(&identity, allow_full_access);
if !mapped.mappable() {
    if let dsh::DshAdapter::Unsupported { reason } = &mapped.adapter {
        eprintln!("route not carryable by DSH: {reason}");
    }
    return Ok(());
}
let plan = dsh::plan(&paths, &detection, &identity, &profile, allow_full_access, skin)?;
Defensive patterns

Strategy: type-guard

Validate before calling

let mapped = dsh::map_identity(&identity, allow_full_access);
if !mapped.mappable() {
    if let dsh::DshAdapter::Unsupported { reason } = &mapped.adapter {
        eprintln!("this route cannot be carried by DSH: {reason}");
    }
    return Ok(());
}
let plan = dsh::plan(&paths, &detection, &identity, &profile, allow_full_access, skin)?;

Type guard

fn route_carryable(identity: &dsh::CodewhaleRouteIdentity, allow_full_access: bool) -> bool {
    dsh::map_identity(identity, allow_full_access).mappable() // identity.rs:94
}

Try / catch

// plan() only fails for Unsupported after map_identity; pre-check mappable()
// and render the reason as guidance, reserving the bail for truly unexpected
// render failures.

Prevention

When it happens

Trigger: connect/plan/update while the active Codewhale route is an OpenAI Responses-protocol provider, an Anthropic Messages-protocol provider, or a base_url with embedded credentials — none of which the DSH overlay format can express. DeepSeek providers over ChatCompletions and generic ChatCompletions providers map fine.

Common situations: Pointing Codewhale at an Anthropic or OpenAI Responses provider and then trying to connect DSH; self-hosted gateways that expose the Responses API; base_urls containing user:pass@ style prefixes.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/19b82423914359fe. Report an issue: GitHub.