LiteRT-LM is Google's production-ready, high-performance, open-source inference framework for deploying Large Language Models on edge devices.
This report presents the forensic synthetic code analysis of google-ai-edge/LiteRT-LM, a C++ project with 5,888 GitHub stars. SynthScan v2.0 examined 81,660 lines of code across 445 source files, recording 1207 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 20.1 places this repository in the Moderate 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 1207 distinct pattern matches across 16 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 | CMakeLists.txt | 1 | # Copyright 2026 Google LLC. | COMMENT |
| LOW | __init__.py | 1 | # Copyright 2025 The ODML Authors. | COMMENT |
| LOW | Package.swift | 1 | // swift-tools-version: 5.9 | COMMENT |
| LOW | tools/pytest/conftest.py | 1 | # Copyright 2026 Google LLC. | COMMENT |
| LOW | tools/pytest/utils.py | 1 | # Copyright 2026 Google LLC. | COMMENT |
| LOW | tools/pytest/test_e2e_sanity_checks.py | 1 | # Copyright 2026 Google LLC. | COMMENT |
| LOW | cmake/packages/litert_lm/CMakeLists.txt | 1 | # Copyright 2026 Google LLC. | COMMENT |
| LOW | python/litert_lm/interfaces.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/messages_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/verify_api.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/_ffi.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/benchmark.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/conversation.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/tools.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/session.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/engine_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/__init__.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/tool_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/_messages.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/engine.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/utils.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/bundle_pypi_package.sh | 1 | #!/bin/bash | COMMENT |
| LOW | python/litert_lm/examples/simple_main.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/examples/multimodal_main.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm/examples/tool_main.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/utils_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/__init__.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/utils.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/litert_lm_eval_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/litert_lm_eval.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_eval/runners/__init__.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | …lm_eval/runners/lm_eval_runner/litert_lm_model_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | …thon/litert_lm_eval/runners/lm_eval_runner/__init__.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/model_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/config.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/help_formatter.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/common_test.py | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); | COMMENT |
| LOW | python/litert_lm_cli/venv_manager_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/cli_helpers.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/model.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/venv_manager.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/common.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/cli_helpers_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/huggingface_download_test.py | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); | COMMENT |
| LOW | python/litert_lm_cli/huggingface_download.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/main_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/main.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/help_formatter_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/config_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/delete.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/import.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/run.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/benchmark.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/list.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/rename.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/convert.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/serve_test.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/__init__.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| LOW | python/litert_lm_cli/commands/serve.py | 1 | # Copyright 2026 The ODML Authors. | COMMENT |
| 525 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | runtime/core/CMakeLists.txt | 18 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 20 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 55 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 57 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 91 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 93 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 113 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 115 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 159 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 161 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 189 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 191 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 230 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 232 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 270 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/core/CMakeLists.txt | 272 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 18 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 20 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 45 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 47 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 62 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 64 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 82 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 84 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 99 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 101 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 127 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 129 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 158 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 160 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 177 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 179 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 201 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 203 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 224 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 226 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 248 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 250 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 265 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 267 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 284 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 286 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 307 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 309 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 329 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 331 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 348 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 350 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 369 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 371 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 392 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 394 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 415 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 417 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 436 | # ============================================================================== | COMMENT |
| MEDIUM | runtime/util/CMakeLists.txt | 438 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | runtime/framework/CMakeLists.txt | 18 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | runtime/framework/CMakeLists.txt | 20 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | runtime/framework/CMakeLists.txt | 30 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | runtime/framework/CMakeLists.txt | 32 | # ============================================================================== | COMMENT |
| 148 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm/messages_test.py | 77 | def test_tool_response_content(self): | CODE |
| LOW | python/litert_lm/messages_test.py | 112 | def test_contents_of_sequence(self): | CODE |
| LOW | python/litert_lm/messages_test.py | 176 | def test_message_with_tool_calls(self): | CODE |
| LOW | python/litert_lm/messages_test.py | 195 | def test_message_with_channels(self): | CODE |
| LOW | python/litert_lm/tools.py | 28 | def _parse_param_descriptions(docstring: str) -> dict[str, str]: | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 373 | def test_engine_abc_inheritance(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 377 | def test_engine_tokenization_api(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 387 | def test_engine_special_token_metadata(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 401 | def test_conversation_abc_inheritance(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 408 | def test_create_conversation_with_messages(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 416 | def test_create_conversation_with_message_objects(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 440 | def test_create_conversation_with_max_output_tokens_async(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 450 | def test_conversation_send_message_object(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 459 | def test_conversation_send_contents_object(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 468 | def test_conversation_send_dict_message(self): | CODE |
| LOW⚡ | python/litert_lm/engine_test.py | 477 | def test_conversation_with_thinking_config(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 72 | def test_backend_cpu_equality(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 88 | def test_engine_init_with_cpu_thread_counts(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 123 | def test_engine_init_with_npu_backend(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 155 | def test_npu_backend_non_windows(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 164 | def test_npu_backend_windows_no_openvino(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 175 | def test_npu_backend_windows_openvino_no_npu(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 188 | def test_npu_backend_windows_openvino_with_npu(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 209 | def test_engine_init_with_legacy_backend_class(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 226 | def test_sampler_config_validation(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 245 | def test_conversation_with_sampler_config(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 260 | def test_session_with_sampler_config(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 273 | def test_conversation_send_message(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 288 | def test_conversation_render_message_to_string(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 299 | def test_conversation_send_message_async(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 312 | def test_conversation_send_message_async_cancel(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 353 | def test_benchmark_class_with_thread_count(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 427 | def test_create_conversation_with_max_output_tokens(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 508 | def test_conversation_token_count(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 518 | def test_conversation_get_benchmark_info(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 531 | def test_create_conversation_with_extra_context(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 539 | def test_tool_event_handler_storage(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 556 | def test_session_api_run_decode(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 570 | def test_session_api_run_text_scoring_with_token_lengths(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 594 | def test_session_api_run_text_scoring_no_token_lengths(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 614 | def test_session_api_run_decode_async(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 628 | def test_session_api_cancel_process(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 647 | def test_conversation_send_message_with_repetition_penalty_config(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 665 | def test_conversation_send_message_async_with_repetition_penalty_config(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 683 | def test_conversation_send_message_with_max_output_tokens(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 695 | def test_conversation_send_message_async_with_max_output_tokens(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 708 | def test_session_api_apply_prompt_template(self, apply_prompt_template): | CODE |
| LOW | python/litert_lm/engine_test.py | 718 | def test_create_conversation_with_tools(self): | CODE |
| LOW | python/litert_lm/engine_test.py | 731 | def test_send_message_async_with_tools(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 104 | def test_tool_from_function_cases( | CODE |
| LOW | python/litert_lm/tool_test.py | 138 | def test_tool_from_function_array(self, type_hint): | CODE |
| LOW | python/litert_lm/tool_test.py | 167 | def test_create_conversation_with_open_api_tools(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 207 | def test_tool_execution_exception(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 219 | def test_tool_execution_non_json_serializable(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 232 | def test_create_conversation_with_mixed_tools(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 269 | def test_tool_with_no_arguments(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 281 | def test_create_conversation_with_malformed_tool_description(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 316 | def test_handle_tool_calls_valid(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 341 | def test_handle_tool_calls_missing_function_key(self): | CODE |
| LOW | python/litert_lm/tool_test.py | 351 | def test_handle_tool_calls_old_format_ignored(self): | CODE |
| 182 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tools/pytest/utils.py | 25 | Loads test data from a JSON file. Dynamically loads test data from a JSON file matching the caller's filename. Arg | STRING |
| HIGH | python/litert_lm/utils.py | 51 | Converts a ThinkingConfig to a LiteRtLmThinkingConfig opaque pointer. Args: lib: The loaded C library instance. | STRING |
| HIGH | python/litert_lm_cli/cli_helpers.py | 35 | Prompts the user to select an option from a list. Args: choices: The list of choices to present. message: The | STRING |
| HIGH | python/litert_lm_cli/cli_helpers.py | 70 | Resolves the model file when it is missing, prompting the user. Args: from_huggingface_repo: The HuggingFace repo | STRING |
| HIGH | python/litert_lm_cli/model.py | 45 | Returns the attachment type (audio or image) from the file path. Args: path: Path to the attachment. Returns: | STRING |
| HIGH | python/litert_lm_cli/common.py | 48 | Returns the cache directory value for the given cache mode. Args: cache: The cache mode. Valid values are "disk", | STRING |
| HIGH | python/litert_lm_cli/huggingface_download.py | 85 | Downloads a file from HuggingFace Hub. Args: repo_id: The HuggingFace repository ID. filename: The filename t | STRING |
| HIGH | python/litert_lm_cli/huggingface_download.py | 162 | Lists .litertlm files in a HuggingFace repository. Args: repo_id: The HuggingFace repository ID. token: The H | STRING |
| HIGH | python/litert_lm_cli/commands/import.py | 41 | Downloads an experimental model. Args: model_id: The unique ID of the experimental model to download. user_ag | STRING |
| HIGH | python/litert_lm_cli/commands/import.py | 92 | Copies the source file to dest, falling back to download if needed. If the source is a local file (equal to model_fil | STRING |
| HIGH | python/litert_lm_cli/commands/serve_util.py | 96 | Retrieves the persistent server engine or initializes it on first request. Lifetime Management: The LiteRT-LM Engin | STRING |
| HIGH | python/litert_lm_cli/commands/openai_handler.py | 416 | Translates an OpenAI message to a LiteRT-LM message format. This function takes a message dictionary, typically from | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder_cli.py | 342 | Parses the command-line arguments. Args: parser: The argument parser to use. Returns: A list of parsed arg | STRING |
| HIGH | python/litert_lm_builder/litertlm_peek.py | 91 | Reads the header of a LiteRT-LM file and returns the metadata. Args: file_path: The path to the LiteRT-LM file. | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 302 | Initializes a LitertLmFileBuilder from a loaded TOML string. Args: toml_str: The TOML string to parse. | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 445 | Adds llm metadata to the litertlm file. Args: llm_metadata_path: The path to the llm metadata file. Can be bi | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 496 | Adds a tflite model to the litertlm file. Args: tflite_model_path: The path to the tflite model file. m | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 568 | Adds tflite weights to the litertlm file. Args: tflite_weights_path: The path to the tflite weights file. | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 612 | Adds a sentencepiece tokenizer to the litertlm file. Args: sp_tokenizer_path: The path to the sentencepiece t | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 649 | Adds a hf tokenizer to the litertlm file. Args: hf_tokenizer_path: The path to the hf tokenizer `tokenizer.js | STRING |
| HIGH | python/litert_lm_builder/litertlm_builder.py | 695 | Adds generic binary data to the litertlm file. Args: generic_binary_data_path: The path to the generic binary | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm/interfaces.py | 17 | CODE | |
| LOW | python/litert_lm/_ffi.py | 16 | CODE | |
| LOW | python/litert_lm/conversation.py | 16 | CODE | |
| LOW | python/litert_lm/tools.py | 17 | CODE | |
| LOW | python/litert_lm/__init__.py | 17 | CODE | |
| LOW | python/litert_lm/__init__.py | 18 | CODE | |
| LOW | python/litert_lm/__init__.py | 19 | CODE | |
| LOW | python/litert_lm/__init__.py | 20 | CODE | |
| LOW | python/litert_lm/__init__.py | 21 | CODE | |
| LOW | python/litert_lm/__init__.py | 22 | CODE | |
| LOW | python/litert_lm/__init__.py | 23 | CODE | |
| LOW | python/litert_lm/__init__.py | 24 | CODE | |
| LOW | python/litert_lm/__init__.py | 25 | CODE | |
| LOW | python/litert_lm/__init__.py | 26 | CODE | |
| LOW | python/litert_lm/__init__.py | 27 | CODE | |
| LOW | python/litert_lm/__init__.py | 28 | CODE | |
| LOW | python/litert_lm/__init__.py | 29 | CODE | |
| LOW | python/litert_lm/__init__.py | 30 | CODE | |
| LOW | python/litert_lm/__init__.py | 31 | CODE | |
| LOW | python/litert_lm/__init__.py | 32 | CODE | |
| LOW | python/litert_lm/__init__.py | 33 | CODE | |
| LOW | python/litert_lm/__init__.py | 34 | CODE | |
| LOW | python/litert_lm/__init__.py | 35 | CODE | |
| LOW | python/litert_lm/__init__.py | 36 | CODE | |
| LOW | python/litert_lm/__init__.py | 37 | CODE | |
| LOW | python/litert_lm/__init__.py | 38 | CODE | |
| LOW | python/litert_lm/__init__.py | 39 | CODE | |
| LOW | python/litert_lm/__init__.py | 40 | CODE | |
| LOW | python/litert_lm/__init__.py | 41 | CODE | |
| LOW | python/litert_lm/__init__.py | 42 | CODE | |
| LOW | python/litert_lm/__init__.py | 43 | CODE | |
| LOW | python/litert_lm/_messages.py | 16 | CODE | |
| LOW | python/litert_lm/engine.py | 16 | CODE | |
| LOW | python/litert_lm_eval/litert_lm_eval.py | 43 | CODE | |
| LOW | python/litert_lm_eval/litert_lm_eval.py | 49 | CODE | |
| LOW | python/litert_lm_cli/config.py | 16 | CODE | |
| LOW | python/litert_lm_cli/model.py | 17 | CODE | |
| LOW | python/litert_lm_cli/commands/run.py | 33 | CODE | |
| LOW | python/litert_lm_cli/commands/convert.py | 17 | CODE | |
| LOW | python/litert_lm_cli/commands/convert.py | 18 | CODE | |
| LOW | python/litert_lm_cli/commands/convert.py | 22 | CODE | |
| LOW | python/litert_lm_cli/commands/convert.py | 23 | CODE | |
| LOW | python/litert_lm_cli/commands/convert.py | 24 | CODE | |
| LOW | python/litert_lm_cli/commands/serve_test.py | 87 | CODE | |
| LOW | python/litert_lm_cli/commands/serve.py | 20 | CODE | |
| LOW | python/litert_lm_cli/commands/serve_util.py | 15 | CODE | |
| LOW | python/litert_lm_cli/commands/gemini_handler.py | 20 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm/conversation.py | 76 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm/conversation.py | 110 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm/conversation.py | 182 | except Exception: | CODE |
| LOW | python/litert_lm/session.py | 41 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm/engine.py | 197 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 78 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 120 | except Exception as e: | CODE |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 135 | except Exception as e: | CODE |
| LOW | python/litert_lm_cli/config.py | 84 | except Exception as e: | CODE |
| LOW | python/litert_lm_cli/config.py | 115 | except Exception as e: | CODE |
| LOW | python/litert_lm_cli/model.py | 166 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/common.py | 212 | except Exception: | CODE |
| LOW | python/litert_lm_cli/huggingface_download.py | 67 | except Exception as e: | CODE |
| LOW | python/litert_lm_cli/commands/run.py | 371 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/run.py | 375 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/benchmark.py | 127 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/gemini_handler.py | 228 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/gemini_handler.py | 367 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/gemini_handler.py | 430 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 136 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 540 | except Exception as e: | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 678 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 690 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 901 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 956 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 1097 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 1155 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | …/litert_lm_cli/commands/serve_openai_streaming_test.py | 75 | except Exception: # pylint: disable=broad-exception-caught | CODE |
| LOW | …/litert_lm_cli/commands/serve_openai_streaming_test.py | 187 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| MEDIUM | python/litert_lm_builder/litertlm_peek_main.py | 59 | print(f"Error processing file: {e}", file=sys.stderr) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm/conversation.py | 128 | CODE | |
| LOW | python/litert_lm/conversation.py | 245 | CODE | |
| LOW | python/litert_lm/tools.py | 28 | CODE | |
| LOW | python/litert_lm/session.py | 129 | CODE | |
| LOW | python/litert_lm/engine_test.py | 123 | CODE | |
| LOW | python/litert_lm/engine_test.py | 312 | CODE | |
| LOW | python/litert_lm/engine.py | 207 | CODE | |
| LOW | python/litert_lm/engine.py | 425 | CODE | |
| LOW | python/litert_lm/utils.py | 78 | CODE | |
| LOW | python/litert_lm/examples/tool_main.py | 42 | CODE | |
| LOW | python/litert_lm_eval/utils.py | 20 | CODE | |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 143 | CODE | |
| LOW | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 207 | CODE | |
| LOW | python/litert_lm_cli/model_test.py | 46 | CODE | |
| LOW | python/litert_lm_cli/model.py | 115 | CODE | |
| LOW | python/litert_lm_cli/common.py | 172 | CODE | |
| LOW | python/litert_lm_cli/commands/import.py | 84 | CODE | |
| LOW | python/litert_lm_cli/commands/run.py | 80 | CODE | |
| LOW | python/litert_lm_cli/commands/run.py | 175 | CODE | |
| LOW | python/litert_lm_cli/commands/serve.py | 33 | CODE | |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 412 | CODE | |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 616 | CODE | |
| LOW | python/litert_lm_cli/commands/openai_handler.py | 693 | CODE | |
| LOW | …/litert_lm_cli/commands/serve_openai_streaming_test.py | 32 | CODE | |
| LOW | python/litert_lm_builder/litertlm_peek.py | 303 | CODE | |
| LOW | python/litert_lm_builder/litertlm_peek.py | 399 | CODE | |
| LOW | python/litert_lm_builder/litertlm_peek.py | 440 | CODE | |
| LOW | python/litert_lm_builder/litertlm_builder.py | 299 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | runtime/components/prompt_template.h | 35 | // Example usage: | COMMENT |
| LOW | …s_processor/constrained_decoding/constrained_decoder.h | 40 | // Example usage: | COMMENT |
| LOW | runtime/engine/engine.h | 45 | // Example usage: | COMMENT |
| LOW | runtime/engine/engine.h | 275 | // Example usage: | COMMENT |
| LOW | runtime/engine/engine.h | 293 | // Example usage: | COMMENT |
| LOW | runtime/engine/engine_factory.h | 44 | // Example usage: | COMMENT |
| LOW | runtime/conversation/conversation.h | 131 | // Example usage: | COMMENT |
| LOW | runtime/conversation/conversation.h | 463 | // Example usage: | COMMENT |
| LOW | runtime/conversation/conversation.h | 581 | // Example usage: | COMMENT |
| LOW | swift/Conversation.swift | 30 | /// Example usage: | COMMENT |
| LOW | swift/Engine.swift | 22 | /// Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/litert_lm/verify_api.py | 25 | """Executes master comprehensive E2E tests covering multi-turn reasoning, streaming, tools, and telemetry.""" | STRING |
| MEDIUM | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 33 | # Define the placeholder used by the evaluation harness. | COMMENT |
| LOW | python/litert_lm_cli/main_test.py | 394 | # Since we are in an isolated filesystem, we'll just use simple names | COMMENT |
| LOW | python/litert_lm_cli/main_test.py | 399 | # or just use paths that will exist. | COMMENT |
| LOW | python/litert_lm_builder/litertlm_builder.py | 859 | # This is expected if the file is in text format. We'll just pass and try | COMMENT |
| MEDIUM | runtime/util/litert_lm_loader.h | 92 | // A simple hash combine. For more robust hashing, consider | COMMENT |
| MEDIUM | …ntime/framework/resource_management/resource_manager.h | 45 | // as the LlmExecutor, enabling multiple sessions to utilize it concurrently. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py | 33 | # Define the placeholder used by the evaluation harness. | COMMENT |
| MEDIUM | python/litert_lm_builder/litertlm_peek_test.py | 109 | # Create a temporary directory for dumping files. | COMMENT |
| MEDIUM | python/litert_lm_builder/litertlm_peek_test.py | 190 | # Create a temporary directory for dumping files. | COMMENT |
| MEDIUM | .github/workflows/ml-ci-build-win.yml | 142 | # Create a dedicated directory on the big drive for the B: mount | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 10 | - **Gemma4 12B Support**: LiteRT-LM now supports Gemma4 12B ([blog](https://developers.googleblog.com/bringing-gemma-4 | CODE |
| MEDIUM | README.md | 59 | [Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge](https://developers.googleb | CODE |
| MEDIUM | README.md | 62 | [Bring state-of-the-art agentic skills to the edge with Gemma 4](https://developers.googleblog.com/bring-state-of-the-ar | CODE |
| MEDIUM | README.md | 132 | ([blog](https://developers.googleblog.com/bring-state-of-the-art-agentic-skills-to-the-edge-with-gemma-4/)) | CODE |
| MEDIUM | docs/getting-started/cmake.md | 44 | ├── sentencepiece.cmake # Primary orchestration module (ExternalProject_Add) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm/interfaces.py | 343 | CODE | |
| LOW | python/litert_lm/interfaces.py | 439 | CODE | |
| LOW | python/litert_lm/conversation.py | 36 | CODE | |
| LOW | python/litert_lm/engine.py | 52 | CODE | |
| LOW | python/litert_lm/engine.py | 207 | CODE | |
| LOW | python/litert_lm_cli/commands/run.py | 175 | CODE | |
| LOW | python/litert_lm_cli/commands/run.py | 516 | CODE | |
| LOW | python/litert_lm_cli/commands/benchmark.py | 37 | CODE | |
| LOW | python/litert_lm_cli/commands/benchmark.py | 171 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm_cli/huggingface_download_test.py | 80 | repo_id=repo_id, filename=filename, token="fake-token" | CODE |
| LOW | python/litert_lm_cli/huggingface_download_test.py | 96 | self.assertEqual(req.get_header("Authorization"), "Bearer fake-token") | CODE |
| LOW⚡ | python/litert_lm_cli/huggingface_download_test.py | 179 | repo_id=repo_id, token="fake-token" | CODE |
| LOW⚡ | python/litert_lm_cli/huggingface_download_test.py | 185 | self.assertEqual(req.get_header("Authorization"), "Bearer fake-token") | CODE |
| LOW | python/litert_lm_cli/huggingface_download_test.py | 204 | repo_id=repo_id, token="fake-token" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm_cli/main_test.py | 130 | # Check if expected keys are added. | COMMENT |
| LOW | python/litert_lm_cli/main_test.py | 132 | # Check if enter (ControlM), c-j (ControlJ), esc+enter, c-c (ControlC). | COMMENT |
| LOW | python/litert_lm_builder/litertlm_peek_test.py | 131 | # Check if files were dumped in the specified directory. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/litert_lm_builder/litertlm_builder_cli.py | 50 | # Section 1: SP_Tokenizer (you can also use HF_Tokenizer) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/litert_lm_builder/__init__.py | 29 | __all__ = [ | CODE |