{"record":{"id":"5df0ca41b166e81a","repo":"vercel/ai","slug":"tool-choice-type-exhaustivecheck-5df0ca","errorCode":null,"errorMessage":"tool choice type: ${_exhaustiveCheck}","messagePattern":"tool choice type: (.+?)","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/cohere/src/cohere-prepare-tools.ts","lineNumber":91,"sourceCode":"\n    case 'none':\n      return { tools: cohereTools, toolChoice: 'NONE', toolWarnings };\n\n    case 'required':\n      return { tools: cohereTools, toolChoice: 'REQUIRED', toolWarnings };\n\n    case 'tool':\n      return {\n        tools: cohereTools.filter(\n          tool => tool.function.name === toolChoice.toolName,\n        ),\n        toolChoice: 'REQUIRED',\n        toolWarnings,\n      };\n\n    default: {\n      const _exhaustiveCheck: never = type;\n      throw new UnsupportedFunctionalityError({\n        functionality: `tool choice type: ${_exhaustiveCheck}`,\n      });\n    }\n  }\n}\n","sourceCodeStart":73,"sourceCodeEnd":97,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/cohere/src/cohere-prepare-tools.ts#L73-L97","documentation":"Error \"tool choice type: ${_exhaustiveCheck}\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/cohere/src/cohere-prepare-tools.ts:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}