TypeChat is a library that makes it easy to build natural language interfaces using types.
This report presents the forensic synthetic code analysis of microsoft/TypeChat, a TypeScript project with 8,676 GitHub stars. SynthScan v2.0 examined 21,365 lines of code across 244 source files, recording 113 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 6.9 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 113 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | python/tests/test_translator.py | 41 | def test_translator_with_immediate_pass(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_translator.py | 50 | def test_translator_with_single_failure(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_translator.py | 60 | def test_translator_with_invalid_json(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_translator.py | 70 | def test_translator_with_single_failure_and_str_preamble(snapshot: Any): | CODE |
| LOW | python/tests/test_model.py | 35 | def test_reads_response_within_size_limit(): | CODE |
| LOW | python/tests/test_model.py | 45 | def test_rejects_oversized_response_via_content_length(): | CODE |
| LOW | python/tests/test_model.py | 57 | def test_rejects_oversized_streamed_response_without_content_length(): | CODE |
| LOW | python/tests/test_model.py | 73 | def test_size_limit_disabled_allows_large_response(): | CODE |
| LOW | python/tests/test_abstract_collections.py | 26 | def test_abstract_collections(snapshot: Any): | CODE |
| LOW | python/tests/test_validator.py | 13 | def test_dict_valid_as_dataclass(): | CODE |
| LOW | python/examples/music/client.py | 96 | def get_tracks_from_result_list(resultItems: list[Any]) -> list[SimplifiedTrackInfo]: | CODE |
| LOW | python/examples/music/client.py | 149 | def update_track_list_and_print(tracks: list[SimplifiedTrackInfo], context: ClientContext): | CODE |
| LOW | python/examples/music/client.py | 154 | async def get_current_users_playlists(context: ClientContext) -> list[SimplifiedPlaylistInfo]: | CODE |
| LOW | python/examples/music/spotipyWrapper.py | 110 | async def current_user_unfollow_playlist(self, playlist_id: str) -> None: | CODE |
| LOW | python/examples/multiSchema/agents.py | 55 | async def _handle_json_program_call(self, func: str, args: Sequence[object]) -> int | float: | CODE |
| LOW | python/src/typechat/_internal/model.py | 193 | def create_openai_language_model(api_key: str, model: str, endpoint: str = "https://api.openai.com/v1/chat/completions", | CODE |
| LOW | python/src/typechat/_internal/model.py | 212 | def create_azure_openai_language_model(api_key: str, endpoint: str) -> HttpxLanguageModel: | CODE |
| LOW | python/src/typechat/_internal/ts_conversion/__init__.py | 23 | def python_type_to_typescript_schema(py_type: type | TypeAliasType) -> TypeScriptSchemaConversionResult: | CODE |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 156 | def python_type_to_typescript_nodes(root_py_type: object) -> TypeScriptNodeTranslationResult: | CODE |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 175 | def convert_to_type_reference_node(py_type: TypeReferenceTarget) -> TypeNode: | CODE |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 193 | def generic_alias_to_type_reference(py_type: GenericAliasish) -> TypeReferenceNode: | CODE |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 200 | def convert_literal_type_arg_to_type_node(py_type: object) -> TypeNode: | CODE |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 420 | def attribute_identical_in_all_bases(attr_name: str, type_hint: object, base_attributes: dict[str, set[object]]) -> | CODE |
| LOW | typescript/examples/crossword/src/translator.ts | 56 | function getScreenshotPromptSection(screenshot: string | undefined) { | CODE |
| LOW | typescript/src/model.ts | 192 | export function createOpenAILanguageModel(apiKey: string, model: string, endPoint = "https://api.openai.com/v1/chat/comp | CODE |
| LOW | typescript/src/model.ts | 213 | export function createAzureOpenAILanguageModel(apiKey: string, endPoint: string, options?: LanguageModelOptions): TypeCh | CODE |
| LOW | typescript/src/model.ts | 333 | function createResponsesFetchLanguageModel(url: string, headers: object, defaultParams: object, proxy?: ProxySettings) { | CODE |
| LOW | typescript/src/model.ts | 601 | function missingEnvironmentVariable(name: string): never { | CODE |
| LOW | typescript/src/zod/validate.ts | 219 | function appendUnionOrIntersectionTypes(types: readonly z.ZodType[], minPrecedence: TypePrecedence) { | CODE |
| LOW | typescript/src/ts/program.ts | 99 | export function createModuleTextFromProgram(jsonObject: object): Result<string> { | CODE |
| LOW | typescript/src/ts/validate.ts | 82 | function expandMissingPropertiesMessage(checker: ts.TypeChecker, file: ts.SourceFile, position: number): string | un | CODE |
| LOW | typescript/src/ts/validate.ts | 112 | function createProgramFromModuleText(moduleText: string, oldProgram?: ts.Program) { | CODE |
| LOW | site/src/docs/python/basic-usage.md | 72 | def create_openai_language_model( | CODE |
| LOW | site/src/docs/python/basic-usage.md | 80 | def create_azure_openai_language_model(api_key: str, endpoint: str): ... | CODE |
| LOW | site/src/docs/typescript/basic-usage.md | 71 | export function createOpenAILanguageModel(apiKey: string, model: string, endPoint? string): TypeChatLanguageModel; | CODE |
| LOW | site/src/docs/typescript/basic-usage.md | 73 | export function createAzureOpenAILanguageModel(apiKey: string, endPoint: string): TypeChatLanguageModel; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/examples/healthData/input.txt | 8 | # ================ | COMMENT |
| MEDIUM | python/examples/healthData/input.txt | 10 | # ================ | COMMENT |
| MEDIUM | typescript/examples/healthData/src/input.txt | 8 | # ================ | COMMENT |
| MEDIUM | typescript/examples/healthData/src/input.txt | 10 | # ================ | COMMENT |
| MEDIUM | .github/workflows/fix-dependabot-alerts.yml | 125 | # ── Final clean build verification ────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/fix-dependabot-alerts.yml | 150 | # ── Create PR ─────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/music/client.py | 186 | CODE | |
| LOW | python/examples/music/demo.py | 10 | CODE | |
| LOW | python/examples/music/demo.py | 17 | CODE | |
| LOW | python/examples/restaurant/demo.py | 8 | CODE | |
| LOW | python/examples/restaurant/demo.py | 14 | CODE | |
| LOW | python/examples/drawing/demo.py | 20 | CODE | |
| LOW | python/examples/drawing/demo.py | 35 | CODE | |
| LOW | python/examples/coffeeShop/demo.py | 10 | CODE | |
| LOW | python/examples/coffeeShop/demo.py | 17 | CODE | |
| LOW | python/examples/calendar/demo.py | 9 | CODE | |
| LOW | python/examples/calendar/demo.py | 15 | CODE | |
| LOW | python/src/typechat/_internal/interactive.py | 3 | CODE | |
| LOW | python/src/typechat/_internal/translator.py | 52 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 156 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 211 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 296 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 345 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/README.md | 22 | ## Step 1: Configure your development environment | COMMENT |
| LOW | python/examples/README.md | 76 | ## Step 2: Configure environment variables | COMMENT |
| LOW | python/examples/README.md | 107 | ## Step 3: Run the examples | COMMENT |
| LOW | typescript/examples/README.md | 21 | ## Step 1: Configure your development environment | COMMENT |
| LOW | typescript/examples/README.md | 56 | ## Step 2: Build TypeChat Samples | COMMENT |
| LOW | typescript/examples/README.md | 64 | ## Step 3: Configure environment variables | COMMENT |
| LOW | typescript/examples/README.md | 114 | ## Step 4: Run the examples | COMMENT |
| LOW | site/src/docs/examples.md | 23 | ## Step 1: Configure development environment | COMMENT |
| LOW | site/src/docs/examples.md | 58 | ## Step 2: Build TypeChat Examples | COMMENT |
| LOW | site/src/docs/examples.md | 66 | ## Step 3: Configure environment variables | COMMENT |
| LOW | site/src/docs/examples.md | 95 | ## Step 4: Run the examples | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/math/program.py | 1 | CODE | |
| LOW | python/src/typechat/__init__.py | 5 | CODE | |
| LOW | python/src/typechat/__init__.py | 5 | CODE | |
| LOW | python/src/typechat/__init__.py | 5 | CODE | |
| LOW | python/src/typechat/__init__.py | 5 | CODE | |
| LOW | python/src/typechat/__init__.py | 5 | CODE | |
| LOW | python/src/typechat/__init__.py | 6 | CODE | |
| LOW | python/src/typechat/__init__.py | 6 | CODE | |
| LOW | python/src/typechat/__init__.py | 6 | CODE | |
| LOW | python/src/typechat/__init__.py | 7 | CODE | |
| LOW | python/src/typechat/__init__.py | 8 | CODE | |
| LOW | python/src/typechat/__init__.py | 9 | CODE | |
| LOW | python/src/typechat/__init__.py | 10 | CODE | |
| LOW | python/src/typechat/_internal/interactive.py | 25 | CODE | |
| LOW | …/src/typechat/_internal/ts_conversion/ts_type_nodes.py | 1 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/examples/math/program.py | 0 | the following is the user request translated into a json object with 2 spaces of indentation and no properties with the | STRING |
| HIGH | python/examples/healthData/translator.py | 0 | the following is the user request translated into a json object with 2 spaces of indentation and no properties with the | STRING |
| HIGH | python/src/typechat/_internal/translator.py | 0 | the following is the user request translated into a json object with 2 spaces of indentation and no properties with the | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/tests/__init__.py | 1 | # SPDX-FileCopyrightText: Microsoft Corporation | COMMENT |
| LOW | …pshots__/test_tuple_errors_1/test_tuples_2.schema.d.ts | 1 | // Entry point is: 'TupleContainer' | COMMENT |
| LOW | python/examples/healthData/input.txt | 1 | # | COMMENT |
| LOW | python/src/typechat/__about__.py | 1 | # SPDX-FileCopyrightText: Microsoft Corporation | COMMENT |
| LOW | typescript/examples/music/src/chatifyActionsSchema.ts | 21 | // show now playing | COMMENT |
| LOW | typescript/examples/music/src/chatifyActionsSchema.ts | 41 | setVolume(newVolumeLevel: number): void; | COMMENT |
| LOW | typescript/examples/healthData/src/input.txt | 1 | # | COMMENT |
| LOW | .github/dependabot.yml | 1 | # Dependabot configuration for microsoft/TypeChat. | COMMENT |
| LOW | .github/workflows/fix-dependabot-alerts.yml | 1 | # Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | .github/workflows/fix-dependabot-alerts.yml | 121 | # cache key. The restore step uses a shared prefix so any | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/music/demo.py | 27 | except Exception as error: | CODE |
| LOW | python/examples/multiSchema/agents.py | 123 | except Exception as error: | CODE |
| LOW | python/src/typechat/_internal/model.py | 107 | except Exception as e: | CODE |
| LOW | python/src/typechat/_internal/model.py | 152 | except Exception: | CODE |
| MEDIUM | python/src/typechat/_internal/model.py | 149 | def __del__(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/tests/test_dataclasses.py | 25 | def do_something(self): | CODE |
| LOW | python/examples/multiSchema/agents.py | 37 | async def handle_request(self, line: str): | CODE |
| LOW | python/examples/multiSchema/agents.py | 80 | async def handle_request(self, line: str): | CODE |
| LOW | python/examples/multiSchema/agents.py | 108 | async def handle_request(self, line: str): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/fix-dependabot-alerts.yml | 244 | # Create the new PR FIRST, capture its number, THEN close | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/src/typechat/__init__.py | 12 | __all__ = [ | CODE |
| LOW | python/src/typechat/_internal/ts_conversion/__init__.py | 7 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/math/program.py | 108 | # For now, we just pass in `Any` in place of `JsonProgram`. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/examples/music/client.py | 68 | CODE |