microsoft/vscode · error · CompletionsFetchError

stop_content_filter

stop_content_filter

Error message

Content filter

What it means

Error "Content filter" thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/prompts/node/codeMapper/codeMapper.ts:775

			}
		*/
		this.telemetryService.sendMSFTTelemetryEvent('speculation.response.loop', {
			speculationRequestId: result.requestId,
			languageId: isNewDocument(request) ? getLanguageForResource(uri).languageId : request.existingDocument.languageId,
			model,
			hasLoop: String(hasLoop)
		}, {
			documentLength,
			rewrittenLength: responseLength
		});
	}

	private ensureFinishReasonStopOrThrow(requestId: string, finishReason: Completion.FinishReason | undefined) {
		switch (finishReason) {
			case undefined:
				break;
			case Completion.FinishReason.ContentFilter:
				throw new CompletionsFetchError('stop_content_filter', requestId, 'Content filter');
			case Completion.FinishReason.Length:
				throw new CompletionsFetchError('stop_length', requestId, 'Length limit');
			case Completion.FinishReason.Stop:
				break; // No error for 'Stop' finish reason
			default:
				assertNever(finishReason);
		}
	}

	//#endregion
}

function readLineByLine(source: AsyncIterable<string>, token: CancellationToken): AsyncIterable<LineOfText> {
	return new AsyncIterableObject<LineOfText>(async (emitter) => {
		const reader = new PartialAsyncTextReader(source[Symbol.asyncIterator]());
		let previousLineWasEmpty = false; // avoid emitting a trailing empty line all the time
		while (!reader.endOfStream) {
			// Skip everything until we hit a fence

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/prompts/node/codeMapper/codeMapper.ts:775 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/vscode@a94b963a32 (2026-08-12). Data as JSON: /api/errors/80d9addc9ef1a062. Report an issue: GitHub.