deepseek-ai/deepseek-harness · error · LlmError
INVALID_PREPARED_CALL
INVALID_PREPARED_CALL
Error message
a prepared LLM call can only be dispatched once
What it means
Error "a prepared LLM call can only be dispatched once" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/llm/llm/src/index.ts:852
...config.reasoningEffort === undefined && resolvedConfig.reasoningEffort !== undefined
? { reasoningEffort: true }
: {},
...config.maxTokens === undefined && resolvedConfig.maxTokens !== undefined
? { maxTokens: true }
: {},
})
let dispatched = false
return Object.freeze({
config: resolvedConfig,
retryPolicy: registration.retryPolicy,
adapterDefaults,
...context === undefined ? {} : { context },
...modelInfo.inputModalities === undefined
? {}
: { inputModalities: Object.freeze([...modelInfo.inputModalities]) },
stream: (options: GenerateOptions): AsyncIterable<StreamChunk> => {
if (dispatched) {
throw new LlmError('a prepared LLM call can only be dispatched once', 'INVALID_PREPARED_CALL')
}
if (!callConfigEquals(options, resolvedConfig)) {
throw new LlmError(
'prepared LLM call config changed before adapter dispatch',
'INVALID_PREPARED_CALL',
)
}
dispatched = true
return this.streamWithRegistration(options, {
registration,
config: resolvedConfig,
modelInfo,
dispatch: options => adapterCall.stream(options),
})
},
})
}
View on GitHub (pinned to b150a551b8)
Solutions
- Prepare a new LLM call instead of dispatching the same prepared call twice.
When it happens
Trigger: Thrown at packages/llm/llm/src/index.ts:852 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/1abcb70978314d4d.
Report an issue: GitHub.