{"record":{"id":"a44b60fe2ad1a846","repo":"deepseek-ai/deepseek-harness","slug":"no-provider-model-available-for-summarization-set","errorCode":null,"errorMessage":"no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields","messagePattern":"no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/compaction/compaction-basic/src/summarizer.ts","lineNumber":140,"sourceCode":"  ctx: Context,\n  config: SummaryConfig,\n  input: SummarizationInput,\n  agent: Agent,\n  signal?: AbortSignal,\n): Promise<SummaryResult> {\n  const latest = agent.session.requestHeader()?.config\n  const configured = config.summarizationProvider.length === 0\n    ? undefined\n    : { provider: config.summarizationProvider, model: config.summarizationModel }\n  const agentTarget = agent.options.provider !== undefined\n    && agent.options.provider.length > 0\n    && agent.options.model !== undefined\n    && agent.options.model.length > 0\n    ? { provider: agent.options.provider, model: agent.options.model }\n    : undefined\n  const target = configured ?? latest ?? agentTarget\n  if (target === undefined) {\n    throw new Error(\n      'no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields',\n    )\n  }\n\n  const assembler = new BlockAssembler()\n  const messages: Message[] = [\n    ...input.messages,\n    createUserMessage({\n      content: [{ type: 'text', text: COMPACTION_INSTRUCTION }],\n      source: { kind: 'plugin', plugin: 'dsh-compaction-basic' },\n    }),\n  ]\n  const options: GenerateOptions = {\n    provider: target.provider,\n    model: target.model,\n    messages,\n    ...input.system === undefined ? {} : { system: input.system },\n    ...input.tools === undefined ? {} : { tools: [...input.tools] },","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/compaction/compaction-basic/src/summarizer.ts#L122-L158","documentation":"The summarization call needs a provider/model route, resolved in order: the BasicCompactionConfig summarizationProvider/summarizationModel pair (used only when the provider is non-empty), the latest durably routed request from agent.session.requestHeader()?.config, then the AgentOptions provider+model pair (both must be non-empty). If none of the three is available, compaction cannot route its auxiliary call and throws this error.","triggerScenarios":"compactNow or automatic compaction on a brand-new session that has never routed a request, with no summarization pair configured and no agent provider/model options; setting only one of the two config fields (the pair resolves only when summarizationProvider is non-empty, so set both); constructing the agent without routing options.","commonSituations":"Automation and ACP flows that compact before the first turn; provider and model split across different config layers; renamed config keys after a version change.","solutions":["Set both summarizationProvider and summarizationModel in BasicCompactionConfig (or the matching modelPolicies entry)","Or run one normal turn first so the session's request header carries a routed target","Or set both AgentOptions provider and model on the agent used for compaction"],"exampleFix":"// before\nctx.plugin(BasicCompactionEngine)\n\n// after\nctx.plugin(BasicCompactionEngine, {\n  summarizationProvider: 'deepseek',\n  summarizationModel: 'deepseek-chat',\n})","handlingStrategy":"validation","validationCode":"function summarizationTarget(\n  config: { summarizationProvider: string; summarizationModel: string },\n  agent: { session: Session; options: { provider?: string; model?: string } },\n): { provider: string; model: string } | undefined {\n  if (config.summarizationProvider.length > 0) {\n    return { provider: config.summarizationProvider, model: config.summarizationModel }\n  }\n  const routed = agent.session.requestHeader()?.config\n  if (routed !== undefined && routed.provider.length > 0 && routed.model.length > 0) return routed\n  if (agent.options.provider !== undefined && agent.options.provider.length > 0\n    && agent.options.model !== undefined && agent.options.model.length > 0) {\n    return { provider: agent.options.provider, model: agent.options.model }\n  }\n  return undefined\n}\n// before compacting: if (summarizationTarget(config, agent) === undefined) configure a route","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set both summarizationProvider and summarizationModel together — the pair only activates when the provider is non-empty","Do not compact a session that has never routed a request unless a summarization pair is configured","Give agents explicit provider and model options in automation flows"],"tags":["compaction","configuration","provider","model-routing"],"backgroundTag":"missing-provider-config","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}