{"record":{"id":"020cad3b092a1490","repo":"chatboxai/chatbox","slug":"json-stringify-json-020cad","errorCode":null,"errorMessage":"JSON.stringify(json)","messagePattern":"JSON\\.stringify\\(json\\)","errorType":"http","errorClass":"ApiError","httpStatus":null,"severity":"error","filePath":"src/shared/providers/definitions/models/deepseek.ts","lineNumber":93,"sourceCode":"    if (isDeepSeekWeakToolUse(this.options.model.modelId, scope)) return false\n    return super.isSupportToolUse()\n  }\n\n  isSupportReasoning() {\n    return isDeepSeekReasoningModel(this.options.model.modelId)\n  }\n\n  async listModels(): Promise<ProviderModelInfo[]> {\n    const res = await this.dependencies.request.apiRequest({\n      url: 'https://api.deepseek.com/models',\n      method: 'GET',\n      headers: {\n        Authorization: `Bearer ${this.options.apiKey}`,\n      },\n    })\n    const json = await res.json()\n    if (!json.data) {\n      throw new ApiError(JSON.stringify(json))\n    }\n    return json.data\n      .map((m: { id: string; owned_by?: string }) => ({\n        modelId: m.id,\n        type: 'chat' as const,\n      }))\n      .sort((a: ProviderModelInfo, b: ProviderModelInfo) => a.modelId.localeCompare(b.modelId))\n  }\n}\n","sourceCodeStart":75,"sourceCodeEnd":103,"githubUrl":"https://github.com/chatboxai/chatbox/blob/81571269addb6bafb589a920b2883f1e1e084fd1/src/shared/providers/definitions/models/deepseek.ts#L75-L103","documentation":"Error \"JSON.stringify(json)\" thrown in chatboxai/chatbox.","triggerScenarios":"Thrown at src/shared/providers/definitions/models/deepseek.ts:93 when the library encounters an invalid state.","commonSituations":"Occurs in src/shared/providers/definitions/models/deepseek.ts when the DeepSeek API returns an error response whose JSON body is thrown as an ApiError.","solutions":["Verify the DeepSeek API key is valid and has not been revoked.","Check network connectivity to https://api.deepseek.com.","Read the stringified response body for the upstream error detail (e.g. insufficient balance, invalid key)."],"exampleFix":"const json = await res.json()\nif (!json.data) {\n  console.error('DeepSeek listModels error:', json)\n}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"81571269addb6bafb589a920b2883f1e1e084fd1","analyzedAt":"2026-08-12T21:51:44.981Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}