TypeChat is a library that makes it easy to build natural language interfaces using types.
This report summarizes scanner evidence for microsoft/TypeChat, a TypeScript project with 8,688 GitHub stars. SynthScan examined 21,478 lines of code across 244 source files, recording 115 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 7.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 81 finding(s).
Are imports declared and package/API names verified? 16 finding(s).
Are wrappers, guards, and repeated structures necessary? 55 finding(s).
Which changes need focused human review? 115 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 115 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 | 126 | function flattenDiagnosticMessageText(diagnostic: Diagnostic, newLine: string): string { | CODE |
| LOW | typescript/src/ts/validate.ts | 145 | function expandMissingPropertiesMessage(checker: Checker, file: SourceFile, position: number): string | undefined { | 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 |
|---|---|---|---|---|
| HIGH | python/src/typechat/_internal/model.py | 152 | except Exception: | CODE |
| HIGH | python/src/typechat/_internal/interactive.py | 26 | except ImportError: | CODE |
| 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 |