{"record":{"id":"90fb34b9ff29efc7","repo":"deepseek-ai/deepseek-harness","slug":"llm-deepseek-catalog-model-model-id-contextw","errorCode":null,"errorMessage":"llm-deepseek: catalog model \"${model.id}\" contextWindow must be a positive integer","messagePattern":"llm-deepseek: catalog model \"(.+?)\" contextWindow must be a positive integer","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-deepseek/src/index.ts","lineNumber":205,"sourceCode":"/**\n * One resolution's complete request facts. Connection and credential facts\n * are one value on purpose: a snapshot the resolver rejects keeps the whole\n * previous generation, so a request can never pair a stale endpoint with a\n * newer key.\n */\nexport type ResolvedDeepSeekOptions = DeepSeekConnectionOptions\n\n/** Resolve, validate, and detach the advisory model catalog. */\nfunction resolveModels(models: readonly DeepSeekCatalogModel[] | undefined): DeepSeekCatalogModel[] {\n  const seen = new Set<string>()\n  return (models ?? DEFAULT_MODELS).map((model) => {\n    if (model.id.length === 0) throw new Error('llm-deepseek: catalog model ids must be non-empty')\n    if (model.name !== undefined && model.name.length === 0) {\n      throw new Error(`llm-deepseek: catalog model \"${model.id}\" has an empty name`)\n    }\n    if (model.contextWindow !== undefined\n      && (!Number.isInteger(model.contextWindow) || model.contextWindow <= 0)) {\n      throw new Error(\n        `llm-deepseek: catalog model \"${model.id}\" contextWindow must be a positive integer`,\n      )\n    }\n    if (model.maxTokens !== undefined\n      && (!Number.isInteger(model.maxTokens) || model.maxTokens <= 0)) {\n      throw new Error(\n        `llm-deepseek: catalog model \"${model.id}\" maxTokens must be a positive integer`,\n      )\n    }\n    const inputModalities = model.inputModalities ?? ['text']\n    if (inputModalities.length === 0) {\n      throw new Error(`llm-deepseek: catalog model \"${model.id}\" inputModalities must not be empty`)\n    }\n    if (inputModalities.some(modality => !MODEL_MODALITIES.includes(modality))) {\n      throw new Error(\n        `llm-deepseek: catalog model \"${model.id}\" inputModalities must contain only \"text\" and \"image\"`,\n      )\n    }","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-deepseek/src/index.ts#L187-L223","documentation":"Error \"llm-deepseek: catalog model \"${model.id}\" contextWindow must be a positive integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-deepseek/src/index.ts:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set contextWindow to a positive integer."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}