{"record":{"id":"57314f7df7f6ae64","repo":"deepseek-ai/deepseek-harness","slug":"name-summarizationprovider-and-summarizationmo","errorCode":null,"errorMessage":"${name}: summarizationProvider and summarizationModel must be set together as an empty or non-empty pair","messagePattern":"(.+?): summarizationProvider and summarizationModel must be set together as an empty or non-empty pair","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/compaction/compaction-basic/src/config.ts","lineNumber":270,"sourceCode":"}\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\nfunction isUnknownRecord(value: unknown): value is Record<string, unknown> {\n  return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction assertNonEmptyString(name: string, value: unknown): asserts value is string {","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/compaction/compaction-basic/src/config.ts#L252-L288","documentation":"The summarization target is managed as an inseparable pair per scope: omit both keys to inherit, set both to '' to explicitly clear, or set both to non-empty strings to replace. Any half-set or mixed-emptiness combination is rejected so resolveTargetPolicy()'s 'override ?? default' merge can never produce a provider-less model or a model-less provider.","triggerScenarios":"Top level or a modelPolicies entry sets exactly one of summarizationProvider/summarizationModel, or sets one to '' and the other to a non-empty string. Both undefined (inherit) and both '' (explicit clear) pass.","commonSituations":"Assuming the model alone identifies the target because only one provider is configured; trying to disable summarization by blanking just one field; copy-paste that drops one of the two lines.","solutions":["To set a summarization target, provide both summarizationProvider and summarizationModel as non-empty strings","To clear the target for a modelPolicies entry, set both fields to ''","To inherit the effective setting, remove both keys"],"exampleFix":"# before — half-set pair\nsummarizationProvider: deepseek\n\n# after — complete pair\nsummarizationProvider: deepseek\nsummarizationModel: deepseek-chat","handlingStrategy":"validation","validationCode":"for (const scope of [config, ...(config.modelPolicies ?? [])]) {\n  const p = scope.summarizationProvider\n  const m = scope.summarizationModel\n  const pairOk = p === undefined && m === undefined\n    || (p !== undefined && m !== undefined && (p.length === 0) === (m.length === 0))\n  if (!pairOk) throw new Error('summarizationProvider and summarizationModel must be set together')\n}\nresolveConfig(config)","typeGuard":null,"tryCatchPattern":"try {\n  resolveConfig(config)\n} catch (err) {\n  if ((err as Error).message.includes('set together')) {\n    throw new Error(\n      'summarization pair incomplete: set both fields non-empty, set both to empty strings to clear, or remove both',\n      { cause: err },\n    )\n  }\n  throw err\n}","preventionTips":["Always edit summarizationProvider and summarizationModel as a unit","To disable summarization for a route, set both to empty strings in that entry — do not blank one field","In config templates, keep the two keys on adjacent lines so copy-paste drops both or neither"],"tags":["config","validation","paired-options","compaction"],"backgroundTag":"paired-required-options","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}