AI Slop Code RIsk Monitor

ollama/ollama-python

Ollama Python library

26.1 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for ollama/ollama-python, a Python project with 10,589 GitHub stars. SynthScan examined 6,967 lines of code across 51 source files, recording 153 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 26.1 (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.

26.1
Adjusted Signal
26.1
Raw Pattern Score
100%
Time Factor
2026-09-29
Last Push
10.6K
Stars
Python
Language
7.0K
Lines of Code
51
Files
153
Pattern Hits
2026-10-12
Scan Date
0.18
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 52.2/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 31.4/100 · MEDIUM

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

Agent Over-Engineering Ratio 55.2/100 · HIGH

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

PR Review Velocity Impact 77.2/100 · CRITICAL

Which changes need focused human review? 153 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

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

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 9MEDIUM 4LOW 140

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 153 distinct pattern matches across 12 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.

Hyper-Verbose Identifiers77 hits · 70 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py8def test_function_to_tool_conversion():CODE
LOWtests/test_utils.py31def test_function_with_no_args():CODE
LOWtests/test_utils.py47def test_function_with_all_types():CODE
LOWtests/test_utils.py116def test_function_docstring_parsing():CODE
LOWtests/test_utils.py140def test_skewed_docstring_parsing():CODE
LOWtests/test_utils.py160def test_function_with_no_docstring():CODE
LOWtests/test_utils.py174def test_function_with_only_description():CODE
LOWtests/test_utils.py184 def only_description_with_args(x: int, y: int):CODE
LOWtests/test_utils.py203def test_function_with_yields():CODE
LOWtests/test_utils.py222def test_function_with_no_types():CODE
LOWtests/test_utils.py233def test_function_with_parentheses():CODE
LOWtests/test_utils.py244 def func_with_parentheses_and_args(a: int, b: int):CODE
LOWtests/test_systemone.py17async def test_systemone_wire_and_answers(variant, monkeypatch):CODE
LOWtests/test_systemone.py78async def test_systemone_http_errors(client_type, status, message):CODE
LOWtests/test_type_serialization.py10def test_image_serialization_bytes():CODE
LOW⚡tests/test_type_serialization.py29def test_image_serialization_plain_string():CODE
LOW⚡tests/test_type_serialization.py34def test_image_serialization_path():CODE
LOW⚡tests/test_type_serialization.py42def test_image_serialization_string_path():CODE
LOWtests/test_type_serialization.py59def test_image_serialization_string_path_uppercase_extension(extension):CODE
LOWtests/test_type_serialization.py71def test_create_request_serialization():CODE
LOW⚡tests/test_type_serialization.py86def test_create_request_serialization_exclude_none_true():CODE
LOW⚡tests/test_type_serialization.py95def test_create_request_serialization_exclude_none_false():CODE
LOW⚡tests/test_type_serialization.py104def test_create_request_serialization_license_list():CODE
LOW⚡tests/test_type_serialization.py111def test_think_model_defined_levels_serialization(level):CODE
LOW⚡tests/test_type_serialization.py121def test_think_boolean_serialization():CODE
LOW⚡tests/test_client.py1374async def test_arbitrary_roles_accepted_in_message_request_async(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1382def test_client_web_search_requires_bearer_auth_header(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1391def test_client_web_fetch_requires_bearer_auth_header(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1414def test_client_web_search_with_env_api_key(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1422def test_client_web_fetch_with_env_api_key(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1430def test_client_web_search_with_explicit_bearer_header(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1438def test_client_web_fetch_with_explicit_bearer_header(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1446def test_client_bearer_header_from_env(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1453def test_client_explicit_bearer_header_overrides_env(monkeypatch: pytest.MonkeyPatch):CODE
LOW⚡tests/test_client.py1475def test_client_context_manager():CODE
LOW⚡tests/test_client.py1484async def test_async_client_context_manager():CODE
LOW⚡tests/test_client.py1492def test_generate_think_annotation_matches_chat():CODE
LOWtests/test_client.py65def test_client_chat_with_logprobs(httpserver: HTTPServer):CODE
LOWtests/test_client.py194def test_client_chat_format_json(httpserver: HTTPServer):CODE
LOWtests/test_client.py222def test_client_chat_format_pydantic(httpserver: HTTPServer):CODE
LOWtests/test_client.py254async def test_async_client_chat_format_json(httpserver: HTTPServer):CODE
LOWtests/test_client.py282async def test_async_client_chat_format_pydantic(httpserver: HTTPServer):CODE
LOWtests/test_client.py336def test_client_generate_with_logprobs(httpserver: HTTPServer):CODE
LOWtests/test_client.py370def test_client_generate_with_image_type(httpserver: HTTPServer):CODE
LOWtests/test_client.py393def test_client_generate_with_invalid_image(httpserver: HTTPServer):CODE
LOWtests/test_client.py410def test_client_generate_stream(httpserver: HTTPServer):CODE
LOWtests/test_client.py445def test_client_generate_images(httpserver: HTTPServer):CODE
LOWtests/test_client.py472def test_client_generate_format_json(httpserver: HTTPServer):CODE
LOWtests/test_client.py495def test_client_generate_format_pydantic(httpserver: HTTPServer):CODE
LOWtests/test_client.py522async def test_async_client_generate_format_json(httpserver: HTTPServer):CODE
LOWtests/test_client.py545async def test_async_client_generate_format_pydantic(httpserver: HTTPServer):CODE
LOWtests/test_client.py572def test_client_generate_image(httpserver: HTTPServer):CODE
LOWtests/test_client.py600def test_client_generate_image_stream(httpserver: HTTPServer):CODE
LOWtests/test_client.py656async def test_async_client_generate_image(httpserver: HTTPServer):CODE
LOWtests/test_client.py778def test_client_create_with_blob(httpserver: HTTPServer):CODE
LOWtests/test_client.py796def test_client_create_with_parameters_roundtrip(httpserver: HTTPServer):CODE
LOWtests/test_client.py832def test_client_create_from_library(httpserver: HTTPServer):CODE
LOWtests/test_client.py859def test_client_create_blob_exists(httpserver: HTTPServer):CODE
LOWtests/test_client.py910async def test_async_client_chat_stream(httpserver: HTTPServer):CODE
LOWtests/test_client.py949async def test_async_client_chat_images(httpserver: HTTPServer):CODE
17 more matches not shown…
Unused Imports33 hits · 28 pts
SeverityFileLineSnippetContext
LOWexamples/web_search_gpt_oss_helper.py1CODE
LOWexamples/web-search-mcp.py16CODE
LOWollama/__init__.py1CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/__init__.py2CODE
LOWollama/_utils.py1CODE
Cross-Language Confusion4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHtests/test_client.py738 response = client.push('dummy')CODE
HIGHtests/test_client.py762 response = client.push('dummy', stream=True)CODE
HIGHtests/test_client.py1124 response = await client.push('dummy')CODE
HIGHtests/test_client.py1148 response = await client.push('dummy', stream=True)CODE
AI Structural Patterns18 hits · 16 pts
SeverityFileLineSnippetContext
LOWollama/_client.py206CODE
LOWollama/_client.py230CODE
LOWollama/_client.py253CODE
LOWollama/_client.py313CODE
LOWollama/_client.py329CODE
LOWollama/_client.py344CODE
LOWollama/_client.py563CODE
LOWollama/_client.py580CODE
LOWollama/_client.py596CODE
LOWollama/_client.py862CODE
LOWollama/_client.py886CODE
LOWollama/_client.py909CODE
LOWollama/_client.py968CODE
LOWollama/_client.py984CODE
LOWollama/_client.py999CODE
LOWollama/_client.py1219CODE
LOWollama/_client.py1236CODE
LOWollama/_client.py1252CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHollama/_types.py173except Exception:CODE
HIGHollama/_client.py1474except ValueError:CODE
HIGHollama/_client.py1388except Exception:CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMexamples/structured-outputs-image.py9# Define the schema for image objectsCOMMENT
MEDIUMexamples/async-structured-outputs.py8# Define the schema for the responseCOMMENT
MEDIUMexamples/structured-outputs.py6# Define the schema for the responseCOMMENT
Excessive Try-Catch Wrapping7 hits · 8 pts
SeverityFileLineSnippetContext
LOWexamples/web_search_gpt_oss_helper.py67 except Exception:CODE
LOWexamples/web-search-gpt-oss.py92 except Exception as e:CODE
LOWexamples/web-search-mcp.py28except Exception:CODE
LOWollama/_types.py173 except Exception:CODE
LOWollama/_types.py185 except Exception:CODE
MEDIUMollama/_client.py141def _request_raw(self, *args, **kwargs):CODE
LOWollama/_client.py1388 except Exception:CODE
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHREADME.md101export OLLAMA_API_KEY=your_api_keyCODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHollama/_client.py702 Performs a web search Args: query: The query to search for max_results: The maximum number of resuSTRING
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWexamples/web_search_gpt_oss_helper.py81 def set_data(self, data: BrowserStateData) -> None:CODE
LOWexamples/web_search_gpt_oss_helper.py97 def set_client(self, client: Client) -> None:CODE
LOWollama/__init__.py34__all__ = [CODE
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWexamples/web_search_gpt_oss_helper.py124CODE
LOWollama/_client.py178CODE
Redundant / Tautological Comments1 hit · 1 pts
SeverityFileLineSnippetContext
LOWexamples/structured-outputs-image.py45 options={'temperature': 0}, # Set temperature to 0 for more deterministic outputCODE