{"record":{"id":"9d275ebe2511125d","repo":"earendil-works/pi","slug":"no-model-selected-use-login-to-log-into-a-provi","errorCode":null,"errorMessage":"No model selected.\n\nUse /login to log into a provider via OAuth or API key. See:\n  ${getDocsPath()}/providers.md\n  ${getDocsPath()}/models.md\n\nThen use /model to select a model.","messagePattern":"No model selected\\.\n\nUse /login to log into a provider via OAuth or API key\\. See:\n  (.+?)/providers\\.md\n  (.+?)/models\\.md\n\nThen use /model to select a model\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/core/agent-session.ts","lineNumber":1198,"sourceCode":"\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (options.streamingBehavior === \"followUp\") {\n\t\t\t\t\tawait this._queueFollowUp(expandedText, currentImages);\n\t\t\t\t} else {\n\t\t\t\t\tawait this._queueSteer(expandedText, currentImages);\n\t\t\t\t}\n\t\t\t\tpreflightResult?.(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Flush any pending bash messages before the new prompt\n\t\t\tthis._flushPendingBashMessages();\n\n\t\t\t// Validate model\n\t\t\tif (!this.model) {\n\t\t\t\tthrow new Error(formatNoModelSelectedMessage());\n\t\t\t}\n\n\t\t\tconst hasConfiguredAuth =\n\t\t\t\tthis._modelRuntime.hasConfiguredAuth(this.model.provider) ||\n\t\t\t\t(await this._modelRuntime.checkAuth(this.model.provider)) !== undefined;\n\t\t\tif (!hasConfiguredAuth) {\n\t\t\t\tconst isOAuth = this._modelRuntime.isUsingOAuth(this.model.provider);\n\t\t\t\tif (isOAuth) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Authentication failed for \"${this.model.provider}\". ` +\n\t\t\t\t\t\t\t`Credentials may have expired or network is unavailable. ` +\n\t\t\t\t\t\t\t`Run '/login ${this.model.provider}' to re-authenticate.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthrow new Error(formatNoApiKeyFoundMessage(this.model.provider));\n\t\t\t}\n\n\t\t\t// Check if we need to compact before sending (catches aborted responses).","sourceCodeStart":1180,"sourceCodeEnd":1216,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/core/agent-session.ts#L1180-L1216","documentation":"Error \"No model selected.\n\nUse /login to log into a provider via OAuth or API key. See:\n  ${getDocsPath()}/providers.md\n  ${getDocsPath()}/models.md\n\nThen use /model to select a model.\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/core/agent-session.ts:1198 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"}