deepseek-ai/deepseek-harness · error
tool-web: ${name} must be a positive integer
Error message
tool-web: ${name} must be a positive integer What it means
Error "tool-web: ${name} must be a positive integer" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/web/tool-web/src/index.ts:70
}
export const Config: z<Config> = z.object({
search: z.boolean().default(true),
fetch: z.boolean().default(true),
searchMaxResults: z.number().default(WEB_SEARCH_MAX_RESULTS),
searchMaxQueries: z.number().default(WEB_SEARCH_MAX_QUERIES),
fetchTimeoutMs: z.number().default(DEFAULT_WEB_TOOL_TIMEOUT_MS),
searchTimeoutMs: z.number().default(DEFAULT_WEB_TOOL_TIMEOUT_MS),
fetchMaxOutputChars: z.number().default(DEFAULT_FETCH_MAX_OUTPUT_CHARS),
})
/** Complete config after schemastery applies every field default. */
type ResolvedConfig = Required<Config>
/** Configured count, timeout, and character caps must be positive integers. */
function assertPositiveInteger(name: string, value: number): void {
if (!Number.isInteger(value) || value < 1) {
throw new Error(`tool-web: ${name} must be a positive integer`)
}
}
/**
* Register the enabled web tools. `search`/`fetch` default to true; a product
* that wants only one disables the other in config. Each tool's cooperative
* timeout budget (`fetchTimeoutMs`/`searchTimeoutMs`, default 30000) is resolved
* here and attached to the tool as `ToolDefinition.timeoutMs` for
* `@deepseek-ai/dsh-tool-call-timeout-policy` to enforce. The tools' disposers are
* fiber-scoped (the effect-based registries clean up on dispose), so no manual
* teardown is needed.
*/
export function apply(ctx: Context, config: Config): void {
// schemastery (Config) has already filled every defaulted field.
const resolved = config as ResolvedConfig
assertPositiveInteger('searchMaxResults', resolved.searchMaxResults)
assertPositiveInteger('searchMaxQueries', resolved.searchMaxQueries)
assertPositiveInteger('fetchTimeoutMs', resolved.fetchTimeoutMs)View on GitHub (pinned to b150a551b8)
Solutions
- Set the named option to a positive integer.
When it happens
Trigger: Thrown at packages/web/tool-web/src/index.ts:70 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/9f6f19bddcc1d48a.
Report an issue: GitHub.