{"record":{"id":"d53d839912337bb7","repo":"deepseek-ai/deepseek-harness","slug":"name-summarizationmodel-must-be-a-string","errorCode":null,"errorMessage":"${name}.summarizationModel must be a string","messagePattern":"(.+?)\\.summarizationModel must be a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/compaction/compaction-basic/src/config.ts","lineNumber":265,"sourceCode":"  if (maxOverflowRetries !== undefined) {\n    assertNonNegativeInteger(`${name}.maxOverflowRetries`, maxOverflowRetries)\n  }\n\n  validateSummarizationPair(config, name)\n}\n\n/** Require one scope to omit, clear, or replace the summarization target as a pair. */\nfunction validateSummarizationPair(\n  config: CompactionPolicyConfig | Record<string, unknown>,\n  name: string,\n): void {\n  const provider = config.summarizationProvider\n  const model = config.summarizationModel\n  if (provider !== undefined && typeof provider !== 'string') {\n    throw new Error(`${name}.summarizationProvider must be a string`)\n  }\n  if (model !== undefined && typeof model !== 'string') {\n    throw new Error(`${name}.summarizationModel must be a string`)\n  }\n  if (provider === undefined && model === undefined) return\n  if (provider === undefined || model === undefined\n    || (provider.length === 0) !== (model.length === 0)) {\n    throw new Error(\n      `${name}: summarizationProvider and summarizationModel must be set together `\n      + 'as an empty or non-empty pair',\n    )\n  }\n}\n\n/** Reject stale or misspelled keys before defaults can hide them. */\nfunction validateKeys(config: object, keys: ReadonlySet<string>, name: string): void {\n  for (const key of Object.keys(config)) {\n    if (!keys.has(key)) throw new Error(`${name}: unknown key \"${key}\"`)\n  }\n}\n","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/compaction/compaction-basic/src/config.ts#L247-L283","documentation":"summarizationModel names the model that performs compaction summarization. validateSummarizationPair() requires a string when the key is present; numbers, booleans, arrays, objects, and null all fail. It participates in the same pair rule as summarizationProvider.","triggerScenarios":"'summarizationModel:' with no value (YAML null), a numeric model id, or a list of candidate models (only one string is accepted, no fallback lists).","commonSituations":"Quoting or id mistakes when templating model names; trying to specify multiple fallback models as a list; assuming a default model fills in when the key is blank.","solutions":["Set it to exactly one non-empty model string alongside summarizationProvider","Remove both keys to inherit the effective setting","If you need a different summarization model per route, put the pair in that route's modelPolicies entry"],"exampleFix":"# before — list of models\nsummarizationProvider: deepseek\nsummarizationModel:\n  - deepseek-chat\n  - deepseek-reasoner\n\n# after — single string\nsummarizationProvider: deepseek\nsummarizationModel: deepseek-chat","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"function isOptionalString(v: unknown): v is string | undefined {\n  return v === undefined || typeof v === 'string'\n}\n// usage: isOptionalString(config.summarizationModel)","tryCatchPattern":"try {\n  resolveConfig(config)\n} catch (err) {\n  if ((err as Error).message.includes('summarizationModel must be a string')) {\n    throw new Error(\n      `summarizationModel: expected one model-name string or omit the key; got ${JSON.stringify(config.summarizationModel)}`,\n      { cause: err },\n    )\n  }\n  throw err\n}","preventionTips":["One model per config scope — no fallback lists at this key","Quote model names in generated YAML and verify no numeric ids slip in","Put per-route summarization models in that route's modelPolicies entry"],"tags":["config","validation","yaml","type-mismatch","compaction"],"backgroundTag":"config-type-mismatch","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}