deepseek-ai/deepseek-harness · error · Error

no provider/model available for summarization: set both Basi

Error message

no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields

What it means

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.

Source

Thrown at packages/compaction/compaction-basic/src/summarizer.ts:140

  ctx: Context,
  config: SummaryConfig,
  input: SummarizationInput,
  agent: Agent,
  signal?: AbortSignal,
): Promise<SummaryResult> {
  const latest = agent.session.requestHeader()?.config
  const configured = config.summarizationProvider.length === 0
    ? undefined
    : { provider: config.summarizationProvider, model: config.summarizationModel }
  const agentTarget = agent.options.provider !== undefined
    && agent.options.provider.length > 0
    && agent.options.model !== undefined
    && agent.options.model.length > 0
    ? { provider: agent.options.provider, model: agent.options.model }
    : undefined
  const target = configured ?? latest ?? agentTarget
  if (target === undefined) {
    throw new Error(
      'no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields',
    )
  }

  const assembler = new BlockAssembler()
  const messages: Message[] = [
    ...input.messages,
    createUserMessage({
      content: [{ type: 'text', text: COMPACTION_INSTRUCTION }],
      source: { kind: 'plugin', plugin: 'dsh-compaction-basic' },
    }),
  ]
  const options: GenerateOptions = {
    provider: target.provider,
    model: target.model,
    messages,
    ...input.system === undefined ? {} : { system: input.system },
    ...input.tools === undefined ? {} : { tools: [...input.tools] },

View on GitHub (pinned to b150a551b8)

Solutions

  1. Set both summarizationProvider and summarizationModel in BasicCompactionConfig (or the matching modelPolicies entry)
  2. Or run one normal turn first so the session's request header carries a routed target
  3. Or set both AgentOptions provider and model on the agent used for compaction

Example fix

// before
ctx.plugin(BasicCompactionEngine)

// after
ctx.plugin(BasicCompactionEngine, {
  summarizationProvider: 'deepseek',
  summarizationModel: 'deepseek-chat',
})
Defensive patterns

Strategy: validation

Validate before calling

function summarizationTarget(
  config: { summarizationProvider: string; summarizationModel: string },
  agent: { session: Session; options: { provider?: string; model?: string } },
): { provider: string; model: string } | undefined {
  if (config.summarizationProvider.length > 0) {
    return { provider: config.summarizationProvider, model: config.summarizationModel }
  }
  const routed = agent.session.requestHeader()?.config
  if (routed !== undefined && routed.provider.length > 0 && routed.model.length > 0) return routed
  if (agent.options.provider !== undefined && agent.options.provider.length > 0
    && agent.options.model !== undefined && agent.options.model.length > 0) {
    return { provider: agent.options.provider, model: agent.options.model }
  }
  return undefined
}
// before compacting: if (summarizationTarget(config, agent) === undefined) configure a route

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/a44b60fe2ad1a846. Report an issue: GitHub.