coleam00/Archon · error · Error

Model override '${targetName}' has invalid Pi model '${remai

Error message

Model override '${targetName}' has invalid Pi model '${remainder}'. Pi overrides need a vendor prefix, e.g. 'pi/minimax/minimax-m3'.

What it means

Thrown by resolveRunOverrideSpec when the 'pi' provider is given a remainder that parsePiModelRef cannot parse. Pi model refs require a vendor prefix such as 'pi/minimax/minimax-m3'; a bare model name is not accepted.

Source

Thrown at packages/workflows/src/model-validation.ts:360

      throw new Error(`Model override '${targetName}' could not resolve '${spec}'.`);
    }
    return normalizeRunOverridePreset(targetName, { ...resolved });
  }

  const slash = spec.indexOf('/');
  if (slash === -1) {
    const target = presetForOverrideTarget(profile, targetName);
    return normalizeRunOverridePreset(targetName, { provider: target.provider, model: spec });
  }

  const prefix = spec.slice(0, slash);
  const remainder = spec.slice(slash + 1);
  if (isRegisteredProvider(prefix)) {
    if (remainder.length === 0) {
      throw new Error(`Model override '${targetName}' has an empty model id.`);
    }
    if (prefix === 'pi' && !parsePiModelRef(remainder)) {
      throw new Error(
        `Model override '${targetName}' has invalid Pi model '${remainder}'. ` +
          "Pi overrides need a vendor prefix, e.g. 'pi/minimax/minimax-m3'."
      );
    }
    return normalizeRunOverridePreset(targetName, { provider: prefix, model: remainder });
  }

  if (!parsePiModelRef(spec)) {
    throw new Error(
      `Model override '${targetName}' has invalid model '${spec}'. Expected <agent>/<model> or <vendor>/<model>.`
    );
  }
  return normalizeRunOverridePreset(targetName, { provider: 'pi', model: spec });
}

/**
 * Resolve one invocation's string mappings against the already-layered lower
 * profile. This is the only transport-to-profile boundary used by CLI and HTTP.

View on GitHub (pinned to 0773b97458)

Solutions

  1. Use a full vendor-qualified ref: 'pi/minimax/minimax-m3' rather than 'pi/minimax'.
  2. Check the Pi model catalog for the exact vendor/model pair.
  3. If you meant a registered provider override, use '<provider>/<model>' directly instead of routing through 'pi'.
  4. Validate the ref with parsePiModelRef before submitting.

Example fix

// before
--model large=pi/minimax
// after
--model large=pi/minimax/minimax-m3
Defensive patterns

Strategy: validation

Validate before calling

function isValidPiRef(spec: string, parsePiModelRef: (s: string) => unknown): boolean {
  const slash = spec.indexOf('/');
  if (slash <= 0) return false;
  const prefix = spec.slice(0, slash);
  if (prefix !== 'pi') return true;
  return parsePiModelRef(spec.slice(slash + 1)) != null;
}

Type guard

function isVendorQualifiedPiRef(remainder: string): boolean {
  const parts = remainder.split('/').filter(Boolean);
  return parts.length >= 2;
}

Try / catch

try {
  resolveRunModelOverrides(assignments);
} catch (err) {
  if (err instanceof Error && err.message.includes("invalid Pi model")) {
    throw new Error(`Fix Pi ref to vendor/model form, e.g. pi/minimax/minimax-m3 (${err.message})`);
  }
  throw err;
}

Prevention

When it happens

Trigger: resolveRunModelOverrides with spec 'pi/<something>' where <something> lacks the required <vendor>/<model> shape, e.g. 'pi/gpt-4o' or 'pi/minimax'.

Common situations: Users writing 'pi/<model>' assuming it behaves like a bare model alias; docs or muscle memory from other CLIs where 'pi/model' works; partial migration from bare model ids to vendor-qualified refs.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/642c376c2f6f6fc9. Report an issue: GitHub.