{"record":{"id":"f407734792fc4054","repo":"multica-ai/multica","slug":"copying-to-a-different-runtime-runtime-id-requ","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_agent_copy.go","lineNumber":199,"sourceCode":"\t}\n\n\t// Runtime-specific fields (model / thinking_level / service_tier) only make\n\t// sense on the runtime they were chosen for. Copy them when staying on the\n\t// same runtime; when forking to a different runtime, drop them and require\n\t// an explicit --model (pass --model \"\" to accept the target default) —\n\t// mirroring the web Duplicate clearing model on a runtime switch.\n\tif sameRuntime {\n\t\tif v := strVal(src, \"model\"); v != \"\" {\n\t\t\tbody[\"model\"] = v\n\t\t}\n\t\tif v := strVal(src, \"thinking_level\"); v != \"\" {\n\t\t\tbody[\"thinking_level\"] = v\n\t\t}\n\t\tif v := strVal(src, \"service_tier\"); v != \"\" {\n\t\t\tbody[\"service_tier\"] = v\n\t\t}\n\t} else if !cmd.Flags().Changed(\"model\") {\n\t\treturn 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\")\n\t}\n\tif cmd.Flags().Changed(\"model\") {\n\t\tv, _ := cmd.Flags().GetString(\"model\")\n\t\tbody[\"model\"] = v\n\t}\n\tif cmd.Flags().Changed(\"thinking-level\") {\n\t\tv, _ := cmd.Flags().GetString(\"thinking-level\")\n\t\tbody[\"thinking_level\"] = v\n\t}\n\tif cmd.Flags().Changed(\"service-tier\") {\n\t\tv, _ := cmd.Flags().GetString(\"service-tier\")\n\t\tbody[\"service_tier\"] = v\n\t}\n\n\t// Invocation permission: copy the source's permission_mode + allow-list by\n\t// default; any permission flag (or legacy --visibility) fully defines it\n\t// instead, so the two never mix.\n\tpermOverride := cmd.Flags().Changed(\"permission-mode\") ||","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent_copy.go#L181-L217","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Pass an explicit model available on the target runtime: multica agent copy <id> --runtime-id rt_x --model <model-name>","To accept the target runtime's default model, pass an explicitly empty value: --model \"\"","Check which models the target runtime offers before choosing"],"exampleFix":"# before\nmultica agent copy <id> --runtime-id rt_other\n# after\nmultica agent copy <id> --runtime-id rt_other --model claude-sonnet-4\n# or accept the runtime default\nmultica agent copy <id> --runtime-id rt_other --model \"\"","handlingStrategy":"validation","validationCode":"# when crossing runtimes, always resolve a model first\nMODEL=$(multica runtime models \"$TARGET_RT\" --output json | jq -r '.[0].id')\nmultica agent copy \"$AGENT_ID\" --runtime-id \"$TARGET_RT\" --model \"$MODEL\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat cross-runtime copies as migrations: always pin --model explicitly","Keep a mapping of equivalent models per runtime in deployment config","Use --model \"\" deliberately when the runtime default is acceptable"],"tags":["cli","validation","runtime","model","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}