{"record":{"id":"02a90f5697cce36d","repo":"earendil-works/pi","slug":"unable-to-resolve-model-climodel","errorCode":null,"errorMessage":"Unable to resolve model \"${cliModel}\"","messagePattern":"Unable to resolve model \"(.+?)\"","errorType":"validation","errorClass":"AuthCommandError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/auth-check.ts","lineNumber":32,"sourceCode":"\nexport interface AuthCheckResult {\n\tstatus: AuthCheckStatus;\n\tprovider: string;\n\treason?: AuthCheckReason;\n\tauthType?: \"api_key\" | \"oauth\";\n}\n\nexport async function checkProviderAuth(\n\targs: Args,\n\tmodelRuntime: ModelRuntime,\n\toptions: { refresh: boolean } = { refresh: false },\n): Promise<AuthCheckResult> {\n\tconst { provider: cliProvider, model: cliModel } = validateAuthCommandArgs(args, \"check\");\n\tlet provider = cliProvider;\n\tif (cliModel) {\n\t\tconst resolved = resolveCliModel({ cliProvider, cliModel, modelRuntime });\n\t\tif (resolved.error || !resolved.model) {\n\t\t\tthrow new AuthCommandError(resolved.error ?? `Unable to resolve model \"${cliModel}\"`);\n\t\t}\n\t\tprovider = resolved.model.provider;\n\t}\n\tif (!provider) throw new AuthCommandError(\"Unable to resolve an auth provider\");\n\tif (modelRuntime.getError()) {\n\t\treturn { status: \"invalid\", provider, reason: \"invalid_state\" };\n\t}\n\tif (!modelRuntime.getProvider(provider)) {\n\t\treturn { status: \"not_ready\", provider, reason: \"provider_not_found\" };\n\t}\n\ttry {\n\t\tconst auth = await modelRuntime.checkAuth(provider);\n\t\tif (!auth) return { status: \"not_ready\", provider, reason: \"credentials_not_configured\" };\n\t\tif (options.refresh && !(await modelRuntime.getAuth(provider))) {\n\t\t\treturn { status: \"not_ready\", provider, reason: \"credentials_not_configured\" };\n\t\t}\n\t\treturn { status: \"ready\", provider, authType: auth.type };\n\t} catch {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/cli/auth-check.ts#L14-L50","documentation":"Error \"Unable to resolve model \"${cliModel}\"\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/cli/auth-check.ts:32 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":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}