zed-industries/zed · warning
unknown teacher backend or zeta format `{arg}`
Error message
unknown teacher backend or zeta format `{arg}` What it means
Thrown by parse_teacher_args (main.rs), which parses the colon-separated suffix of teacher provider strings. Each non-empty segment must parse either as a TeacherBackend (sonnet45/sonnet46/gpt52/gpt54/gpt55 and aliases) or as a ZetaFormat version; segments that parse as neither bail here. The loop builds a (TeacherBackend, ZetaFormat) pair, defaulting both beforehand, so unknown segments mean the user asked for something that does not exist.
Source
Thrown at crates/edit_prediction_cli/src/main.rs:562
}
}
}
fn parse_teacher_args(arg: Option<&str>) -> Result<(TeacherBackend, ZetaFormat), anyhow::Error> {
let mut backend = TeacherBackend::default();
let mut format = ZetaFormat::default();
for arg in arg.unwrap_or_default().split(':') {
if arg.is_empty() {
continue;
}
if let Ok(parsed_backend) = TeacherBackend::from_str(arg) {
backend = parsed_backend;
} else if let Ok(parsed_format) = ZetaFormat::parse(arg) {
format = parsed_format;
} else {
anyhow::bail!("unknown teacher backend or zeta format `{arg}`");
}
}
Ok((backend, format))
}
impl Serialize for PredictionProvider {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_str(&self.to_string())
}
}
impl<'de> Deserialize<'de> for PredictionProvider {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
whereView on GitHub (pinned to f4178619ac)
Solutions
- Use a valid backend segment: sonnet45, sonnet46, gpt52, gpt54, gpt55 (aliases sonnet/claude/gpt/openai also parse)
- Use a zeta version exactly as printed by the provider error's 'Available zeta versions' list, e.g. teacher:sonnet46:ordered
- Split multiple options with ':' only, and drop empty/unknown segments
Example fix
# before --provider teacher:claude-sonnet-4-6 # after --provider teacher:sonnet46:ordered
Defensive patterns
Strategy: validation
Validate before calling
fn teacher_args_are_valid(spec: &str) -> bool {
spec.split(':')
.filter(|seg| !seg.is_empty())
.all(|seg| TeacherBackend::from_str(seg).is_ok() || ZetaFormat::parse(seg).is_ok())
} Prevention
- Split teacher provider specs on ':' and validate each segment as a backend or a zeta version before running
- Copy zeta version strings verbatim from the 'Available zeta versions' list in the provider error
- Order and duplication do not matter (later segments override), but every segment must parse
When it happens
Trigger: Passing --provider teacher:sonnet47 or teacher:V9999_Bogus — the segment after ':' fails both TeacherBackend::from_str and ZetaFormat::parse. Also triggered by stray segments like teacher:sonnet46:extra, or separators other than ':' (teacher-sonnet46 makes the whole string an unknown root provider, error 225 instead).
Common situations: Guessing a newer model alias before it is added to TeacherBackend; pasting a zeta version string from a different branch; mixing up which side of the provider string carries the backend vs the format.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- unknown teacher backend `{s}`. Valid options: sonnet45, sonn
- unknown provider `{provider}`. Valid options: mercury, zeta1
- --languages and/or --extensions is required (use --list to s
- parse-output only supports Teacher and Zeta2 providers, got
- No existing predictions found. Use --provider to specify whi
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/f7a7ca2d73da872f.
Report an issue: GitHub.