multica-ai/multica · error

copying to a different runtime (--runtime-id) requires --mod

Error message

copying to a different runtime (--runtime-id) requires --model, because the source model may not exist on the target runtime; pass --model "" to accept the target runtime default

What it means

Thrown by `multica agent copy` when --runtime-id differs from the source agent's runtime (a cross-runtime fork) and --model was not supplied. The source model identifier may not exist on the target runtime, so the CLI refuses to copy it blindly; passing an explicit --model (even empty string) acknowledges the choice and accepts the target runtime default.

Source

Thrown at server/cmd/multica/cmd_agent_copy.go:199

	}

	// Runtime-specific fields (model / thinking_level / service_tier) only make
	// sense on the runtime they were chosen for. Copy them when staying on the
	// same runtime; when forking to a different runtime, drop them and require
	// an explicit --model (pass --model "" to accept the target default) —
	// mirroring the web Duplicate clearing model on a runtime switch.
	if sameRuntime {
		if v := strVal(src, "model"); v != "" {
			body["model"] = v
		}
		if v := strVal(src, "thinking_level"); v != "" {
			body["thinking_level"] = v
		}
		if v := strVal(src, "service_tier"); v != "" {
			body["service_tier"] = v
		}
	} else if !cmd.Flags().Changed("model") {
		return fmt.Errorf("copying to a different runtime (--runtime-id) requires --model, because the source model may not exist on the target runtime; pass --model \"\" to accept the target runtime default")
	}
	if cmd.Flags().Changed("model") {
		v, _ := cmd.Flags().GetString("model")
		body["model"] = v
	}
	if cmd.Flags().Changed("thinking-level") {
		v, _ := cmd.Flags().GetString("thinking-level")
		body["thinking_level"] = v
	}
	if cmd.Flags().Changed("service-tier") {
		v, _ := cmd.Flags().GetString("service-tier")
		body["service_tier"] = v
	}

	// Invocation permission: copy the source's permission_mode + allow-list by
	// default; any permission flag (or legacy --visibility) fully defines it
	// instead, so the two never mix.
	permOverride := cmd.Flags().Changed("permission-mode") ||

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass an explicit model available on the target runtime: multica agent copy <id> --runtime-id rt_x --model <model-name>
  2. To accept the target runtime's default model, pass an explicitly empty value: --model ""
  3. Check which models the target runtime offers before choosing

Example fix

# before
multica agent copy <id> --runtime-id rt_other
# after
multica agent copy <id> --runtime-id rt_other --model claude-sonnet-4
# or accept the runtime default
multica agent copy <id> --runtime-id rt_other --model ""
Defensive patterns

Strategy: validation

Validate before calling

# when crossing runtimes, always resolve a model first
MODEL=$(multica runtime models "$TARGET_RT" --output json | jq -r '.[0].id')
multica agent copy "$AGENT_ID" --runtime-id "$TARGET_RT" --model "$MODEL"

Prevention

When it happens

Trigger: `multica agent copy <id> --runtime-id rt_other` with no --model flag anywhere on the command line; forking a claude-runtime agent onto a different provider's runtime.

Common situations: Migrating agents between providers (e.g. Anthropic-hosted to local/Ollama runtime); cloning a production agent to a cheaper runtime and forgetting that model names are runtime-specific.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/f407734792fc4054. Report an issue: GitHub.