{"record":{"id":"0ec79f6aed4589fe","repo":"deepseek-ai/deepseek-harness","slug":"path-unknown-key-key","errorCode":null,"errorMessage":"${path}: unknown key \"${key}\"","messagePattern":"(.+?): unknown key \"(.+?)\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/llm/llm/src/retry-policy.ts","lineNumber":117,"sourceCode":"/** Cordis schema embedded by each concrete provider configuration. */\nexport const RetryPolicySchema: z<RetryPolicyConfig> = z.union([\n  normalPolicySchema,\n  alwaysPolicySchema,\n])\n\nconst NORMAL_POLICY_KEYS: ReadonlySet<string> = new Set([\n  'mode', 'maxRetries', 'retryableCodes', 'backoff',\n])\n// Layered configuration can retain normal-only fields after switching modes;\n// always mode ignores those inactive values while still rejecting unknown keys.\nconst ALWAYS_POLICY_KEYS: ReadonlySet<string> = new Set([\n  'mode', 'maxRetries', 'retryableCodes', 'backoff',\n])\nconst BACKOFF_KEYS: ReadonlySet<string> = new Set(['initialDelayMs', 'maxDelayMs', 'jitterRatio'])\n\nfunction validateKeys(value: object, allowed: ReadonlySet<string>, path: string): void {\n  for (const key of Object.keys(value)) {\n    if (!allowed.has(key)) throw new Error(`${path}: unknown key \"${key}\"`)\n  }\n}\n\nfunction resolveBackoff(config: BackoffConfig | undefined, path: string): ResolvedRetryBackoff {\n  if (config !== undefined) validateKeys(config, BACKOFF_KEYS, path)\n  const initialDelayMs = config?.initialDelayMs ?? DEFAULT_INITIAL_DELAY_MS\n  const maxDelayMs = config?.maxDelayMs ?? DEFAULT_MAX_DELAY_MS\n  const jitterRatio = config?.jitterRatio ?? DEFAULT_JITTER_RATIO\n\n  if (!Number.isFinite(initialDelayMs) || initialDelayMs <= 0 || initialDelayMs > MAX_TIMER_DELAY_MS) {\n    throw new Error(`${path}.initialDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}`)\n  }\n  if (!Number.isFinite(maxDelayMs) || maxDelayMs <= 0 || maxDelayMs > MAX_TIMER_DELAY_MS) {\n    throw new Error(`${path}.maxDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}`)\n  }\n  if (initialDelayMs > maxDelayMs) {\n    throw new Error(`${path}.initialDelayMs must be less than or equal to maxDelayMs`)\n  }","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm/src/retry-policy.ts#L99-L135","documentation":"Error \"${path}: unknown key \"${key}\"\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm/src/retry-policy.ts:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unknown key from the retry policy."],"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"}