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,691 GitHub stars. SynthScan examined 32,037 lines of code across 278 source files, recording 174 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 7.1 (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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 138 finding(s).
Are imports declared and package/API names verified? 18 finding(s).
Are wrappers, guards, and repeated structures necessary? 106 finding(s).
Which changes need focused human review? 174 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 174 distinct pattern matches across 17 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 | 42 | def test_translator_with_immediate_pass(snapshot: Any): | CODE |
| LOW | python/tests/test_translator.py | 58 | def test_translator_with_variadic_tuple_unions(): | CODE |
| LOW⚡ | python/tests/test_translator.py | 71 | def test_translator_with_single_failure(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_translator.py | 81 | def test_translator_with_invalid_json(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_translator.py | 91 | def test_translator_with_single_failure_and_str_preamble(snapshot: Any): | CODE |
| LOW | python/tests/test_translator.py | 126 | def test_translator_with_newtype(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_sentiment_non_interactive.py | 30 | def test_classify_returns_validated_sentiment(sentiment: str) -> None: | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 41 | def test_classify_reuses_translator_for_independent_requests() -> None: | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 62 | def test_classify_repairs_invalid_sentiment() -> None: | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 70 | def test_classify_surfaces_model_failure(monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 88 | def test_main_closes_model_and_reports_result( | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 133 | def test_script_requires_text(capsys: pytest.CaptureFixture[str], monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | python/tests/test_sentiment_non_interactive.py | 142 | def test_quickstart_matches_runnable_example() -> None: | CODE |
| LOW | python/tests/test_create_language_model.py | 9 | def test_openai_organization_is_sent_as_organization_header(): | CODE |
| LOW | python/tests/test_create_language_model.py | 20 | def test_openai_org_is_still_sent_as_organization_header(): | CODE |
| LOW | python/tests/test_create_language_model.py | 31 | def test_openai_organization_takes_precedence_over_openai_org(): | CODE |
| LOW⚡ | python/tests/test_inline_comments.py | 83 | def test_typeddict_inline_comments(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_inline_comments.py | 87 | def test_doc_takes_priority_over_inline(snapshot: Any): | CODE |
| LOW⚡ | python/tests/test_inline_comments.py | 91 | def test_dataclass_inline_comments(snapshot: Any): | CODE |
| LOW | python/tests/test_inline_comments.py | 125 | def test_hashes_in_types_and_defaults_are_not_comments(py_type: type, expected: str): | STRING |
| LOW | python/tests/test_inline_comments.py | 129 | def test_explicit_documentation_takes_precedence_even_when_empty(): | STRING |
| LOW | python/tests/test_inline_comments.py | 140 | def test_nested_class_comments_do_not_leak_into_the_outer_class(): | STRING |
| LOW | python/tests/test_inline_comments.py | 150 | def test_nested_classes_can_be_translated_independently(): | STRING |
| LOW | python/tests/test_inline_comments.py | 161 | def test_nested_dataclass_multiline_default_without_comments(): | STRING |
| LOW | python/tests/test_inline_comments.py | 175 | def test_nested_dataclass_multiline_default_preserves_comment_coordinates(): | STRING |
| LOW | python/tests/test_inline_comments.py | 193 | def test_nested_typeddict_multiline_literal_preserves_comment_coordinates(): | STRING |
| LOW | python/tests/test_inline_comments.py | 207 | def test_nested_class_multiline_docstring_preserves_documentation(): | STRING |
| LOW | python/tests/test_inline_comments.py | 226 | def test_unavailable_source_preserves_types_and_explicit_documentation( | STRING |
| LOW | python/tests/test_inline_comments.py | 245 | def test_dynamically_created_types_remain_supported(py_type: type): | STRING |
| LOW | python/tests/test_inline_comments.py | 254 | def test_unexpected_source_lookup_failures_are_not_silenced(monkeypatch: pytest.MonkeyPatch): | STRING |
| LOW | python/tests/test_inline_comments.py | 268 | def test_invalid_source_is_reported_as_a_conversion_error(monkeypatch: pytest.MonkeyPatch, source: str): | STRING |
| LOW | python/tests/test_inline_comments.py | 347 | def test_only_trailing_field_comments_are_attached( | STRING |
| LOW | python/tests/test_inline_comments.py | 359 | def test_inline_comments_do_not_hide_unsupported_schema_types(): | STRING |
| 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/tests/test_failure.py | 71 | def test_message_only_failure_has_no_value(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 80 | def test_failure_retains_explicit_values(value: object): | CODE |
| LOW⚡ | python/tests/test_failure.py | 90 | def test_validator_retains_the_entire_rejected_value(value: object): | CODE |
| LOW⚡ | python/tests/test_failure.py | 98 | def test_translator_preserves_success(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 105 | def test_translator_retains_rejected_data_without_repair(): | CODE |
| LOW | python/tests/test_failure.py | 118 | def test_translator_preserves_custom_failure_payloads(value: object): | CODE |
| LOW | python/tests/test_failure.py | 130 | def test_translator_does_not_mutate_custom_message_only_failures(): | CODE |
| LOW | python/tests/test_failure.py | 142 | def test_translator_preserves_failure_subclasses_and_metadata(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 154 | def test_translator_retains_unparseable_text_without_inventing_data(response_text: str): | CODE |
| LOW⚡ | python/tests/test_failure.py | 163 | def test_translator_propagates_initial_model_failures_unchanged(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 169 | def test_translator_preserves_successful_repair(): | CODE |
| LOW | python/tests/test_failure.py | 180 | def test_translator_returns_latest_rejected_candidate_after_one_repair(): | CODE |
| LOW | python/tests/test_failure.py | 191 | def test_translator_retains_previous_candidate_when_repair_request_fails(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 205 | def test_translator_preserves_context_supplied_by_the_model(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 211 | def test_translator_preserves_model_failure_subclasses(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 221 | def test_translator_does_not_leak_failure_context_into_another_translation(): | CODE |
| LOW⚡ | python/tests/test_failure.py | 229 | def test_translator_retains_previous_candidate_when_repair_cannot_be_parsed(response_text: str): | CODE |
| LOW | python/tests/test_failure.py | 240 | def test_python_still_repairs_unparseable_output(response_text: str): | CODE |
| LOW | python/tests/test_newtype.py | 17 | def test_newtype_uses_underlying_type(): | CODE |
| LOW | python/tests/test_newtype.py | 52 | def test_newtype_unsupported_underlying_type_reports_error(): | CODE |
| LOW | python/examples/music/client.py | 96 | def get_tracks_from_result_list(resultItems: list[Any]) -> list[SimplifiedTrackInfo]: | CODE |
| 27 more matches not shown… | ||||
| 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 | 53 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 170 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 212 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 267 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 363 | CODE | |
| LOW | …hat/_internal/ts_conversion/python_type_to_ts_nodes.py | 412 | 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/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 | 116 | ## Step 4: Run the examples | COMMENT |
| LOW | site/src/docs/examples.md | 25 | ## Step 1: Configure development environment | COMMENT |
| LOW | site/src/docs/examples.md | 60 | ## Step 2: Build TypeChat Examples | COMMENT |
| LOW | site/src/docs/examples.md | 68 | ## Step 3: Configure environment variables | COMMENT |
| LOW | site/src/docs/examples.md | 104 | ## 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/backlog-assessment.lock.yml | 1 | # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"be7b78f65a99cbb8ab1f33adf5694cdefca9343f5b2ad21783eeefdf0bd | COMMENT |
| LOW | .github/workflows/backlog-assessment.lock.yml | 21 | # - GH_AW_DEFAULT_OTLP_ENDPOINT | COMMENT |
| LOW | .github/workflows/discussion-draft.lock.yml | 1 | # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"7c8380b1ffb86eb153eb973bf694b44f1f4e8549320f86794635467636b | COMMENT |
| LOW | .github/workflows/discussion-draft.lock.yml | 21 | # - GH_AW_GITHUB_TOKEN | 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 |
|---|---|---|---|---|
| HIGH | python/tests/test_translator.py | 60 | '{"values": [1, "two"], "optional_values": ["three", null], "choices": ["yes", "no"]}', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | site/src/docs/python/non-interactive.md | 24 | OPENAI_API_KEY=your-api-key | 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 |
|---|---|---|---|---|
| MEDIUM | AUTOMATION.md | 160 | [GitHub Agentic Workflows](https://docs.github.com/en/copilot/concepts/agent-capabilities/agent-powered-workflows-and-op | CODE |
| 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 |