{"record":{"id":"6a69e9a2f25ecd43","repo":"deepseek-ai/deepseek-harness","slug":"llm-retry-retrypolicy-belongs-under-each-provider","errorCode":null,"errorMessage":"llm-retry: retryPolicy belongs under each provider configuration","messagePattern":"llm-retry: retryPolicy belongs under each provider configuration","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-retry/src/index.ts","lineNumber":33,"sourceCode":"import type { LlmRetryEventData } from './types.ts'\n\nexport type { LlmRetryEventData, LlmRetryStartedEventData } from './types.ts'\nexport { RetryId } from './brand.ts'\n\nexport const name = 'llm-retry'\nexport const inject = ['agents']\n\n/** This policy executor has no config; providers own `retryPolicy`. */\nexport type Config = Readonly<Record<string, never>>\n\n/** Runtime schema for {@link Config}. */\nexport const Config = z.object({}) as unknown as z<Config>\n\nfunction validateConfig(config: Config): void {\n  const [key] = Object.keys(config)\n  if (key === undefined) return\n  if (key === 'retryPolicy') {\n    throw new Error('llm-retry: retryPolicy belongs under each provider configuration')\n  }\n  throw new Error(`llm-retry: unknown key \"${key}\"`)\n}\n\n/** Non-serializable hooks used to make timing policy deterministic in tests. */\nexport interface RetryInternals {\n  /** Random sample in the inclusive zero-to-one range used for jitter. */\n  random?: () => number\n}\n\ntype DownstreamOutcome =\n  | { readonly type: 'decision'; readonly decision: RequestErrorAction }\n  | { readonly type: 'error'; readonly error: unknown }\n\nasync function settleDownstream(\n  next: () => Promise<RequestErrorAction>,\n): Promise<DownstreamOutcome> {\n  try {","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-retry/src/index.ts#L15-L51","documentation":"Error \"llm-retry: retryPolicy belongs under each provider configuration\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-retry/src/index.ts:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move retryPolicy under each provider configuration."],"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"}