{"record":{"id":"642c376c2f6f6fc9","repo":"coleam00/Archon","slug":"model-override-targetname-has-invalid-pi-mode","errorCode":null,"errorMessage":"Model override '${targetName}' has invalid Pi model '${remainder}'. Pi overrides need a vendor prefix, e.g. 'pi/minimax/minimax-m3'.","messagePattern":"Model override '(.+?)' has invalid Pi model '(.+?)'\\. Pi overrides need a vendor prefix, e\\.g\\. 'pi/minimax/minimax-m3'\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflows/src/model-validation.ts","lineNumber":360,"sourceCode":"      throw new Error(`Model override '${targetName}' could not resolve '${spec}'.`);\n    }\n    return normalizeRunOverridePreset(targetName, { ...resolved });\n  }\n\n  const slash = spec.indexOf('/');\n  if (slash === -1) {\n    const target = presetForOverrideTarget(profile, targetName);\n    return normalizeRunOverridePreset(targetName, { provider: target.provider, model: spec });\n  }\n\n  const prefix = spec.slice(0, slash);\n  const remainder = spec.slice(slash + 1);\n  if (isRegisteredProvider(prefix)) {\n    if (remainder.length === 0) {\n      throw new Error(`Model override '${targetName}' has an empty model id.`);\n    }\n    if (prefix === 'pi' && !parsePiModelRef(remainder)) {\n      throw new Error(\n        `Model override '${targetName}' has invalid Pi model '${remainder}'. ` +\n          \"Pi overrides need a vendor prefix, e.g. 'pi/minimax/minimax-m3'.\"\n      );\n    }\n    return normalizeRunOverridePreset(targetName, { provider: prefix, model: remainder });\n  }\n\n  if (!parsePiModelRef(spec)) {\n    throw new Error(\n      `Model override '${targetName}' has invalid model '${spec}'. Expected <agent>/<model> or <vendor>/<model>.`\n    );\n  }\n  return normalizeRunOverridePreset(targetName, { provider: 'pi', model: spec });\n}\n\n/**\n * Resolve one invocation's string mappings against the already-layered lower\n * profile. This is the only transport-to-profile boundary used by CLI and HTTP.","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/model-validation.ts#L342-L378","documentation":"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.","triggerScenarios":"resolveRunModelOverrides with spec 'pi/<something>' where <something> lacks the required <vendor>/<model> shape, e.g. 'pi/gpt-4o' or 'pi/minimax'.","commonSituations":"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.","solutions":["Use a full vendor-qualified ref: 'pi/minimax/minimax-m3' rather than 'pi/minimax'.","Check the Pi model catalog for the exact vendor/model pair.","If you meant a registered provider override, use '<provider>/<model>' directly instead of routing through 'pi'.","Validate the ref with parsePiModelRef before submitting."],"exampleFix":"// before\n--model large=pi/minimax\n// after\n--model large=pi/minimax/minimax-m3","handlingStrategy":"validation","validationCode":"function isValidPiRef(spec: string, parsePiModelRef: (s: string) => unknown): boolean {\n  const slash = spec.indexOf('/');\n  if (slash <= 0) return false;\n  const prefix = spec.slice(0, slash);\n  if (prefix !== 'pi') return true;\n  return parsePiModelRef(spec.slice(slash + 1)) != null;\n}","typeGuard":"function isVendorQualifiedPiRef(remainder: string): boolean {\n  const parts = remainder.split('/').filter(Boolean);\n  return parts.length >= 2;\n}","tryCatchPattern":"try {\n  resolveRunModelOverrides(assignments);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"invalid Pi model\")) {\n    throw new Error(`Fix Pi ref to vendor/model form, e.g. pi/minimax/minimax-m3 (${err.message})`);\n  }\n  throw err;\n}","preventionTips":["Treat every pi/ ref as vendor-qualified: pi/<vendor>/<model>.","Look up exact vendor/model pairs in the Pi catalog before writing configs.","Validate pi refs with parsePiModelRef in a pre-flight script.","Copy working refs from your project's existing run configs instead of typing from memory."],"tags":["config","validation","pi-model"],"backgroundTag":"invalid-model-override-format","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}