{"record":{"id":"28e01aaf4826c9d7","repo":"continuedev/continue","slug":"invalid-model-format","errorCode":null,"errorMessage":"Invalid model format","messagePattern":"Invalid model format","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/config-yaml/src/modelName.ts","lineNumber":15,"sourceCode":"export interface ProxyModelName {\n  ownerSlug: string;\n  packageSlug: string;\n  provider: string;\n  model: string;\n}\n\nexport function parseProxyModelName(modelName: string): ProxyModelName {\n  const parts = modelName.split(\"/\");\n\n  const [ownerSlug, packageSlug, provider, ...modelParts] = parts;\n  const model = modelParts.join(\"/\");\n\n  if (!provider || !model) {\n    throw new Error(\"Invalid model format\");\n  }\n\n  return { provider, model, ownerSlug, packageSlug };\n}\n","sourceCodeStart":1,"sourceCodeEnd":20,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/config-yaml/src/modelName.ts#L1-L20","documentation":"parseProxyModelName splits the model string on '/'; it requires at least owner/package/provider/model structure. If provider or model is empty (fewer than 4 meaningful segments), the format is invalid.","triggerScenarios":"parseProxyModelName('gpt-4'), parseProxyModelName('openai/gpt-4'), or any string with fewer than 4 slash-separated parts; also a trailing slash making model empty.","commonSituations":"Passing a plain model name where the proxy format (owner/package/provider/model) is expected, or omitting the owner/package prefix.","solutions":["Use the full format: owner/package/provider/model, e.g. my-owner/my-package/openai/gpt-4o","If you only have provider/model, add the correct owner and package slugs","Validate the segment count before calling"],"exampleFix":"// before\nparseProxyModelName('openai/gpt-4');\n// after\nparseProxyModelName('my-owner/my-package/openai/gpt-4');","handlingStrategy":"validation","validationCode":"function isProxyModelName(s: string): boolean {\n  const parts = s.split('/');\n  return parts.filter(Boolean).length >= 4;\n}","typeGuard":null,"tryCatchPattern":"try { parseProxyModelName(m); } catch (e) { if (e.message === 'Invalid model format') { /* prompt for owner/package/provider/model */ } }","preventionTips":["Always write models as owner/package/provider/model","Validate model strings at config load time"],"tags":["model","parsing","validation"],"backgroundTag":"invalid-identifier-format","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}