Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/vs/workbench/api/common/extHostChatAgents2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,13 @@ export class ExtHostChatAgents2 extends Disposable implements ExtHostChatAgentsS
if (!model) {
model = await this._languageModels.getDefaultLanguageModel(extension);
if (!model) {
throw new Error('Language model unavailable');
// No language model is available (e.g. the user is not signed in or no models
// have been contributed). This is an expected operational condition, not a bug,
// so mark it as a `ChatExpectedError` to keep it out of `chatAgentError` telemetry
// while still surfacing the user-facing message.
const error = new Error('Language model unavailable');
error.name = 'ChatExpectedError';
throw error;
}
}

Expand Down
Loading