{"record":{"id":"50d65953806ff56c","repo":"vercel/ai","slug":"tool-choice-type-exhaustivecheck","errorCode":null,"errorMessage":"tool choice type: ${_exhaustiveCheck}","messagePattern":"tool choice type: (.+?)","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/anthropic/src/anthropic-prepare-tools.ts","lineNumber":440,"sourceCode":"        betas,\n      };\n    case 'none':\n      // Anthropic does not support 'none' tool choice, so we remove the tools:\n      return { tools: undefined, toolChoice: undefined, toolWarnings, betas };\n    case 'tool':\n      return {\n        tools: anthropicTools,\n        toolChoice: {\n          type: 'tool',\n          name: toolChoice.toolName,\n          disable_parallel_tool_use: disableParallelToolUse,\n        },\n        toolWarnings,\n        betas,\n      };\n    default: {\n      const _exhaustiveCheck: never = type;\n      throw new UnsupportedFunctionalityError({\n        functionality: `tool choice type: ${_exhaustiveCheck}`,\n      });\n    }\n  }\n}\n","sourceCodeStart":422,"sourceCodeEnd":446,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/anthropic/src/anthropic-prepare-tools.ts#L422-L446","documentation":"Error \"tool choice type: ${_exhaustiveCheck}\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/anthropic/src/anthropic-prepare-tools.ts:440 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"}