Hmbown/CodeWhale · error

current Codewhale route

Error message

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

What it means

`plan` maps the current Codewhale route (provider + model) onto a DSH adapter and renders an overlay config. When the mapped adapter is `DshAdapter::Unsupported { reason }` and `render_overlay` consequently returns None, it throws this error naming the provider/model and the reason DSH cannot carry that route.

Solutions

  1. Switch the active route to a DSH-supported provider/model, then re-run the DSH plan/connect.
  2. Read the `reason` in the message — it states the specific unsupported capability to change.
  3. Update the route in codewhale config (`config/route`) to a supported model before retrying.
  4. If the model should be supported, update DSH adapter mapping/table for it, or skip DSH integration for this route.

Example fix

// before: route uses an unsupported provider/model
{ "provider": "my-oss-gateway", "model": "custom-model" }
// after: use a route DSH can carry
{ "provider": "anthropic", "model": "claude-sonnet-4" }
Defensive patterns

Strategy: validation

Validate before calling

let mapped = map_identity(&identity, allow_full_access);
if matches!(mapped.adapter, DshAdapter::Unsupported { .. }) {
    eprintln!("route {}/{} is not supported by DSH; switch routes first", identity.provider_id, identity.model);
    return Ok(());
}

Type guard

if let DshAdapter::Unsupported { reason } = &mapped.adapter {
    eprintln!("unsupported: {reason}");
    return Ok(());
}

Prevention

When it happens

Trigger: Calling `plan` (with identity, allow_full_access, skin, ocean) where `map_identity` yields an unsupported adapter for the active route — e.g. a provider/model combination DSH's overlay format does not support — and overlay rendering fails because of it.

Common situations: User switched to a provider or model DSH doesn't support (custom/OSS providers, new model not yet in DSH's adapter table); route config pointing at an endpoint whose parameters can't be expressed in the overlay; `allow_full_access` mapping changes that degrade into Unsupported.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/669ae20805c63d55. Report an issue: GitHub.

Appendix: source

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

    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,
    ocean: 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}",
            identity.provider_id,
            identity.model
        ),
        _ => 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)."

View on GitHub (pinned to 73e0f67d83)