AI Slop Code RIsk Monitor

google-ai-edge/LiteRT-LM

LiteRT-LM is Google's production-ready, high-performance, open-source inference framework for deploying Large Language Models on edge devices.

23.6 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for google-ai-edge/LiteRT-LM, a C++ project with 6,639 GitHub stars. SynthScan examined 135,978 lines of code across 746 source files, recording 2352 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 23.6 (Elevated 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.

23.6
Adjusted Signal
23.6
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
6.6K
Stars
C++
Language
136.0K
Lines of Code
746
Files
2.4K
Pattern Hits
2026-10-12
Scan Date
0.08
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 48.7/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 1771 finding(s).

Hallucinated Dependency & Supply Chain Risk 2.3/100 · LOW

Are imports declared and package/API names verified? 75 finding(s).

Agent Over-Engineering Ratio 47.9/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 1007 finding(s).

PR Review Velocity Impact 72.8/100 · HIGH

Which changes need focused human review? 2352 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 56MEDIUM 456LOW 1840

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 2352 distinct pattern matches across 18 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.

Decorative Section Separators443 hits · 1170 pts
SeverityFileLineSnippetContext
MEDIUMpython/litert_lm/debug_artifacts_test.py14# ==============================================================================COMMENT
MEDIUMjs/CMakeLists.txt17# ==============================================================================COMMENT
MEDIUMjs/CMakeLists.txt19# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt15# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt17# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt33# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt35# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt51# ==============================================================================COMMENT
MEDIUMjs/packages/core/src/cpp/CMakeLists.txt53# ==============================================================================COMMENT
MEDIUMruntime/CMakeLists.txt23# ==============================================================================COMMENT
MEDIUMruntime/CMakeLists.txt25# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt15# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt17# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt44# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt46# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt79# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt81# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt101# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt103# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt147# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt149# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt173# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt175# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt197# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt199# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt221# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt223# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt244# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt246# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt262# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt264# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt17# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt19# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt34# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt36# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt57# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt59# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt77# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt79# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt90# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt92# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt109# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt111# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt132# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt134# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt154# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt156# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt177# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt179# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt199# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt201# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt221# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt223# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt240# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt242# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt259# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt261# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt278# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt280# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt297# ==============================================================================COMMENT
383 more matches not shown…
Over-Commented Block1167 hits · 1104 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# Copyright 2026 Google LLC.COMMENT
LOW__init__.py1# Copyright 2025 The ODML Authors.COMMENT
LOWPackage.swift1// swift-tools-version: 5.9COMMENT
LOWtools/pytest/conftest.py1# Copyright 2026 Google LLC.COMMENT
LOWtools/pytest/utils.py1# Copyright 2026 Google LLC.COMMENT
LOWtools/pytest/test_e2e_sanity_checks.py1# Copyright 2026 Google LLC.COMMENT
LOWcmake/packages/litert_lm/CMakeLists.txt1# Copyright 2026 Google LLC.COMMENT
LOWcmake/packages/tflite/shims/CMakeLists-shim.txt1#COMMENT
LOWcmake/packages/litert/shims/CMakeLists-support-shim.txt1# Copyright 2026 Google LLC.COMMENT
LOWcmake/packages/litert/shims/CMakeLists-support-shim.txt161)COMMENT
LOWcmake/packages/litert/shims/CMakeLists-shim.txt1# Copyright 2026 Google LLC.COMMENT
LOWcmake/packages/litert/shims/CMakeLists-shim.txt161 endif()COMMENT
LOW…e/packages/litert/shims/CMakeLists_gated-delta-net.txt1# Copyright 2026 Google LLC.COMMENT
LOWpython/litert_lm/interfaces.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/debug_artifacts_test.py1# Copyright 2026 The Google AI Edge Debugger Authors. All Rights Reserved.COMMENT
LOWpython/litert_lm/messages_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/_ffi.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/benchmark.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/conversation.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/tools.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/session.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/engine_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/tool_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/_messages.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/engine.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/utils.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/bundle_pypi_package.sh1#!/bin/bashCOMMENT
LOWpython/litert_lm/model_info_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/model_info.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/embedding_engine_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/api_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/embedding_engine.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/examples/simple_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/examples/multimodal_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/examples/tool_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/utils_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/utils.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/litert_lm_eval_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/litert_lm_eval.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/runners/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…lm_eval/runners/lm_eval_runner/litert_lm_model_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…thon/litert_lm_eval/runners/lm_eval_runner/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/model_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/config.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/help_formatter.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/common_test.py1# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWpython/litert_lm_cli/venv_manager_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/cli_helpers.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/model.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/venv_manager.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/common.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/bundle_pypi_package.sh1#!/bin/bashCOMMENT
LOWpython/litert_lm_cli/cli_helpers_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/huggingface_download_test.py1# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWpython/litert_lm_cli/huggingface_download.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/main_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/cli_tests.sh1#!/bin/bashCOMMENT
1107 more matches not shown…
Hyper-Verbose Identifiers492 hits · 442 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/debug_artifacts_test.py62 def test_get_debug_artifacts_with_warning_on_macro_disabled(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py86 def test_get_debug_artifacts_invalid_session(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py100 def test_get_debug_artifacts_raises_on_debug_info_error(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py115 def test_get_debug_artifacts_raises_on_capture_dir_error(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py136 def test_get_debug_artifacts_empty_session_dir(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py160 def test_get_debug_artifacts_populated_session_dir_and_sorting(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py234 def test_get_debug_artifacts_with_warning_on_macro_disabled(self):CODE
LOWpython/litert_lm/debug_artifacts_test.py253 def test_get_debug_artifacts_populated_dir(self):CODE
LOWpython/litert_lm/messages_test.py79 def test_tool_response_content(self):CODE
LOWpython/litert_lm/messages_test.py116 def test_contents_of_sequence(self):CODE
LOWpython/litert_lm/messages_test.py183 def test_message_with_tool_calls(self):CODE
LOWpython/litert_lm/messages_test.py202 def test_message_with_channels(self):CODE
LOWpython/litert_lm/messages_test.py216 def test_message_mapping_and_dict_compatibility(self):CODE
LOWpython/litert_lm/messages_test.py296 def test_message_from_json_tool_call_arguments_formats(self):CODE
LOWpython/litert_lm/messages_test.py321 def test_message_from_json_multimodal_and_tools(self):CODE
LOWpython/litert_lm/tools.py28def _parse_param_descriptions(docstring: str) -> dict[str, str]:CODE
LOW⚡python/litert_lm/engine_test.py91 def test_set_min_log_severity_invalid_raises(self):CODE
LOW⚡python/litert_lm/engine_test.py101 def test_check_status_unknown_code(self):CODE
LOW⚡python/litert_lm/engine_test.py110 def test_engine_init_setter_failure_raises_and_frees_settings(self):CODE
LOW⚡python/litert_lm/engine_test.py676 def test_engine_abc_inheritance(self):CODE
LOW⚡python/litert_lm/engine_test.py680 def test_engine_tokenization_api(self):CODE
LOW⚡python/litert_lm/engine_test.py690 def test_engine_special_token_metadata(self):CODE
LOW⚡python/litert_lm/engine_test.py704 def test_conversation_abc_inheritance(self):CODE
LOW⚡python/litert_lm/engine_test.py711 def test_create_conversation_with_messages(self):CODE
LOW⚡python/litert_lm/engine_test.py719 def test_create_conversation_with_message_objects(self):CODE
LOW⚡python/litert_lm/engine_test.py743 def test_create_conversation_with_chat_template(self):CODE
LOW⚡python/litert_lm/engine_test.py751 def test_create_conversation_with_filter_channel_content_from_kv_cache(self):CODE
LOW⚡python/litert_lm/engine_test.py760 def test_create_conversation_with_enable_speculative_decoding(self):CODE
LOW⚡python/litert_lm/engine_test.py772 def test_create_session_with_enable_speculative_decoding(self):CODE
LOW⚡python/litert_lm/engine_test.py780 def test_create_conversation_with_max_output_tokens_async(self):CODE
LOW⚡python/litert_lm/engine_test.py790 def test_conversation_send_message_object(self):CODE
LOW⚡python/litert_lm/engine_test.py799 def test_conversation_send_contents_object(self):CODE
LOW⚡python/litert_lm/engine_test.py808 def test_conversation_send_dict_message(self):CODE
LOW⚡python/litert_lm/engine_test.py817 def test_conversation_with_thinking_config(self):CODE
LOW⚡python/litert_lm/engine_test.py1181 def test_session_api_apply_prompt_template(self, apply_prompt_template):CODE
LOW⚡python/litert_lm/engine_test.py1188 def test_response_format_validation(self):CODE
LOW⚡python/litert_lm/engine_test.py1192 def test_response_format_without_enabling(self):CODE
LOWpython/litert_lm/engine_test.py69 def test_create_checked_raises_with_last_error_message(self):CODE
LOWpython/litert_lm/engine_test.py80 def test_call_checked_raises_with_last_error_message(self):CODE
LOWpython/litert_lm/engine_test.py138 def test_create_conversation_setter_failure_raises(self):CODE
LOWpython/litert_lm/engine_test.py156 def test_backend_cpu_equality(self):CODE
LOWpython/litert_lm/engine_test.py172 def test_engine_init_with_cpu_thread_counts(self):CODE
LOWpython/litert_lm/engine_test.py206 def test_engine_init_with_use_ringbuffers_local_attention(self):CODE
LOWpython/litert_lm/engine_test.py228 def test_engine_init_with_enable_ynnpack(self):CODE
LOWpython/litert_lm/engine_test.py272 def test_engine_init_with_max_vision_tokens_per_image(self):CODE
LOWpython/litert_lm/engine_test.py303 def test_create_conversation_with_visual_token_budget(self):CODE
LOWpython/litert_lm/engine_test.py353 def test_engine_init_with_npu_backend(self):CODE
LOWpython/litert_lm/engine_test.py385 def test_npu_backend_non_windows(self):CODE
LOWpython/litert_lm/engine_test.py394 def test_npu_backend_windows_no_openvino(self):CODE
LOWpython/litert_lm/engine_test.py405 def test_npu_backend_windows_openvino_no_npu(self):CODE
LOWpython/litert_lm/engine_test.py418 def test_npu_backend_windows_openvino_with_npu(self):CODE
LOWpython/litert_lm/engine_test.py439 def test_engine_init_with_legacy_backend_class(self):CODE
LOWpython/litert_lm/engine_test.py456 def test_sampler_config_validation(self):CODE
LOWpython/litert_lm/engine_test.py475 def test_conversation_with_sampler_config(self):CODE
LOWpython/litert_lm/engine_test.py490 def test_session_with_sampler_config(self):CODE
LOWpython/litert_lm/engine_test.py503 def test_conversation_send_message(self):CODE
LOWpython/litert_lm/engine_test.py520 def test_conversation_render_message_to_string(self):CODE
LOWpython/litert_lm/engine_test.py531 def test_conversation_send_message_async(self):CODE
LOWpython/litert_lm/engine_test.py544 def test_conversation_send_message_async_cancel(self):CODE
LOWpython/litert_lm/engine_test.py583 def test_benchmark_reuses_engine_across_runs(self):CODE
432 more matches not shown…
Docstring Block Structure33 hits · 165 pts
SeverityFileLineSnippetContext
HIGHtools/pytest/utils.py25Loads test data from a JSON file. Dynamically loads test data from a JSON file matching the caller's filename. ArgSTRING
HIGHpython/litert_lm/_ffi.py1306Calls a C API constructor that returns its handle through an out-parameter. The C API constructors return a `LiteRtLmSTRING
HIGHpython/litert_lm/_ffi.py1335Like `create_checked`, but a NULL result on success means "absent". For C API functions whose result is legitimately STRING
HIGHpython/litert_lm/_ffi.py1360Calls a C API accessor that returns its result through an out-parameter. The C API accessors return a `LiteRtLmStatusSTRING
HIGHpython/litert_lm/_ffi.py1390Like `get_checked`, but `kLiteRtLmStatusNotFound` means "absent". For C API accessors of optional values: they returnSTRING
HIGHpython/litert_lm/engine.py493Creates a configured LiteRtLmSessionConfig owned by the caller. Args: apply_prompt_template: Whether to applySTRING
HIGHpython/litert_lm/utils.py70Converts a ThinkingConfig to a LiteRtLmThinkingConfig opaque pointer. Args: lib: The loaded C library instance.STRING
HIGHpython/litert_lm/model_info.py90Reads a two-pass `int32_t` array from a C API `*_selection` function. Args: lib: The loaded C library instance. STRING
HIGHpython/litert_lm/embedding_engine.py140Creates a LiteRtLmEmbeddingOptions pointer from `options`. Args: lib: The loaded C library instance. options:STRING
HIGHpython/litert_lm/embedding_engine.py197Copies the values of a LiteRtLmEmbeddingResponse into Python. Args: lib: The loaded C library instance. resp_STRING
HIGHpython/litert_lm_cli/cli_helpers.py35Prompts the user to select an option from a list. Args: choices: The list of choices to present. message: TheSTRING
HIGHpython/litert_lm_cli/cli_helpers.py70Resolves the model file when it is missing, prompting the user. Args: from_huggingface_repo: The HuggingFace repoSTRING
HIGHpython/litert_lm_cli/model.py45Returns the attachment type (audio or image) from the file path. Args: path: Path to the attachment. Returns: STRING
HIGHpython/litert_lm_cli/common.py96Returns the cache directory value for the given cache mode. Args: cache: The cache mode. Valid values are "disk",STRING
HIGHpython/litert_lm_cli/huggingface_download.py85Downloads a file from HuggingFace Hub. Args: repo_id: The HuggingFace repository ID. filename: The filename tSTRING
HIGHpython/litert_lm_cli/huggingface_download.py162Lists .litertlm files in a HuggingFace repository. Args: repo_id: The HuggingFace repository ID. token: The HSTRING
HIGHpython/litert_lm_cli/commands/import.py41Downloads an experimental model. Args: model_id: The unique ID of the experimental model to download. user_agSTRING
HIGHpython/litert_lm_cli/commands/import.py119Links the source file to dest using hard link, falling back to download if needed. If the source is a local file (equSTRING
HIGHpython/litert_lm_cli/commands/serve/openai_common.py51Parses a model parameter string into (model_id, backend, max_num_tokens). Format: "<model-id>[,<backend>[,<max-token>STRING
HIGHpython/litert_lm_cli/commands/serve/openai_common.py326Translates an OpenAI message to a LiteRT-LM message format. This function takes a message dictionary, typically from STRING
HIGHpython/litert_lm_cli/commands/serve/util.py119Retrieves the persistent server engine or initializes it on first request. Lifetime Management: The LiteRT-LM EnginSTRING
HIGHpython/litert_lm_cli/commands/serve/util.py242Retrieves the persistent server embedding engine or initializes it on first request. Args: server: The active cusSTRING
HIGHpython/litert_lm_builder/litertlm_builder_cli.py462Parses the command-line arguments. Args: parser: The argument parser to use. Returns: A list of parsed argSTRING
HIGHpython/litert_lm_builder/litertlm_peek.py96Reads the header of a LiteRT-LM file and returns the metadata. Args: file_path: The path to the LiteRT-LM file. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py634Initializes a LitertLmFileBuilder from a loaded TOML string. Args: toml_str: The TOML string to parse. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py839Adds llm metadata to the litertlm file. Args: llm_metadata_path: The path to the llm metadata file. Can be biSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py964Adds executor metadata to the litertlm file. Args: executor_metadata_path: The path to the executor metadata STRING
HIGHpython/litert_lm_builder/litertlm_builder.py992Adds embedding metadata to the litertlm file. Args: embedding_metadata_path: The path to the embedding metadaSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py1097Adds a tflite model to the litertlm file. Args: tflite_model_path: The path to the tflite model file. mSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py1169Adds tflite weights to the litertlm file. Args: tflite_weights_path: The path to the tflite weights file. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py1264Adds a sentencepiece tokenizer to the litertlm file. Args: sp_tokenizer_path: The path to the sentencepiece tSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py1304Adds a hf tokenizer to the litertlm file. Args: hf_tokenizer_path: The path to the hf tokenizer `tokenizer.jsSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py1375Sets or clears the backend_constraint metadata on matching sections. Useful after post-processing an unpacked packaSTRING
Empty Error Handlers23 hits · 115 pts
SeverityFileLineSnippetContext
HIGHpython/litert_lm/_ffi.py174except (ImportError, FileNotFoundError, TypeError):CODE
HIGHpython/litert_lm/benchmark.py175except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm/conversation.py93except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm/session.py49except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm/engine_test.py258except RuntimeError:CODE
HIGHpython/litert_lm/engine_test.py379except RuntimeError:CODE
HIGHpython/litert_lm/engine.py263except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm/embedding_engine.py507except Exception: # pylint: disable=broad-exception-caughtCODE
HIGH…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py78except Exception: # pylint: disable=broad-exceptCODE
HIGHpython/litert_lm_cli/common.py314except OSError:CODE
HIGHpython/litert_lm_cli/huggingface_download.py110except FileNotFoundError:CODE
HIGHpython/litert_lm_cli/huggingface_download.py112except OSError:CODE
HIGHpython/litert_lm_cli/huggingface_download.py71except OSError:CODE
HIGHpython/litert_lm_cli/commands/import.py101except OSError:CODE
HIGHpython/litert_lm_cli/commands/import.py158except OSError:CODE
HIGHpython/litert_lm_cli/commands/serve/openai_common.py237except Exception: # pylint: disable=broad-exception-caughtCODE
HIGH…/litert_lm_cli/commands/serve/openai_streaming_test.py77except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm_cli/commands/serve/gemini_handler.py252except BrokenPipeError:CODE
HIGHpython/litert_lm_cli/commands/serve/openai_models.py67except BrokenPipeError:CODE
HIGHpython/litert_lm_cli/commands/serve/openai_handler.py327except BrokenPipeError:CODE
HIGHpython/litert_lm_cli/commands/serve/openai_handler.py166except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHpython/litert_lm_builder/litertlm_builder.py1580except message.DecodeError:CODE
HIGHpython/litert_lm_builder/litertlm_builder.py1534except OSError:CODE
Unused Imports70 hits · 58 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/interfaces.py17CODE
LOWpython/litert_lm/_ffi.py16CODE
LOWpython/litert_lm/conversation.py16CODE
LOWpython/litert_lm/tools.py17CODE
LOWpython/litert_lm/__init__.py19CODE
LOWpython/litert_lm/__init__.py20CODE
LOWpython/litert_lm/__init__.py21CODE
LOWpython/litert_lm/__init__.py22CODE
LOWpython/litert_lm/__init__.py24CODE
LOWpython/litert_lm/__init__.py25CODE
LOWpython/litert_lm/__init__.py26CODE
LOWpython/litert_lm/__init__.py27CODE
LOWpython/litert_lm/__init__.py28CODE
LOWpython/litert_lm/__init__.py29CODE
LOWpython/litert_lm/__init__.py30CODE
LOWpython/litert_lm/__init__.py31CODE
LOWpython/litert_lm/__init__.py32CODE
LOWpython/litert_lm/__init__.py33CODE
LOWpython/litert_lm/__init__.py34CODE
LOWpython/litert_lm/__init__.py35CODE
LOWpython/litert_lm/__init__.py36CODE
LOWpython/litert_lm/__init__.py37CODE
LOWpython/litert_lm/__init__.py38CODE
LOWpython/litert_lm/__init__.py39CODE
LOWpython/litert_lm/__init__.py40CODE
LOWpython/litert_lm/__init__.py41CODE
LOWpython/litert_lm/__init__.py42CODE
LOWpython/litert_lm/__init__.py43CODE
LOWpython/litert_lm/__init__.py44CODE
LOWpython/litert_lm/__init__.py45CODE
LOWpython/litert_lm/__init__.py46CODE
LOWpython/litert_lm/__init__.py47CODE
LOWpython/litert_lm/__init__.py48CODE
LOWpython/litert_lm/__init__.py49CODE
LOWpython/litert_lm/__init__.py50CODE
LOWpython/litert_lm/__init__.py51CODE
LOWpython/litert_lm/__init__.py52CODE
LOWpython/litert_lm/__init__.py53CODE
LOWpython/litert_lm/__init__.py54CODE
LOWpython/litert_lm/__init__.py55CODE
LOWpython/litert_lm/__init__.py56CODE
LOWpython/litert_lm/__init__.py57CODE
LOWpython/litert_lm/__init__.py58CODE
LOWpython/litert_lm/__init__.py59CODE
LOWpython/litert_lm/__init__.py60CODE
LOWpython/litert_lm/__init__.py61CODE
LOWpython/litert_lm/__init__.py62CODE
LOWpython/litert_lm/_messages.py16CODE
LOWpython/litert_lm/engine.py16CODE
LOWpython/litert_lm/model_info.py67CODE
LOWpython/litert_lm/embedding_engine.py16CODE
LOWpython/litert_lm_eval/litert_lm_eval.py43CODE
LOWpython/litert_lm_eval/litert_lm_eval.py49CODE
LOWpython/litert_lm_cli/config.py16CODE
LOWpython/litert_lm_cli/model.py17CODE
LOWpython/litert_lm_cli/main.py18CODE
LOWpython/litert_lm_cli/commands/convert.py17CODE
LOWpython/litert_lm_cli/commands/convert.py18CODE
LOWpython/litert_lm_cli/commands/convert.py22CODE
LOWpython/litert_lm_cli/commands/convert.py23CODE
10 more matches not shown…
Excessive Try-Catch Wrapping38 hits · 38 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/benchmark.py175 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/conversation.py93 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/conversation.py127 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/conversation.py328 except Exception as e:CODE
LOWpython/litert_lm/conversation.py478 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/session.py49 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/session.py119 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/engine.py263 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/embedding_engine.py507 except Exception: # pylint: disable=broad-exception-caughtCODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py78 except Exception: # pylint: disable=broad-exceptCODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py120 except Exception as e:CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py135 except Exception as e:CODE
LOWpython/litert_lm_cli/config.py152 except Exception as e:CODE
LOWpython/litert_lm_cli/config.py326 except Exception as e:CODE
LOWpython/litert_lm_cli/model.py166 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/common.py311 except Exception:CODE
LOWpython/litert_lm_cli/huggingface_download.py67 except Exception as e:CODE
LOWpython/litert_lm_cli/commands/pack.py181 except Exception as e: # pylint: disable=broad-exception-caughtSTRING
LOWpython/litert_lm_cli/commands/run.py412 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/run.py416 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/benchmark.py189 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/unpack.py168 except Exception as e: # pylint: disable=broad-exception-caughtSTRING
LOWpython/litert_lm_cli/commands/serve/openai_common.py237 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_common.py450 except Exception as e:CODE
LOWpython/litert_lm_cli/commands/serve/openai_responses.py272 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW…/litert_lm_cli/commands/serve/openai_streaming_test.py77 except Exception: # pylint: disable=broad-exception-caughtCODE
LOW…/litert_lm_cli/commands/serve/openai_streaming_test.py189 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/gemini_handler.py227 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/gemini_handler.py366 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/gemini_handler.py429 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_models.py57 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_handler.py154 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_handler.py166 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_handler.py250 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/serve/openai_handler.py295 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW…itert_lm_cli/commands/serve/openai_chat_completions.py462 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW…thon/litert_lm_cli/commands/serve/openai_embeddings.py320 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUMpython/litert_lm_builder/litertlm_peek_main.py59 print(f"Error processing file: {e}", file=sys.stderr)CODE
Deep Nesting38 hits · 36 pts
SeverityFileLineSnippetContext
LOWtools/pytest/conftest.py150CODE
LOWpython/litert_lm/benchmark.py53CODE
LOWpython/litert_lm/benchmark.py178CODE
LOWpython/litert_lm/conversation.py163CODE
LOWpython/litert_lm/conversation.py417CODE
LOWpython/litert_lm/tools.py28CODE
LOWpython/litert_lm/session.py172CODE
LOWpython/litert_lm/engine_test.py353CODE
LOWpython/litert_lm/_messages.py364CODE
LOWpython/litert_lm/engine.py273CODE
LOWpython/litert_lm/engine.py589CODE
LOWpython/litert_lm/utils.py105CODE
LOWpython/litert_lm/embedding_engine_test.py222CODE
LOWpython/litert_lm/api_test.py225CODE
LOWpython/litert_lm/embedding_engine.py85CODE
LOWpython/litert_lm_eval/utils.py20CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py143CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py207CODE
LOWpython/litert_lm_cli/model_test.py47CODE
LOWpython/litert_lm_cli/config.py199CODE
LOWpython/litert_lm_cli/model.py115CODE
LOWpython/litert_lm_cli/model.py196CODE
LOWpython/litert_lm_cli/common.py271CODE
LOWpython/litert_lm_cli/commands/import.py111CODE
LOWpython/litert_lm_cli/commands/run.py79CODE
LOWpython/litert_lm_cli/commands/run.py172CODE
LOWpython/litert_lm_cli/commands/serve/openai_common.py322CODE
LOW…/litert_lm_cli/commands/serve/openai_streaming_test.py34CODE
LOWpython/litert_lm_cli/commands/serve/openai_handler.py89CODE
LOWpython/litert_lm_cli/commands/serve/module.py34CODE
LOW…thon/litert_lm_cli/commands/serve/openai_embeddings.py145CODE
LOW…thon/litert_lm_cli/commands/serve/openai_embeddings.py225CODE
LOWpython/litert_lm_builder/litertlm_peek.py429CODE
LOWpython/litert_lm_builder/litertlm_peek.py526CODE
LOWpython/litert_lm_builder/litertlm_peek.py567CODE
LOWpython/litert_lm_builder/litertlm_builder.py573CODE
LOWpython/litert_lm_builder/litertlm_builder.py628CODE
LOWpython/litert_lm_builder/litertlm_builder.py1210CODE
Example Usage Blocks12 hits · 18 pts
SeverityFileLineSnippetContext
LOWruntime/components/prompt_template.h35// Example usage:COMMENT
LOW…/components/constrained_decoding/constrained_decoder.h40// Example usage:COMMENT
LOWruntime/engine/engine.h49// Example usage:COMMENT
LOWruntime/engine/engine.h282 // Example usage:COMMENT
LOWruntime/engine/engine.h300 // Example usage:COMMENT
LOWruntime/engine/engine_factory.h44// Example usage:COMMENT
LOWruntime/conversation/conversation.h135 // Example usage:COMMENT
LOWruntime/conversation/conversation.h481// Example usage:COMMENT
LOWruntime/conversation/conversation.h609 // Example usage:COMMENT
LOWswift/Conversation.swift41/// Example usage:COMMENT
LOWswift/EmbeddingEngine.swift22/// Example usage:COMMENT
LOWswift/Engine.swift22/// Example usage:COMMENT
Self-Referential Comments5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUM…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py33# Define the placeholder used by the evaluation harness.COMMENT
MEDIUMpython/litert_lm_cli/main_test.py836 # Create a dummy source file to simulate unpacking a local .litertlm fileCOMMENT
MEDIUMpython/litert_lm_builder/litertlm_peek_test.py110 # Create a temporary directory for dumping files.COMMENT
MEDIUMpython/litert_lm_builder/litertlm_peek_test.py194 # Create a temporary directory for dumping files.COMMENT
MEDIUM.github/workflows/ml-ci-build-win.yml152 # Create a dedicated directory on the big drive for the B: mountCOMMENT
AI Slop Vocabulary6 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMpython/litert_lm/api_test.py28 """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.py33# Define the placeholder used by the evaluation harness.COMMENT
LOWpython/litert_lm_cli/main_test.py417 # Since we are in an isolated filesystem, we'll just use simple namesCOMMENT
LOWpython/litert_lm_cli/main_test.py422 # or just use paths that will exist.COMMENT
LOWpython/litert_lm_builder/litertlm_builder.py1581 # This is expected if the file is in text format. We'll just pass and tryCOMMENT
MEDIUM…ntime/framework/resource_management/resource_manager.h45// as the LlmExecutor, enabling multiple sessions to utilize it concurrently.COMMENT
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/interfaces.py442CODE
LOWpython/litert_lm/interfaces.py609CODE
LOWpython/litert_lm/conversation.py44CODE
LOWpython/litert_lm/engine.py56CODE
LOWpython/litert_lm/engine.py273CODE
LOWpython/litert_lm_cli/commands/run.py172CODE
LOWpython/litert_lm_cli/commands/run.py572CODE
LOWpython/litert_lm_cli/commands/benchmark.py37CODE
LOWpython/litert_lm_cli/commands/benchmark.py244CODE
Modern AI Meta-Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md68[Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge](https://developers.googlebCODE
MEDIUMREADME.md71[Bring state-of-the-art agentic skills to the edge with Gemma 4](https://developers.googleblog.com/bring-state-of-the-arCODE
MEDIUMdocs/getting-started/cmake.md44├── sentencepiece.cmake # Primary orchestration module (ExternalProject_Add)CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_cli/bundle_pypi_package.sh82# Check if wheels were pre-fetched by Kokoro via gfile_resources into KOKORO_GFILE_DIRCOMMENT
LOWpython/litert_lm_cli/main_test.py153 # Check if expected keys are added.COMMENT
LOWpython/litert_lm_cli/main_test.py155 # Check if enter (ControlM), c-j (ControlJ), esc+enter, c-c (ControlC).COMMENT
LOWpython/litert_lm_builder/litertlm_peek_test.py132 # Check if files were dumped in the specified directory.COMMENT
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_cli/huggingface_download_test.py80 repo_id=repo_id, filename=filename, token="fake-token"CODE
LOWpython/litert_lm_cli/huggingface_download_test.py96 self.assertEqual(req.get_header("Authorization"), "Bearer fake-token")CODE
LOW⚡python/litert_lm_cli/huggingface_download_test.py179 repo_id=repo_id, token="fake-token"CODE
LOW⚡python/litert_lm_cli/huggingface_download_test.py185 self.assertEqual(req.get_header("Authorization"), "Bearer fake-token")CODE
LOWpython/litert_lm_cli/huggingface_download_test.py204 repo_id=repo_id, token="fake-token"CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpython/litert_lm_builder/litertlm_builder_cli.py50# Section 1: SP_Tokenizer (you can also use HF_Tokenizer)COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_cli/config.py120def set_config_path(config_path: str | None) -> None:CODE
LOWpython/litert_lm_builder/__init__.py31__all__ = [CODE
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcmake/packages/tflite/shims/CMakeLists-shim.txt19# WARNING: This is an experimental that is subject to change.COMMENT