Repository Analysis

EricLBuehler/mistral.rs

Fast, flexible LLM inference

3.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of EricLBuehler/mistral.rs, a Rust project with 7,475 GitHub stars. SynthScan v2.0 examined 385,607 lines of code across 1279 source files, recording 734 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 3.3 places this repository in the Likely human-written 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).

3.3
Adjusted Score
3.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
7.5K
Stars
Rust
Language
385.6K
Lines of Code
1.3K
Files
734
Pattern Hits
2026-07-14
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

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.

CRITICAL 0HIGH 22MEDIUM 202LOW 510

Directory Score Breakdown

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.

Pattern Findings

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

Over-Commented Block366 hits · 358 pts
SeverityFileLineSnippetContext
LOWmistralrs-macros/README.md1# mistralrs-macrosCOMMENT
LOWmistralrs-macros/src/lib.rs1//! Proc macros for ergonomic tool definition in mistral.rsCOMMENT
LOWmistralrs-macros/src/lib.rs21//! #[description = "The city name"]COMMENT
LOWmistralrs-macros/src/lib.rs81}COMMENT
LOWmistralrs-macros/src/lib.rs261 .collect();COMMENT
LOWmistralrs-macros/src/lib.rs321COMMENT
LOWmistralrs-mcp/src/client.rs161COMMENT
LOWmistralrs-mcp/src/client.rs181/// # ExampleCOMMENT
LOWmistralrs-mcp/src/client.rs241COMMENT
LOWmistralrs-mcp/src/client.rs261 /// - A callback function that executes the tool with timeout and concurrency controlsCOMMENT
LOWmistralrs-mcp/src/client.rs281 &self.tool_callbacks_with_toolsCOMMENT
LOWmistralrs-mcp/src/client.rs301 /// # ExampleCOMMENT
LOWmistralrs-mcp/src/client.rs321COMMENT
LOWmistralrs-mcp/src/client.rs661 );COMMENT
LOWmistralrs-mcp/src/client.rs681 /// let mut client = McpClient::new(config);COMMENT
LOWmistralrs-mcp/src/client.rs701 self.tool_callbacks_with_tools.clear();COMMENT
LOWmistralrs-mcp/src/client.rs741 ///COMMENT
LOWmistralrs-mcp/src/client.rs781 }COMMENT
LOWmistralrs-mcp/src/client.rs801 /// # }COMMENT
LOWmistralrs-mcp/src/client.rs821 /// // Add a new server dynamicallyCOMMENT
LOWmistralrs-mcp/src/client.rs861 /// Closes the connection and removes the server from the configuration.COMMENT
LOWmistralrs-mcp/src/client.rs901 /// ```rust,no_runCOMMENT
LOWmistralrs-mcp/src/client.rs921 }COMMENT
LOWmistralrs-mcp/src/client.rs941 /// ```COMMENT
LOWmistralrs-mcp/src/client.rs961 /// # }COMMENT
LOWmistralrs-mcp/src/client.rs1021COMMENT
LOWmistralrs-mcp/src/client.rs1041 // ==================== Status / Convenience Methods ====================COMMENT
LOWmistralrs-mcp/src/client.rs1061COMMENT
LOWmistralrs-mcp/src/client.rs1081 }COMMENT
LOWmistralrs-mcp/src/client.rs1121 /// Returns a vector of (server_id, resource) tuples.COMMENT
LOWmistralrs-mcp/src/transport.rs61COMMENT
LOWmistralrs-mcp/src/transport.rs81/// - **Error Handling**: Comprehensive JSON-RPC and HTTP error handlingCOMMENT
LOWmistralrs-mcp/src/transport.rs101/// headers.insert("X-API-Version".to_string(), "v1".to_string());COMMENT
LOWmistralrs-mcp/src/transport.rs121/// - Standard JSON responsesCOMMENT
LOWmistralrs-mcp/src/transport.rs141 /// # ReturnsCOMMENT
LOWmistralrs-mcp/src/transport.rs161 /// NoneCOMMENT
LOWmistralrs-mcp/src/transport.rs201 /// * `sse_text` - Raw SSE response text from the serverCOMMENT
LOWmistralrs-mcp/src/transport.rs261 /// # ArgumentsCOMMENT
LOWmistralrs-mcp/src/transport.rs281 /// use mistralrs_mcp::transport::{HttpTransport, McpTransport};COMMENT
LOWmistralrs-mcp/src/transport.rs341 ///COMMENT
LOWmistralrs-mcp/src/transport.rs401/// - **Process Isolation**: Each MCP server runs in its own process for securityCOMMENT
LOWmistralrs-mcp/src/transport.rs421///COMMENT
LOWmistralrs-mcp/src/transport.rs441/// Some(env) // Environment variablesCOMMENT
LOWmistralrs-mcp/src/transport.rs461///COMMENT
LOWmistralrs-mcp/src/transport.rs481 /// # ArgumentsCOMMENT
LOWmistralrs-mcp/src/transport.rs501 ///COMMENT
LOWmistralrs-mcp/src/transport.rs581 /// a line-delimited JSON request to the process stdin and reads theCOMMENT
LOWmistralrs-mcp/src/transport.rs601 ///COMMENT
LOWmistralrs-mcp/src/transport.rs661 ///COMMENT
LOWmistralrs-mcp/src/transport.rs681 ///COMMENT
LOWmistralrs-mcp/src/transport.rs721/// - **Bearer Token Support**: Authentication via Authorization header during handshakeCOMMENT
LOWmistralrs-mcp/src/transport.rs741/// let mut headers = HashMap::new();COMMENT
LOWmistralrs-mcp/src/transport.rs781 /// # ReturnsCOMMENT
LOWmistralrs-mcp/src/transport.rs801 /// headers.insert("Authorization".to_string(), "Bearer token123".to_string());COMMENT
LOWmistralrs-mcp/src/transport.rs861 /// - Unique request ID generation for response correlationCOMMENT
LOWmistralrs-mcp/src/transport.rs881 ///COMMENT
LOWmistralrs-mcp/src/transport.rs961 /// Sends a WebSocket ping frame to test connection healthCOMMENT
LOWmistralrs-mcp/src/transport.rs981 Ok(())COMMENT
LOWmistralrs-mcp/src/lib.rs1//! Model Context Protocol (MCP) Client ImplementationCOMMENT
LOWmistralrs-mcp/src/lib.rs21//!COMMENT
306 more matches not shown…
Decorative Section Separators100 hits · 300 pts
SeverityFileLineSnippetContext
MEDIUMdocs/src/content/docs/examples/python/qwen3.md42# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/python/qwen3.md44# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/python/qwen3.md67# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/python/qwen3.md69# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/python/qwen3.md94# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/python/qwen3.md96# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md59# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md61# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md82# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md84# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md109# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/smollm3.md111# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md59# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md61# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md82# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md84# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md107# ------------------------------------------------------------------COMMENT
MEDIUMdocs/src/content/docs/examples/server/qwen3.md109# ------------------------------------------------------------------COMMENT
MEDIUMmistralrs-quant/src/utils/ops.rs817// ────────────────────────────── ArgSort / Sort ────────────────────────────────COMMENT
MEDIUMmistralrs-quant/src/utils/ops.rs3486 // ─────────────────────────────── Sort / ArgSort ────────────────────────────────COMMENT
MEDIUMmistralrs-quant/src/utils/ops.rs3526 // ─────────────────────────────── 2 048-element vector ────────────────────────────────COMMENT
MEDIUMexamples/python/qwen3.py28# ------------------------------------------------------------------COMMENT
MEDIUMexamples/python/qwen3.py30# ------------------------------------------------------------------COMMENT
MEDIUMexamples/python/qwen3.py53# ------------------------------------------------------------------COMMENT
MEDIUMexamples/python/qwen3.py55# ------------------------------------------------------------------COMMENT
MEDIUMexamples/python/qwen3.py80# ------------------------------------------------------------------COMMENT
MEDIUMexamples/python/qwen3.py82# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py45# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py47# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py68# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py70# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py93# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/qwen3.py95# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py45# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py47# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py68# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py70# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py95# ------------------------------------------------------------------COMMENT
MEDIUMexamples/server/smollm3.py97# ------------------------------------------------------------------COMMENT
MEDIUMscripts/upload_wheels.py23# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py25# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py51# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py53# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py106# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py108# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py184# ============================================================================COMMENT
MEDIUMscripts/upload_wheels.py186# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py28# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py30# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py76# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py78# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py203# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py205# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py252# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py254# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py278# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py280# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py423# ============================================================================COMMENT
MEDIUMscripts/build_wheels.py425# ============================================================================COMMENT
MEDIUM…tralrs-core/src/pipeline/loaders/multimodal_loaders.rs7089// ─── Voxtral ────────────────────────────────────────────────────────────────COMMENT
40 more matches not shown…
Modern AI Meta-Vocabulary69 hits · 207 pts
SeverityFileLineSnippetContext
MEDIUMmistralrs-macros/src/lib.rs4//! that can be used with the mistral.rs agentic loop.COMMENT
MEDIUMmistralrs-macros/src/lib.rs86/// used with the mistral.rs agentic loop. It generates:COMMENT
MEDIUMmistralrs-mcp/src/tools.rs135/// Context provided to tool callbacks by the agentic loop.COMMENT
MEDIUMmistralrs-cli/webui/src/lib/stores/chat.svelte.ts532 // Fork the agentic session so the edited branch diverges cleanly from the prior turns.COMMENT
MEDIUMmistralrs-cli/webui/src/lib/stores/chat.svelte.ts581 // Fork the agentic session so branches have independent state. Count complete turns BEFORE theCOMMENT
MEDIUMmistralrs-cli/src/ui/types.rs57 /// Server-side agentic session ID. Full session lives in `chat_<id>.session.json`.COMMENT
MEDIUMmistralrs-cli/src/ui/handlers/api.rs741/// Export the agentic session to a sidecar file beside the chat. Stamps the session_id into the chat JSON.COMMENT
MEDIUMmistralrs-cli/src/args/server.rs30 /// Default maximum tool-call rounds for the agentic loop.COMMENT
MEDIUMmistralrs-cli/src/args/mod.rs654 /// Build a local agent: enables web search, Python code execution, and shell execution, runs the agenticCOMMENT
MEDIUMmistralrs-cli/src/args/mod.rs657 #[arg(long, alias = "agentic")]COMMENT
MEDIUMmistralrs-pyo3/src/lib.rs1870 /// Export an agentic session as a JSON string. `None` if missing.COMMENT
MEDIUMmistralrs-pyo3/src/lib.rs1889 /// Import an agentic session from a JSON string. Replaces any existing session with the same ID.COMMENT
MEDIUMmistralrs-pyo3/src/lib.rs1904 /// Delete an agentic session. Returns whether the session existed.COMMENT
MEDIUMmistralrs-pyo3/src/lib.rs1912 /// List all stored agentic session IDs.COMMENT
MEDIUMmistralrs-pyo3/src/requests.rs279 /// Session ID for persistent agentic state across requests.COMMENT
MEDIUM…rc/content/docs/guides/serve/openai-compatible-apis.md82## Tools, structured output, and agentic featuresCOMMENT
MEDIUMdocs/src/content/docs/examples/python/agentic-tools.md118 # max_tool_rounds enables the agentic loop: model calls tools,COMMENT
MEDIUMdocs/src/content/docs/examples/rust/advanced/agent.md23//! Example demonstrating the agentic loop with tool callingCOMMENT
MEDIUMdocs/src/content/docs/examples/rust/advanced/agent.md28//! 3. Run the agentic loop (non-streaming)COMMENT
MEDIUM…content/docs/examples/rust/advanced/agent-streaming.md24//! Example demonstrating the agentic loop with streaming outputCOMMENT
MEDIUM…content/docs/examples/rust/advanced/agent-streaming.md29//! 3. Run the agentic loop with streaming outputCOMMENT
MEDIUM…src/content/docs/examples/rust/advanced/file-inputs.md22//! the prompt and can be paginated with the built-in file tools when the agenticCOMMENT
MEDIUM…lrs-server-core/src/mistralrs_server_router_builder.rs50/// Server-level defaults for agentic features.COMMENT
MEDIUM…lrs-server-core/src/mistralrs_server_router_builder.rs107 /// Server-level agentic defaultsCOMMENT
MEDIUM…lrs-server-core/src/mistralrs_server_router_builder.rs190 /// Sets the default maximum tool-call rounds for the agentic loop.COMMENT
MEDIUMmistralrs-server-core/src/approvals.rs181/// Decision payload for a pending agentic tool approval.COMMENT
MEDIUMmistralrs-server-core/src/chat_completion.rs75/// produced by the agentic loop are still reachable via `GET /v1/files/{id}` butCOMMENT
MEDIUMmistralrs-server-core/src/responses.rs542 /// Maximum number of agentic tool rounds (mistral.rs extension)COMMENT
MEDIUMmistralrs-server-core/src/files.rs57/// Which agentic tool produced the file, and when in the session.COMMENT
MEDIUM…tralrs-server-core/src/mistralrs_for_server_builder.rs1359/// Creates a search embedding model configuration for agentic search reranking.COMMENT
MEDIUMmistralrs-server-core/src/openai.rs1091 /// Permission policy for agentic tools.COMMENT
MEDIUMmistralrs-server-core/src/openai.rs1104 /// Persistent agentic state. If `None`, a new session is created and the ID is returned in the response.COMMENT
MEDIUMexamples/python/agentic_tools.py96 # max_tool_rounds enables the agentic loop: model calls tools,COMMENT
MEDIUMmistralrs-core/src/response.rs170 /// Ordered record of all tool calls made during the agentic loop.COMMENT
MEDIUMmistralrs-core/src/response.rs176 /// Reuse in later requests to keep agentic state across messages.COMMENT
MEDIUMmistralrs-core/src/response.rs266/// Tool-specific structured progress data for agentic tool calls.COMMENT
MEDIUMmistralrs-core/src/response.rs301/// Phase of an agentic tool call.COMMENT
MEDIUMmistralrs-core/src/response.rs354 /// Progress event emitted by the agentic loop during tool execution.COMMENT
MEDIUMmistralrs-core/src/request.rs314 /// When true, registered code-execution tools are injected and the agentic loop runs.COMMENT
MEDIUMmistralrs-core/src/request.rs317 /// When true, registered shell tools are injected and the agentic loop runs.COMMENT
MEDIUMmistralrs-core/src/request.rs338 /// Persistent agentic state. If `None`, a new session is created and the ID is returned in the response.COMMENT
MEDIUMmistralrs-core/src/lib.rs1449 /// Export an agentic session by ID. Bundles the session's files (full bodies). `None` if missing.COMMENT
MEDIUMmistralrs-core/src/lib.rs1513 /// Delete an agentic session. Returns whether the session existed.COMMENT
MEDIUMmistralrs-core/src/files/store.rs11/// Per-entry TTL. Matches the agentic session default.COMMENT
MEDIUMmistralrs-core/src/files/mod.rs1//! Typed file outputs from agentic runs.COMMENT
MEDIUMmistralrs-core/src/files/mod.rs87/// A file produced by an agentic run.COMMENT
MEDIUMmistralrs-core/src/files/inject.rs1//! Helpers for surfacing `File`s to the model and adding the required-files contract to agentic tools.COMMENT
MEDIUMmistralrs-core/src/engine/agentic_loop.rs1261 // Prevent the inner probe from re-entering the agentic loop or being rejectedCOMMENT
MEDIUMmistralrs-core/src/engine/agentic_loop.rs1262 // by the files-without-agentic-surface guard in `add_request`.COMMENT
MEDIUMmistralrs-core/src/engine/agentic_session.rs17/// A stored agentic conversation, tool call/response messages included.COMMENT
MEDIUMmistralrs/examples/advanced/file_inputs/main.rs4//! the prompt and can be paginated with the built-in file tools when the agenticCOMMENT
MEDIUMmistralrs/examples/advanced/agent/main.rs1//! Example demonstrating the agentic loop with tool callingCOMMENT
MEDIUMmistralrs/examples/advanced/agent/main.rs6//! 3. Run the agentic loop (non-streaming)COMMENT
MEDIUMmistralrs/examples/advanced/agent_streaming/main.rs1//! Example demonstrating the agentic loop with streaming outputCOMMENT
MEDIUMmistralrs/examples/advanced/agent_streaming/main.rs6//! 3. Run the agentic loop with streaming outputCOMMENT
MEDIUMmistralrs/src/agent.rs3//! This module provides an `Agent` that runs an agentic loop with tool calling.COMMENT
MEDIUMmistralrs/src/agent.rs77/// Configuration for the agentic loopCOMMENT
MEDIUMmistralrs/src/agent.rs468/// An agent that runs an agentic loop with tool callingCOMMENT
MEDIUMmistralrs/src/agent.rs495 /// Run the agentic loop with the given user messageCOMMENT
MEDIUMmistralrs/src/messages.rs49 /// Maximum tool-call rounds for the agentic loop.COMMENT
9 more matches not shown…
Cross-File Repetition22 hits · 110 pts
SeverityFileLineSnippetContext
HIGHdocs/src/content/docs/examples/python/lfm2.md0liquidai lfm2.5 moe text generation with the python sdk.STRING
HIGHexamples/python/lfm2.py0liquidai lfm2.5 moe text generation with the python sdk.STRING
HIGHdocs/src/content/docs/examples/python/lfm2-moe.md0liquidai lfm2.5 moe text generation with the python sdk.STRING
HIGHexamples/python/lfm2_moe.py0liquidai lfm2.5 moe text generation with the python sdk.STRING
HIGHdocs/src/content/docs/examples/python/shell-skills.md0--- name: invoice-auditor description: checks invoice line items and totals with a local python helper. --- # invoice auSTRING
HIGHdocs/src/content/docs/examples/server/skills.md0--- name: invoice-auditor description: checks invoice line items and totals with a local python helper. --- # invoice auSTRING
HIGHexamples/python/shell_skills.py0--- name: invoice-auditor description: checks invoice line items and totals with a local python helper. --- # invoice auSTRING
HIGHexamples/server/skills.py0--- name: invoice-auditor description: checks invoice line items and totals with a local python helper. --- # invoice auSTRING
HIGHdocs/src/content/docs/examples/python/shell-skills.md0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGH…s/src/content/docs/examples/server/anthropic-skills.md0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGHdocs/src/content/docs/examples/server/skills.md0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGHexamples/python/shell_skills.py0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGHexamples/server/skills.py0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGHexamples/server/anthropic_skills.py0item,amount hosting,25.00 storage,12.50 support,17.50 declared_total,55.00STRING
HIGHdocs/src/content/docs/examples/python/shell-skills.md0import csv import sys with open(sys.argv[1], newline="") as handle: rows = list(csv.dictreader(handle)) declared = floatSTRING
HIGHdocs/src/content/docs/examples/server/skills.md0import csv import sys with open(sys.argv[1], newline="") as handle: rows = list(csv.dictreader(handle)) declared = floatSTRING
HIGHexamples/python/shell_skills.py0import csv import sys with open(sys.argv[1], newline="") as handle: rows = list(csv.dictreader(handle)) declared = floatSTRING
HIGHexamples/server/skills.py0import csv import sys with open(sys.argv[1], newline="") as handle: rows = list(csv.dictreader(handle)) declared = floatSTRING
HIGHdocs/src/content/docs/examples/server/anthropic-chat.md0streaming anthropic messages api example for the mistral.rs server. run the server: mistralrs serve -p 1234 -m qwen/qwenSTRING
HIGHexamples/server/anthropic_chat.py0streaming anthropic messages api example for the mistral.rs server. run the server: mistralrs serve -p 1234 -m qwen/qwenSTRING
HIGH…rc/content/docs/examples/server/anthropic-streaming.md0streaming anthropic messages api example for the mistral.rs server. run the server: mistralrs serve -p 1234 -m qwen/qwenSTRING
HIGHexamples/server/anthropic_streaming.py0streaming anthropic messages api example for the mistral.rs server. run the server: mistralrs serve -p 1234 -m qwen/qwenSTRING
Structural Annotation Overuse32 hits · 61 pts
SeverityFileLineSnippetContext
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs147 // Step 1: Absorb w_uk into queryCOMMENT
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs155 // Step 2: Gather cached ckv/kpe if any context existsCOMMENT
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs165 // Step 3: Per-sequence attention in latent spaceCOMMENT
LOWdocs/src/content/docs/examples/python/tool-call.md62# Step 1: Model generates a tool callCOMMENT
LOWdocs/src/content/docs/examples/python/tool-call.md78# Step 2: Send the result backCOMMENT
LOWdocs/src/content/docs/examples/python/tool-call.md87# Step 3: Model produces the final answerCOMMENT
LOWdocs/src/content/docs/examples/server/tool-calling.md61# Step 1: Model generates a tool callCOMMENT
LOWdocs/src/content/docs/examples/server/tool-calling.md68# Step 2: Execute the tool locallyCOMMENT
LOWdocs/src/content/docs/examples/server/tool-calling.md74# Step 3: Send the result backCOMMENT
LOWdocs/src/content/docs/examples/server/tool-calling.md100# Step 4: Model produces the final answerCOMMENT
LOW…content/docs/examples/server/anthropic-tool-calling.md73# Step 1: Model generates a tool call.COMMENT
LOW…content/docs/examples/server/anthropic-tool-calling.md92# Step 2: Execute the tool locally.COMMENT
LOW…content/docs/examples/server/anthropic-tool-calling.md96# Step 3: Send the result back.COMMENT
LOW…content/docs/examples/server/anthropic-tool-calling.md111# Step 4: Model produces the final answer.COMMENT
LOWmistralrs-quant/src/gguf/cuda.rs922 // Step 1: Quantize input to Q8_1 (shared between gate and up)COMMENT
LOWmistralrs-quant/src/gguf/cuda.rs927 // Step 2: Fused gate+up+activation+multiplyCOMMENT
LOWmistralrs-quant/src/gguf/cuda.rs987 // Step 3: Quantize the intermediate output for down projectionCOMMENT
LOWmistralrs-quant/src/gguf/cuda.rs997 // Step 4: Fused down+aggregate with topk_weights and atomicAddCOMMENT
LOWexamples/python/tool_call.py47# Step 1: Model generates a tool callCOMMENT
LOWexamples/python/tool_call.py63# Step 2: Send the result backCOMMENT
LOWexamples/python/tool_call.py72# Step 3: Model produces the final answerCOMMENT
LOWexamples/server/anthropic_tool_calling.py55# Step 1: Model generates a tool call.COMMENT
LOWexamples/server/anthropic_tool_calling.py74# Step 2: Execute the tool locally.COMMENT
LOWexamples/server/anthropic_tool_calling.py78# Step 3: Send the result back.COMMENT
LOWexamples/server/anthropic_tool_calling.py93# Step 4: Model produces the final answer.COMMENT
LOWexamples/server/tool_calling.py43# Step 1: Model generates a tool callCOMMENT
LOWexamples/server/tool_calling.py50# Step 2: Execute the tool locallyCOMMENT
LOWexamples/server/tool_calling.py56# Step 3: Send the result backCOMMENT
LOWexamples/server/tool_calling.py82# Step 4: Model produces the final answerCOMMENT
LOWmistralrs-core/src/utils/mod.rs129 // Step 1: Add all choices to groupsCOMMENT
LOWmistralrs-core/src/utils/mod.rs163 // Step 2: Respond with all groupsCOMMENT
LOWmistralrs-core/src/utils/mod.rs220 // Step 3: Set state - This cannot be done in Step 2 as `group` is locking the refcellCOMMENT
Excessive Try-Catch Wrapping48 hits · 60 pts
SeverityFileLineSnippetContext
LOWmistralrs-code-exec/python/executor.py119 except Exception:CODE
LOWmistralrs-code-exec/python/executor.py130 except Exception:CODE
LOWmistralrs-code-exec/python/executor.py154 except Exception:CODE
LOWmistralrs-code-exec/python/executor.py175 except Exception:CODE
LOWmistralrs-code-exec/python/executor.py308 except Exception as e:CODE
LOWmistralrs-code-exec/python/executor.py384 except Exception:CODE
LOWmistralrs-code-exec/python/executor.py471 except Exception as e:CODE
LOWdocs/scripts/render_pyi.py152 except Exception:CODE
LOWdocs/src/content/docs/examples/python/agentic-tools.md56 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md108 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md157 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md210 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md238 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md246 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md252 except Exception as e:CODE
LOW…s/src/content/docs/examples/python/custom-tool-call.md34 except Exception:CODE
LOWdocs/src/content/docs/examples/python/custom-search.md33 except Exception:CODE
LOWdocs/src/content/docs/examples/server/mcp-chat.md134 except Exception as e:CODE
MEDIUMdocs/src/content/docs/examples/server/mcp-chat.md135 print(f"Error making request: {e}")CODE
LOWdocs/src/content/docs/examples/server/tool-dispatch.md164 except Exception as e:CODE
MEDIUMdocs/src/content/docs/examples/server/tool-dispatch.md165 print(f"Error: {e}")CODE
LOW…rc/content/docs/examples/server/agentic-tool-rounds.md87 except Exception as e:CODE
MEDIUM…rc/content/docs/examples/server/agentic-tool-rounds.md88 print(f"Error: {e}")CODE
LOW…content/docs/examples/server/streaming-tool-calling.md93 except Exception as e:CODE
LOW…content/docs/examples/server/streaming-tool-calling.md192 except Exception as e:CODE
MEDIUM…s/src/content/docs/examples/server/multi-model-chat.md287 print("Error: Could not connect to server.")CODE
LOWexamples/python/test_multi_model.py89 except Exception as e:CODE
LOWexamples/python/test_multi_model.py138 except Exception as e:CODE
LOWexamples/python/test_multi_model.py191 except Exception as e:CODE
LOWexamples/python/test_multi_model.py219 except Exception as e:CODE
LOWexamples/python/test_multi_model.py227 except Exception as e:CODE
LOWexamples/python/test_multi_model.py233 except Exception as e:CODE
LOWexamples/python/custom_search.py19 except Exception:CODE
LOWexamples/python/agentic_tools.py34 except Exception as e:CODE
LOWexamples/python/custom_tool_call.py20 except Exception:CODE
LOWexamples/server/agentic_tool_rounds.py60 except Exception as e:CODE
MEDIUMexamples/server/agentic_tool_rounds.py61 print(f"Error: {e}")CODE
LOWexamples/server/tool_dispatch.py142 except Exception as e:CODE
MEDIUMexamples/server/tool_dispatch.py143 print(f"Error: {e}")CODE
LOWexamples/server/streaming_tool_calling.py64 except Exception as e:CODE
LOWexamples/server/streaming_tool_calling.py163 except Exception as e:CODE
MEDIUMexamples/server/multi_model_chat.py265 print("Error: Could not connect to server.")CODE
LOWexamples/server/mcp_chat.py109 except Exception as e:CODE
MEDIUMexamples/server/mcp_chat.py110 print(f"Error making request: {e}")CODE
LOWscripts/convert_awq_marlin.py218 except Exception as e:CODE
MEDIUMscripts/convert_awq_marlin.py219 print(f"Error: {e}")CODE
MEDIUMscripts/upload_wheels.py244 print(f"Error: Directory does not exist: {args.directory}", file=sys.stderr)STRING
MEDIUMscripts/build_wheels.py515 print(f"Error: {pkg} cannot be built on this platform", file=sys.stderr)STRING
Verbosity Indicators24 hits · 46 pts
SeverityFileLineSnippetContext
LOWmistralrs-pyo3/src/lib.rs1055 // found when rig is used as client. In this case, we need to check ifCOMMENT
LOWmistralrs-pyo3/src/lib.rs2000 // found when rig is used as client. In this case, we need to check ifCOMMENT
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs147 // Step 1: Absorb w_uk into queryCOMMENT
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs155 // Step 2: Gather cached ckv/kpe if any context existsCOMMENT
LOW…s-paged-attn/src/cuda/backend/context_attention_mla.rs165 // Step 3: Per-sequence attention in latent spaceCOMMENT
LOWmistralrs-server-core/src/chat_completion.rs687 // found when rig is used as client. In this case, we need to check ifCOMMENT
LOWmistralrs-quant/src/gguf/cuda.rs922 // Step 1: Quantize input to Q8_1 (shared between gate and up)COMMENT
LOWmistralrs-quant/src/gguf/cuda.rs927 // Step 2: Fused gate+up+activation+multiplyCOMMENT
LOWmistralrs-quant/src/gguf/cuda.rs987 // Step 3: Quantize the intermediate output for down projectionCOMMENT
LOWmistralrs-quant/src/gguf/cuda.rs997 // Step 4: Fused down+aggregate with topk_weights and atomicAddCOMMENT
LOWexamples/python/tool_call.py47# Step 1: Model generates a tool callCOMMENT
LOWexamples/python/tool_call.py63# Step 2: Send the result backCOMMENT
LOWexamples/python/tool_call.py72# Step 3: Model produces the final answerCOMMENT
LOWexamples/server/anthropic_tool_calling.py55# Step 1: Model generates a tool call.COMMENT
LOWexamples/server/anthropic_tool_calling.py74# Step 2: Execute the tool locally.COMMENT
LOWexamples/server/anthropic_tool_calling.py78# Step 3: Send the result back.COMMENT
LOWexamples/server/anthropic_tool_calling.py93# Step 4: Model produces the final answer.COMMENT
LOWexamples/server/tool_calling.py43# Step 1: Model generates a tool callCOMMENT
LOWexamples/server/tool_calling.py50# Step 2: Execute the tool locallyCOMMENT
LOWexamples/server/tool_calling.py56# Step 3: Send the result backCOMMENT
LOWexamples/server/tool_calling.py82# Step 4: Model produces the final answerCOMMENT
LOWmistralrs-core/src/utils/mod.rs129 // Step 1: Add all choices to groupsCOMMENT
LOWmistralrs-core/src/utils/mod.rs163 // Step 2: Respond with all groupsCOMMENT
LOWmistralrs-core/src/utils/mod.rs220 // Step 3: Set state - This cannot be done in Step 2 as `group` is locking the refcellCOMMENT
AI Slop Vocabulary16 hits · 46 pts
SeverityFileLineSnippetContext
MEDIUMmistralrs-mcp/src/client.rs177/// - **Tool Registration**: Converts MCP tools to internal Tool format for seamless integrationCOMMENT
MEDIUM…tralrs-server-core/src/mistralrs_for_server_builder.rs209 /// Percentage of GPU memory to utilize after allocation of KV cache with PagedAttention, from 0 to 1.COMMENT
MEDIUM…tralrs-server-core/src/mistralrs_for_server_builder.rs526 /// Sets the percentage of GPU memory to utilize for PagedAttention.COMMENT
MEDIUM…tralrs-server-core/src/mistralrs_for_server_builder.rs532 /// Sets the percentage of GPU memory to utilize for PagedAttention if provided.COMMENT
MEDIUMmistralrs-quant/src/distributed/layers.rs1092 // Keep weights as FP8 using BlockwiseFP8 to leverage native FP8 GEMM in gather_forwardCOMMENT
MEDIUMmistralrs-quant/src/distributed/layers.rs1232 // Keep weights as FP8 using BlockwiseFP8 to leverage native FP8 GEMM in gather_forwardCOMMENT
MEDIUMscripts/generate_uqff_card.py84 output += "\n\n## Topologies\n**The following model topologies were used to generate this UQFF file. Only informatioSTRING
MEDIUMmistralrs-core/src/model_selected.rs93 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
MEDIUMmistralrs-core/src/model_selected.rs182 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
MEDIUMmistralrs-core/src/model_selected.rs619 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
MEDIUMmistralrs-core/src/toml_selector.rs75 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
MEDIUMmistralrs-core/src/toml_selector.rs418 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
MEDIUMmistralrs-core/src/vision_models/siglip.rs89 // For robust handling of NaNs, you might need a custom comparison.COMMENT
MEDIUMmistralrs-core/src/vision_models/idefics3/vision.rs98 // For robust handling of NaNs, you might need a custom comparison.COMMENT
MEDIUMmistralrs-core/src/vision_models/idefics2/mod.rs244 // For robust handling of NaNs, you might need a custom comparison.COMMENT
MEDIUMmistralrs/examples/advanced/perplexity/main.rs32 /// Generate and utilize an imatrix to enhance GGUF quantizations.COMMENT
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMexamples/python/test_multi_model.py26 # Create a simple runnerCOMMENT
MEDIUMexamples/python/multi_model_example.py29 # Create a runner with Gemma 4 E4B multimodal modelCOMMENT
MEDIUMexamples/python/gpt_oss.py11# Create a GPT-OSS model runnerCOMMENT
MEDIUMexamples/python/granite.py8# Create a Granite model runnerCOMMENT
MEDIUMexamples/python/smollm3.py8# Create a SmolLM3 model runnerCOMMENT
MEDIUMexamples/server/mcp_chat.py49 # Create a chat completion request that can trigger MCP tool usageCOMMENT
Hyper-Verbose Identifiers17 hits · 17 pts
SeverityFileLineSnippetContext
LOWmistralrs-code-exec/python/executor.py134def capture_matplotlib_figures():CODE
LOW…rc/content/docs/examples/python/multi-model-example.md49def example_runner_with_model_id():CODE
LOW…rc/content/docs/examples/python/multi-model-example.md154def example_streaming_with_models():CODE
LOW…rc/content/docs/examples/python/multi-model-example.md183def example_multi_model_setup():CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md40def test_multi_model_operations():CODE
LOW…s/src/content/docs/examples/python/test-multi-model.md118def test_model_id_in_requests():CODE
LOW…s/src/content/docs/examples/server/multi-model-chat.md157def model_specific_tasks_example():CODE
LOW…s/src/content/docs/examples/server/multi-model-chat.md245def interactive_model_selection():CODE
LOWexamples/python/test_multi_model.py21def test_multi_model_operations():CODE
LOWexamples/python/test_multi_model.py99def test_model_id_in_requests():CODE
LOWexamples/python/multi_model_example.py26def example_runner_with_model_id():CODE
LOWexamples/python/multi_model_example.py131def example_streaming_with_models():CODE
LOWexamples/python/multi_model_example.py160def example_multi_model_setup():CODE
LOWexamples/server/multi_model_chat.py135def model_specific_tasks_example():CODE
LOWexamples/server/multi_model_chat.py223def interactive_model_selection():CODE
LOWscripts/convert_awq_marlin.py104def awq_to_marlin_zero_points(CODE
LOWscripts/build_wheels.py221def get_features_for_base_package(plat: Platform) -> list[str]:CODE
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippetContext
LOWreleases/v0.9.0/scripts/plot_results.py41CODE
LOWreleases/v0.9.0/scripts/plot_results.py67CODE
LOWreleases/v0.9.0/scripts/plot_results.py96CODE
LOWmistralrs-code-exec/python/executor.py272CODE
LOWmistralrs-code-exec/python/executor.py325CODE
LOWdocs/scripts/render_pyi.py226CODE
LOWdocs/scripts/render_pyi.py408CODE
LOWexamples/python/custom_search.py11CODE
LOWexamples/python/custom_tool_call.py12CODE
LOWexamples/server/streaming_tool_calling.py77CODE
LOWexamples/server/multi_model_chat.py57CODE
LOWexamples/server/anthropic_streaming.py19CODE
LOWexamples/server/code_execution_approval.py87CODE
LOWexamples/server/anthropic_agentic.py19CODE
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWinstall.sh10# Check if we can prompt the user (stdin is a tty or we have /dev/tty)COMMENT
LOWinstall.sh98# Check if Rust is installedCOMMENT
LOWinstall.sh223# Check if MKL is installedCOMMENT
LOWinstall.sh240# Check if CPU is IntelCOMMENT
LOWinstall.sh290# Check if cuDNN is installedCOMMENT
LOWinstall.sh301# Check if NCCL is installedCOMMENT
LOWinstall.sh392# Check if ffmpeg is installedCOMMENT
LOWexamples/python/multi_model_example.py81 # Check if a model is loadedCOMMENT
Unused Imports6 hits · 6 pts
SeverityFileLineSnippetContext
LOWreleases/v0.9.0/scripts/bench_cpu_sweep.py17CODE
LOWreleases/v0.9.0/scripts/plot_results.py5CODE
LOWdocs/scripts/render_pyi.py13CODE
LOWdocs/scripts/render_examples.py15CODE
LOWscripts/upload_wheels.py14CODE
LOWscripts/build_wheels.py14CODE
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWdocs/src/content/docs/examples/server/mcp-chat.md52 api_key="placeholder", # mistral.rs doesn't require a real API keyCODE
LOWdocs/src/content/docs/examples/server/tool-dispatch.md119 api_key="placeholder",CODE
LOW…rc/content/docs/examples/server/agentic-tool-rounds.md54 api_key="placeholder",CODE
LOWexamples/server/agentic_tool_rounds.py27 api_key="placeholder",CODE
LOWexamples/server/tool_dispatch.py97 api_key="placeholder",CODE
LOWexamples/server/mcp_chat.py27 api_key="placeholder", # mistral.rs doesn't require a real API keyCODE