{"record":{"id":"09188d15b80b874d","repo":"plandex-ai/plandex","slug":"client-version-is-too-old-for-this-endpoint-pleas","errorCode":null,"errorMessage":"Client version is too old for this endpoint. Please upgrade to version %s or later.","messagePattern":"Client version is too old for this endpoint\\. Please upgrade to version (.+?) or later\\.","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"app/server/handlers/auth_helpers.go","lineNumber":447,"sourceCode":"\n\tresp := shared.SessionResponse{\n\t\tUserId:      user.Id,\n\t\tToken:       token,\n\t\tEmail:       user.Email,\n\t\tUserName:    user.Name,\n\t\tOrgs:        apiOrgs,\n\t\tIsLocalMode: os.Getenv(\"GOENV\") == \"development\" && os.Getenv(\"LOCAL_MODE\") == \"1\",\n\t}\n\n\treturn &resp, nil\n}\n\nfunc requireMinClientVersion(w http.ResponseWriter, r *http.Request, minVersion string) bool {\n\tmsg := fmt.Sprintf(\"Client version is too old for this endpoint. Please upgrade to version %s or later.\", minVersion)\n\n\tversion := r.Header.Get(\"X-Client-Version\")\n\tif version == \"\" {\n\t\thttp.Error(w, msg, http.StatusBadRequest)\n\t\treturn false\n\t}\n\n\tif version == \"development\" {\n\t\treturn true\n\t}\n\n\tif semver.Compare(version, minVersion) < 0 {\n\t\thttp.Error(w, msg, http.StatusBadRequest)\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc execAuthenticate(w http.ResponseWriter, r *http.Request, requireOrg bool, raiseErr bool) *types.ServerAuth {\n\tlog.Println(\"authenticating request\")\n","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/auth_helpers.go#L429-L465","documentation":"requireMinClientVersion enforces a minimum client version per endpoint by reading the X-Client-Version request header. If the header is missing, too old, or unparsable, the handler responds 400 with a message telling the user to upgrade to the required version. 'development' versions bypass the check.","triggerScenarios":"Calling UpsertCustomModelsHandler, ListCustomModelsHandler, CreateModelPackHandler, UpdateModelPackHandler, or ListModelPacksHandler without an X-Client-Version header, or with a version string older than the endpoint's minimum (or an unparsable value).","commonSituations":"Running an old CLI/extension against an upgraded server after new model-pack endpoints shipped; custom scripts or curl calls that omit the X-Client-Version header; corporate proxies stripping custom headers.","solutions":["Upgrade the client (CLI/extension) to at least the version named in the error message","If using a custom script, add the X-Client-Version header with a current version value","Set the version to 'development' only for local dev builds","Check that proxies/gateways are not stripping the X-Client-Version header"],"exampleFix":"// before\nreq, _ := http.NewRequest(\"POST\", url, body)\n// after\nreq, _ := http.NewRequest(\"POST\", url, body)\nreq.Header.Set(\"X-Client-Version\", \"1.2.0\")","handlingStrategy":"validation","validationCode":"if clientVersionAtLeast(\"1.2.0\") {\n    req.Header.Set(\"X-Client-Version\", clientVersion)\n} else {\n    // prompt user to upgrade before calling model-pack endpoints\n}","typeGuard":null,"tryCatchPattern":"if resp.StatusCode == http.StatusBadRequest && strings.Contains(body, \"Client version is too old\") {\n    return fmt.Errorf(\"upgrade client: %s\", body)\n}","preventionTips":["Always send the X-Client-Version header on every request","Track server release notes for new per-endpoint minimum versions","Verify custom HTTP clients and proxies preserve custom headers"],"tags":["http","versioning","client-version","compatibility"],"backgroundTag":"client-version-too-old","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}