coleam00/Archon · error · Error
Model override '${targetName}' has an empty model id.
Error message
Model override '${targetName}' has an empty model id. What it means
Thrown by resolveRunOverrideSpec when a model override spec like 'provider/' specifies a registered provider but no model id after the slash. The library cannot resolve an override whose model portion is empty, so it fails fast with a targeted message naming the override.
Source
Thrown at packages/workflows/src/model-validation.ts:357
if (isTierName(spec) || spec.startsWith('@')) {
const resolved = resolveModelSpec(profile, spec);
if (isLiteralSpec(resolved)) {
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 });
}
View on GitHub (pinned to 0773b97458)
Solutions
- Provide a model id after the provider prefix, e.g. 'openai/gpt-4o' instead of 'openai/'.
- If the spec came from a variable/interpolation, log the raw value to find why it expanded empty.
- For Pi alias entries keep a vendor segment, e.g. 'pi/minimax/minimax-m3'.
- Strip accidental trailing slashes from user/config supplied specs before calling the API.
Example fix
// before --model large=openai/ // after --model large=openai/gpt-4o
Defensive patterns
Strategy: validation
Validate before calling
function isValidOverrideSpec(spec: string, isRegistered: (p: string) => boolean): boolean {
const slash = spec.indexOf('/');
if (slash <= 0) return false;
const prefix = spec.slice(0, slash);
if (isRegistered(prefix)) return spec.slice(slash + 1).length > 0;
return true;
} Type guard
function hasNonEmptyModelId(spec: string): spec is `${string}/${string}` {
const slash = spec.indexOf('/');
return slash > 0 && slash < spec.length - 1;
} Try / catch
try {
resolveRunModelOverrides(assignments);
} catch (err) {
if (err instanceof Error && err.message.includes('empty model id')) {
throw new Error(`Config error: fill in the model after the provider slash (${err.message})`);
}
throw err;
} Prevention
- Always write overrides as <provider>/<model> with both parts non-empty.
- Trim and sanitize spec strings read from env vars, YAML, or CLI input.
- Add a config-lint step that rejects specs ending in '/'.
- Keep a tested example of a valid override in your project docs.
When it happens
Trigger: Calling resolveRunModelOverrides (or resolveRunOverrideSpec directly) with a spec string of the form '<registered-provider>/' e.g. 'openai/' or 'pi/' — the first '/' yields an empty remainder.
Common situations: Hand-edited config files or CLI flags where the model after the slash was deleted or never filled in; templated YAML where a model variable expanded to empty; trailing-slash typos.
Related errors
- Model override '${targetName}' has invalid model '${spec}'.
- Invalid run config at 'document': expected an object
- Unknown run config key '${key}'.
- Run config key '${key}' cannot apply: ${classification.reaso
- Run config cannot set both 'assistant' and 'defaultAssistant
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/ffe381f2faff4d1f.
Report an issue: GitHub.