{"record":{"id":"8f781f1e5dc0766c","repo":"deepseek-ai/deepseek-harness","slug":"web-duplicate-provider","errorCode":"WEB_DUPLICATE_PROVIDER","errorMessage":"a web provider with id \"${provider.id}\" is already registered","messagePattern":"a web provider with id \"(.+?)\" is already registered","errorType":"exception","errorClass":"WebError","httpStatus":null,"severity":"error","filePath":"packages/web/web/src/index.ts","lineNumber":120,"sourceCode":"   */\n  registerSearchProvider(provider: WebSearchProvider): () => void {\n    return this.registerProvider(this.searchProviders, provider)\n  }\n\n  /**\n   * Register a fetch provider. Throws {@link WebError} `WEB_DUPLICATE_PROVIDER`\n   * if its id is already registered for fetch. Returns a disposer; disposed\n   * with the calling fiber.\n   * @param provider - the provider; its `id` is the registry key.\n   * @returns the disposer that unregisters the provider.\n   */\n  registerFetchProvider(provider: WebFetchProvider): () => void {\n    return this.registerProvider(this.fetchProviders, provider)\n  }\n\n  private registerProvider<P extends { readonly id: string }>(store: Map<string, P>, provider: P): () => void {\n    if (store.has(provider.id)) {\n      throw new WebError(`a web provider with id \"${provider.id}\" is already registered`, 'WEB_DUPLICATE_PROVIDER')\n    }\n    const dispose = this.ctx.effect(function* () {\n      store.set(provider.id, provider)\n      yield () => store.delete(provider.id)\n    }, 'web.registerProvider()')\n    // ctx.effect's disposer returns Promise<void>; our disposer API is\n    // synchronous fire-and-forget — discard the (always-resolved) promise.\n    return () => void dispose()\n  }\n\n  /**\n   * Run one search through the selected provider. Resolves the provider at call\n   * time with the selection rules above; throws {@link WebError} when the\n   * capability cannot run. The seam enforces `request.maxResults` on the result:\n   * if the provider over-returns, `sources[]` is truncated and `truncated` set.\n   * @param request - the query and optional result limit.\n   * @param signal - optional cancellation signal forwarded to the provider.\n   * @returns the provider's results, capped to `request.maxResults`.","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/web/src/index.ts#L102-L138","documentation":"Error \"a web provider with id \"${provider.id}\" is already registered\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/web/src/index.ts:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pick a unique id for the provider you are registering, or remove the earlier registration of the same id from your cordis.yml composition.","If the replacement is intentional, unregister the existing provider first and then register the new one."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}