{"record":{"id":"aa3179bf8af30338","repo":"deepseek-ai/deepseek-harness","slug":"model-discovery-failed","errorCode":"model-discovery-failed","errorMessage":"error instanceof Error ? error.message : String(error)","messagePattern":"error instanceof Error \\? error\\.message : String\\(error\\)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/host/apiproxy/src/api-proxy.ts","lineNumber":3318,"sourceCode":"      },\n\n      async discoverModels(request, signal) {\n        const { settingsNs, provider, baseURL, api, apiKey } = request.payload\n        try {\n          const models = await ctx.llm.discoverModels(settingsNs, {\n            ...provider === undefined ? {} : { provider },\n            ...baseURL === undefined ? {} : { baseURL },\n            ...api === undefined ? {} : { api },\n            ...apiKey === undefined ? {} : { apiKey },\n            ...signal === undefined ? {} : { signal },\n          })\n          return ok(request, { models })\n        } catch (error: unknown) {\n          // Every failure here is the user's next move, not a transport fault:\n          // a wrong endpoint, a rejected key, or a protocol with no listing all\n          // end at the same place — fill the models in by hand. The details\n          // repeat only what the caller already sent, never the credential.\n          return err(request, {\n            code: 'model-discovery-failed',\n            message: error instanceof Error ? error.message : String(error),\n            details: { settingsNs, ...baseURL === undefined ? {} : { baseURL } },\n          })\n        }\n      },\n    },\n\n    events: {\n      mux(_request, signal) {\n        const queue = new FrameQueue<RpcRequest<MuxFrame>>()\n        muxQueues.add(queue)\n        for (const session of ctx.sessions.list()) {\n          subscribeSession(queue, session)\n        }\n        for (const pending of pendingQuestions.values()) {\n          queue.push({\n            rpcId: pending.rpcId,","sourceCodeStart":3300,"sourceCodeEnd":3336,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/host/apiproxy/src/api-proxy.ts#L3300-L3336","documentation":"Error \"error instanceof Error ? error.message : String(error)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/host/apiproxy/src/api-proxy.ts:3318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the forwarded error message in the response or logs and fix the underlying failure it names."],"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"}