docker/compose · error
error checking docker-model status: %w
Error message
error checking docker-model status: %w
What it means
Before using models, compose runs `<plugin> status --json` and parses the endpoint from its combined output. A non-zero exit from that subprocess is wrapped here. It means the model plugin binary ran but the status query itself failed.
Source
Thrown at pkg/compose/model.go:205
}
events.On(api.Resource{
ID: config.Name,
Status: api.Done,
Text: api.StatusConfigured,
})
return nil
}
func (m *modelAPI) SetModelVariables(ctx context.Context, project *types.Project) error {
cmd := exec.CommandContext(ctx, m.path, "status", "--json")
err := m.prepare(ctx, cmd)
if err != nil {
return err
}
statusOut, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("error checking docker-model status: %w", err)
}
type Status struct {
Endpoint string `json:"endpoint"`
}
var status Status
err = json.Unmarshal(statusOut, &status)
if err != nil {
return err
}
for _, service := range project.Services {
for ref, modelConfig := range service.Models {
model := project.Models[ref]
varPrefix := strings.ReplaceAll(strings.ToUpper(ref), "-", "_")
var variable string
if modelConfig != nil && modelConfig.ModelVariable != "" {
variable = modelConfig.ModelVariableView on GitHub (pinned to ddc4b044b6)
Solutions
- Run docker model status --json by hand and read its stderr
- Ensure the Docker daemon (and model backend) is up: docker info
- Verify DOCKER_HOST / context is correct for the environment compose runs in
- Update the model plugin to match the backend version
Defensive patterns
Strategy: try-catch
Validate before calling
// smoke-test the plugin before compose runs
out, err := exec.CommandContext(ctx, "docker", "model", "status", "--json").CombinedOutput()
if err != nil {
return fmt.Errorf("model backend unhealthy: %w: %s", err, out)
} Try / catch
if err := setModelVars(ctx, project); err != nil && strings.Contains(err.Error(), "docker-model status") {
// surface plugin output; start model backend; retry once
} Prevention
- Ensure the daemon and model backend are up before compose commands that touch models
- Keep DOCKER_HOST/context consistent between the shell and the plugin environment
When it happens
Trigger: exec.CommandContext of `docker model status --json` exits non-zero: model backend not running, invalid DOCKER_HOST/endpoint propagation, plugin version that errors on status.
Common situations: DOCKER_HOST pointing at a remote/unreachable daemon; model backend service stopped; version mismatch between plugin and backend after a partial upgrade.
Related errors
- error checking available models: %w
- 'models' support requires Docker Model plugin
- failed to load Docker Model plugin: %w
- error unmarshalling available models: %w
- process still running
AI-assisted analysis of docker/compose@ddc4b044b6 (2026-08-15).
Data as JSON: /api/errors/0975762f73d98f71.
Report an issue: GitHub.