deepseek-ai/deepseek-harness · error

attachment-error

attachment-error

Error message

Model "${current.model}" does not support image input.

What it means

Capability check in the api-proxy prompt path: the turn's currently bound model does not admit image content, but the submitted message contains an image part. Raised before the turn is accepted, so the caller can resend without the image or switch models.

Solutions

  1. Remove image inputs from the prompt, or switch the session to a model that supports image input.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/host/apiproxy/src/api-proxy.ts:2389 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at packages/host/apiproxy/src/api-proxy.ts:2389

          })
        }
        const resolved = await turnAgentFor<{ accepted: true }>(request, sessionId)
        if ('refused' in resolved) return resolved.refused
        const agent = resolved.agent
        // Request identity and optional browser zone ride the exact durable user message.
        const source: MessageSource = {
          kind: 'user',
          rpcId: request.rpcId,
          ...(canonicalTimeZone === undefined ? {} : { clientTimeZone: canonicalTimeZone }),
        }
        const hasImage = content.some(part => part.type === 'image')
        const admit = async (): Promise<RpcResponse<{ accepted: true }>> => {
          try {
            if (hasImage) {
              const current = selectionFor(agent).current
              const modelInfo = await ctx.llm.resolveModelInfo(current.provider, current.model)
              if (modelInfo.inputModalities !== undefined && !modelInfo.inputModalities.includes('image')) {
                return err(request, {
                  code: 'attachment-error',
                  message: `Model "${current.model}" does not support image input.`,
                  details: { reason: 'MODEL_DOES_NOT_SUPPORT_IMAGES' },
                })
              }
            }
            const durable = await durablePromptContent(ctx, content)
            const message: UserMessage = createUserMessage({ content: durable, source })
            if (mode === 'steer') agent.steer(message)
            else agent.followup(message)
          } catch (error: unknown) {
            if (error instanceof AttachmentError) {
              return err(request, {
                code: 'attachment-error',
                message: error.message,
                details: { reason: error.code },
              })
            }

View on GitHub (pinned to b150a551b8)