Repository Analysis

antoinezambelli/forge

A Python framework for self-hosted LLM tool-calling and multi-step agentic workflows

32.0 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of antoinezambelli/forge, a Python project with 2,229 GitHub stars. SynthScan v2.0 examined 78,342 lines of code across 230 source files, recording 1950 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 32.0 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

32.0
Adjusted Score
32.0
Raw Score
100%
Time Factor
2026-08-26
Last Push
2.2K
Stars
Python
Language
78.3K
Lines of Code
230
Files
1.9K
Pattern Hits
2026-08-29
Scan Date
0.07
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 15MEDIUM 271LOW 1664

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 1950 distinct pattern matches across 17 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.

Hyper-Verbose Identifiers1249 hits · 1157 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py17def mock_httpx_client_constructor() -> Iterator[MagicMock]:CODE
LOWtests/http_mocks.py32def patch_httpx_client_constructor() -> Iterator[MagicMock]:CODE
LOWtests/unit/test_argument_transformation.py39def test_lambda_and_stateful_tools_share_output_contracts() -> None:CODE
LOWtests/unit/test_argument_transformation.py180def test_lambda_and_stateful_validators_accept_equivalent_formats() -> None:CODE
LOWtests/unit/test_argument_transformation.py195def test_lambda_and_stateful_validators_reject_benchmark_failure_modes() -> None:CODE
LOWtests/unit/test_argument_transformation.py233def test_stateful_tools_record_successful_reasoning_path() -> None:CODE
LOWtests/unit/test_argument_transformation.py257def test_stateful_tools_do_not_record_rejected_paths() -> None:CODE
LOWtests/unit/test_argument_transformation.py267def _exercise_required_stateful_calls(workflow: Any) -> None:CODE
LOWtests/unit/test_argument_transformation.py278def test_validate_state_requires_full_reasoning_path_and_submission() -> None:CODE
LOWtests/unit/test_argument_transformation.py297def test_validate_state_rejects_skipped_conversion() -> None:CODE
LOWtests/unit/test_argument_transformation.py308def test_validate_state_rejects_wrong_submission() -> None:CODE
LOWtests/unit/test_openai_compat_client.py90 async def test_returns_text_response(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py100 async def test_missing_choices_raises_backend_error(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py110 async def test_null_content_returns_empty_text(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py120 async def test_malformed_tool_args_kept_as_raw_args(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py454 def test_bearer_header_set_when_key_provided(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py460 def test_no_auth_header_when_no_key(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py464 def test_base_url_trailing_slash_stripped(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py474 async def test_yields_text_deltas_and_final(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py827 def test_recommended_sampling_off_is_silent_for_unknown_model(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py837 def test_recommended_sampling_on_raises_for_unknown_model(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py142 async def test_malformed_tool_args_kept_even_with_assistant_text(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py163 async def test_malformed_among_several_kept_per_call(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py185 async def test_dict_tool_args_accepted(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py204 async def test_formats_tools_in_request(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py219 async def test_request_body_structure(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py234 async def test_posts_to_chat_completions(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py256 async def test_http_error_raises_backend_error(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py265 async def test_structured_reasoning_field_captured(self, field) -> None:CODE
LOWtests/unit/test_openai_compat_client.py286 async def test_extracts_think_tags_from_content_with_tool_call(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py306 async def test_reasoning_field_preferred_over_content_tags(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py325 async def test_content_preamble_not_treated_as_reasoning(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py347 async def test_think_tags_stripped_from_text_response(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py362 async def test_plain_preamble_text_response_survives(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py377 async def test_reasoning_attached_to_first_tool_call_only(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py398 async def test_empty_string_structured_field_falls_through_to_tags(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py419 async def test_non_string_reasoning_field_raises(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py496 async def test_yields_final_with_tool_call(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py525 async def test_stream_malformed_tool_args_kept_as_raw_args(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py552 async def test_stream_non_string_arg_fragment_not_dropped(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py574 async def test_accumulates_reasoning_across_deltas(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py597 async def test_stream_extracts_think_tags_from_content_with_tool_call(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py620 async def test_stream_content_preamble_not_treated_as_reasoning(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py643 async def test_stream_strips_think_tags_from_text_response(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py661 async def test_stream_other_canonical_fields_accumulate(self, field) -> None:CODE
LOWtests/unit/test_openai_compat_client.py682 async def test_stream_structured_preferred_over_content_tags(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py703 async def test_stream_reasoning_first_tool_call_only(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py725 async def test_stream_non_string_reasoning_raises(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py741 async def test_stream_http_error_raises(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py752 async def test_ignores_non_data_lines(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py777 def test_extra_headers_merged_alongside_bearer(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py789 def test_api_key_plus_auth_header_raises(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py802 def test_extra_headers_alone_set_custom_scheme(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py811 def test_sampling_kwargs_stored_as_instance_fields(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py859 async def test_instance_sampling_flows_into_body(self, field, value) -> None:CODE
LOWtests/unit/test_openai_compat_client.py881 async def test_passthrough_fields_appear_in_body(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py896 async def test_forge_owned_fields_override_passthrough(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py917 async def test_inbound_anthropic_body_accepted_and_ignored(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py933 async def test_send_stream_accepts_passthrough_and_inbound(self) -> None:CODE
LOWtests/unit/test_openai_compat_client.py954 async def test_aclose_closes_http_pool(self) -> None:CODE
1189 more matches not shown…
Decorative Section Separators246 hits · 808 pts
SeverityFileLineSnippetContext
MEDIUMtests/conftest.py23# ── Shared LLM client double ─────────────────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py450# ── auth ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py469# ── send_stream ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py847# ── instance sampling flows into request body ────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py61# ── send ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py773# ── constructor ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py876# ── passthrough + inbound_anthropic_body ─────────────────────────COMMENT
MEDIUMtests/unit/test_openai_compat_client.py949# ── aclose ───────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_inconsistent_api_recovery.py27# ── Lambda tool callables ───────────────────────────────────────COMMENT
MEDIUMtests/unit/test_inconsistent_api_recovery.py243# ── Stateful backend ────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_inconsistent_api_recovery.py327# ── Stateful validate_state ─────────────────────────────────────COMMENT
MEDIUMtests/unit/test_inconsistent_api_recovery.py200# ── Validator (lambda) ──────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_ollama_client.py849# ── outbound message normalization (#111 / #115) ─────────────────COMMENT
MEDIUMtests/unit/test_ollama_client.py960# ── get_context_length + set_num_ctx ─────────────────────────────COMMENT
MEDIUMtests/unit/test_ollama_client.py982# ── format_tool ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_ollama_client.py47# ── send ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_ollama_client.py476# ── send_stream ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_auth.py86# ── relocate_credential ──────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_auth.py132# ── resolve_inbound_credential ───────────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_auth.py27# ── extract_inbound_credential ───────────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_auth.py224# ── handler threading ────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_anthropic_client.py137# ── _convert_tools ───────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_anthropic_client.py177# ── _convert_messages ────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_anthropic_client.py450# ── _parse_response ──────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_anthropic_client.py727# ── Prompt caching (static tools+system breakpoint) ──────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1135# ── _merge_consecutive ────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1138# ── think flag behavior — sync ────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py160# ── send — native mode ──────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py659# ── send — prompt mode ──────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py749# ── get_context_length ───────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py792# ── send_stream ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py969 # ── send_stream — malformed-500 transport boundaries ──────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1049# ── mode ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1059# ── _apply_sampling ──────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1391# ── think flag behavior — stream ──────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1486# ── slot_id ────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_llamafile_client.py1658# ── Issue #121: Path.stem truncates dotted model names ─────────────COMMENT
MEDIUMtests/unit/test_guardrails.py22# ── check(): response validation ─────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py126# ── check(): step enforcement ────────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py162# ── record() ─────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py191# ── CheckResult dataclass ────────────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py220# ── Custom retry nudge ───────────────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py9# ── Helpers ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_guardrails.py206# ── Imports ──────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_path1.py27# ── ProxyServer construction validation ──────────────────────COMMENT
MEDIUMtests/unit/test_proxy_path1.py94# ── AnthropicClient verbatim path ────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_path1.py182# ── AnthropicClient base_url ─────────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_path1.py198# ── End-to-end: cache_control wire preservation ──────────────COMMENT
MEDIUMtests/unit/test_proxy_convert_anthropic.py19# ── Inbound: Anthropic → forge ─────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_convert_anthropic.py237# ── Outbound: forge → Anthropic ────────────────────────────COMMENT
MEDIUMtests/unit/test_proxy_convert_anthropic.py293# ── SSE event sequence ─────────────────────────────────────COMMENT
MEDIUMtests/unit/test_context_manager.py89# ── estimate_tokens ─────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_context_manager.py187# ── maybe_compact — under threshold ─────────────────────────────COMMENT
MEDIUMtests/unit/test_context_manager.py200# ── maybe_compact — over threshold ──────────────────────────────COMMENT
MEDIUMtests/unit/test_context_manager.py14# ── Helpers ──────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_context_manager.py268# ── CompactEvent fields ─────────────────────────────────────────COMMENT
MEDIUMtests/unit/test_vllm_client.py89# ── constructor / identity derivation ──────────────────────────COMMENT
MEDIUMtests/unit/test_vllm_client.py119# ── send (non-streaming) ──────────────────────────────────────COMMENT
MEDIUMtests/unit/test_vllm_client.py689# ── get_served_model_name ──────────────────────────────────────COMMENT
MEDIUMtests/unit/test_vllm_client.py715# ── removed proxy discovery helper ─────────────────────────────COMMENT
186 more matches not shown…
Unused Imports247 hits · 212 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py3CODE
LOWtests/http_mocks.py3CODE
LOWtests/unit/test_argument_transformation.py3CODE
LOWtests/unit/test_inconsistent_api_recovery.py13CODE
LOWtests/unit/test_proxy_installation_docs.py3CODE
LOWtests/unit/test_eval_outcomes.py3CODE
LOWtests/unit/test_standalone_build.py3CODE
LOWtests/unit/test_eval_dataset_builder.py3CODE
LOWtests/unit/test_clients_base.py3CODE
LOWtests/unit/test_batch_eval_recipes.py3CODE
LOWtests/unit/test_server_rpc.py3CODE
LOWtests/unit/test_eval_reporting_metrics.py3CODE
LOWtests/unit/test_proxy_profiles.py3CODE
LOWtests/unit/test_proxy_path1.py13CODE
LOWtests/unit/test_data_gap_recovery_extended.py3CODE
LOWtests/unit/test_proxy_cli.py3CODE
LOWtests/unit/test_proxy_installer.py3CODE
LOWtests/unit/test_backend_profiles.py3CODE
LOWtests/unit/test_server.py3CODE
LOWtests/unit/test_proxy_config.py3CODE
LOWtests/unit/test_slot_worker.py3CODE
LOWtests/unit/test_slot_worker.py6CODE
LOWtests/unit/test_slot_worker.py8CODE
LOWtests/unit/test_slot_worker.py14CODE
LOWtests/unit/test_slot_worker.py389CODE
LOWtests/unit/test_runner.py3CODE
LOWtests/unit/test_eval_budget.py3CODE
LOWtests/unit/test_eval_budget.py15CODE
LOWtests/unit/test_proxy_release.py3CODE
LOWtests/unit/test_proxy_proxy.py9CODE
LOWtests/unit/test_proxy_release_workflows.py3CODE
LOWtests/unit/test_batch_eval_resume.py3CODE
LOWtests/unit/test_rpc.py3CODE
LOWtests/unit/test_client_auth.py15CODE
LOWtests/unit/test_eval_publication.py3CODE
LOWtests/unit/test_proxy_lifecycle_smoke.py3CODE
LOWtests/unit/test_eval_generation.py3CODE
LOWtests/unit/test_grounded_synthesis.py12CODE
LOWtests/unit/test_batch_eval_lifecycle.py3CODE
LOWtests/integration/_bootstrap_support.py3CODE
LOW…egration/bootstrap_contract/test_bootstrap_contract.py8CODE
LOW…egration/platform_acceptance/test_windows_installer.py3CODE
LOWtests/eval/metrics.py3CODE
LOWtests/eval/generation.py7CODE
LOWtests/eval/batch_eval.py11CODE
LOWtests/eval/batch_eval.py19CODE
LOWtests/eval/batch_eval.py33CODE
LOWtests/eval/batch_eval.py38CODE
LOWtests/eval/ablation.py3CODE
LOWtests/eval/dataset_builder.py13CODE
LOWtests/eval/outcomes.py8CODE
LOWtests/eval/significance.py15CODE
LOWtests/eval/publication.py15CODE
LOWtests/eval/eval_runner.py3CODE
LOWtests/eval/eval_runner.py12CODE
LOWtests/eval/eval_runner.py18CODE
LOWtests/eval/provenance.py3CODE
LOWtests/eval/report.py17CODE
LOWtests/eval/scenarios/_base.py3CODE
LOWtests/eval/scenarios/_stateful_plumbing.py3CODE
187 more matches not shown…
Modern AI Meta-Vocabulary23 hits · 63 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md3[![PyPI](https://img.shields.io/pypi/v/forge-guardrails.svg)](https://pypi.org/project/forge-guardrails/)CODE
MEDIUMREADME.md15- **Not a coding harness.** Forge is domain-agnostic. If you're building a coding agent (or already using one like opencCODE
MEDIUMREADME.md174Drop-in proxy that sits between any client and a local model server, speaking both the OpenAI chat-completions API and tCODE
MEDIUMREADME.md325 runner.py # WorkflowRunner — the agentic loopCODE
MEDIUMCONTRIBUTING.md122### Adding or modifying guardrailsCOMMENT
MEDIUMtests/unit/test_openai_compat_client.py421 # it into replayable chain-of-thought.COMMENT
MEDIUMtests/unit/test_openai_compat_client.py727 # never repr-coerced into chain-of-thought.COMMENT
MEDIUMtests/eval/report.py1327 ("## Full Ablation — which guardrails do the work?", lambda rp: rp == "ablation.md"),CODE
MEDIUMtests/eval/scenarios/_model_reasoning.py569# guardrails-vs-bare ablation: bare runs hit the first error andCOMMENT
MEDIUMdocs/USER_GUIDE.md138### Mode 3: Middleware (composable guardrails)COMMENT
MEDIUMdocs/WORKFLOW.md474└── reasoning: str | None # chain-of-thought (thinking models)CODE
MEDIUMdocs/EVAL_GUIDE.md87# Ablation — bare (all guardrails off)COMMENT
MEDIUMdocs/decisions/MULTI_MODEL_ROUTING.md170# Consumer orchestration codeCOMMENT
MEDIUMsrc/forge/clients/sampling_defaults.py80 # documented default reasoning effort for complex coding and agentic work.COMMENT
MEDIUMsrc/forge/clients/sampling_defaults.py120 # DeepSeek-V4-Flash-0731 — agentic profile: T=1.0, top_p=0.95. The cardCOMMENT
MEDIUMsrc/forge/clients/sampling_defaults.py190 # explicit chain of thought). Card recommends temperature=0.2, top_k=80, repetition_penalty=1.05COMMENT
MEDIUMsrc/forge/clients/openai_compat.py397 # chain-of-thought.COMMENT
MEDIUMsrc/forge/proxy/handler.py429 # in tool-calling mode where guardrails apply. The respond call isCOMMENT
MEDIUMsrc/forge/proxy/handler.py443 # No tools → plain chat completion, no guardrails needed.COMMENT
MEDIUMsrc/forge/proxy/handler.py474 # Set up guardrailsCOMMENT
MEDIUMsrc/forge/proxy/handler.py498 # error. The client's own agentic loop can decide what to do.COMMENT
MEDIUMsrc/forge/proxy/proxy.py346 # guardrails wrap its inference loop like any other client.COMMENT
MEDIUMsrc/forge/proxy/proxy.py348 # (forge-guardrails[anthropic]). Only Path 1 needs it, soCOMMENT
Deep Nesting43 hits · 41 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_eval_dataset_builder.py314CODE
LOWtests/unit/test_proxy_release.py69CODE
LOWtests/eval/metrics.py275CODE
LOWtests/eval/batch_eval.py639CODE
LOWtests/eval/batch_eval.py1065CODE
LOWtests/eval/dataset_builder.py684CODE
LOWtests/eval/dataset_builder.py746CODE
LOWtests/eval/significance.py106CODE
LOWtests/eval/publication.py465CODE
LOWtests/eval/eval_runner.py413CODE
LOWtests/eval/report.py278CODE
LOWtests/eval/report.py762CODE
LOWscripts/run_ablation.py102CODE
LOWscripts/migrate_eval_jsonl_gguf_identity.py100CODE
LOWscripts/standalone/release.py297CODE
LOWscripts/standalone/release.py401CODE
LOWscripts/standalone/evidence.py23CODE
LOWscripts/standalone/evidence.py29CODE
LOWsrc/forge/server.py1004CODE
LOWsrc/forge/clients/llamafile.py215CODE
LOWsrc/forge/clients/llamafile.py258CODE
LOWsrc/forge/clients/anthropic.py261CODE
LOWsrc/forge/clients/anthropic.py388CODE
LOWsrc/forge/clients/anthropic.py558CODE
LOWsrc/forge/clients/ollama.py37CODE
LOWsrc/forge/clients/ollama.py399CODE
LOWsrc/forge/clients/base.py218CODE
LOWsrc/forge/context/strategies.py248CODE
LOWsrc/forge/core/steps.py53CODE
LOWsrc/forge/core/runner.py89CODE
LOWsrc/forge/core/workflow.py68CODE
LOWsrc/forge/proxy/server.py320CODE
LOWsrc/forge/proxy/server.py530CODE
LOWsrc/forge/proxy/server.py792CODE
LOWsrc/forge/proxy/convert.py17CODE
LOWsrc/forge/proxy/convert_anthropic.py20CODE
LOWsrc/forge/proxy/_profiles.py60CODE
LOWsrc/forge/proxy/_installer.py815CODE
LOWsrc/forge/proxy/__main__.py152CODE
LOWsrc/forge/prompts/templates.py12CODE
LOWsrc/forge/prompts/templates.py55CODE
LOWsrc/forge/prompts/templates.py185CODE
LOWsrc/forge/prompts/templates.py238CODE
Excessive Try-Catch Wrapping34 hits · 35 pts
SeverityFileLineSnippetContext
LOWtests/eval/batch_eval.py961 except Exception:CODE
LOWtests/eval/batch_eval.py971 except Exception as exc:CODE
LOWtests/eval/dataset_builder.py709 except Exception as exc:STRING
LOWtests/eval/dataset_builder.py950 except Exception as exc:STRING
LOWtests/eval/dataset_builder.py989 except Exception as exc:CODE
MEDIUMtests/eval/dataset_builder.py91def _require_pyarrow() -> tuple[Any, Any]:CODE
LOWtests/eval/eval_runner.py218 except Exception as exc:CODE
LOWtests/eval/eval_runner.py223 except Exception as exc:CODE
LOWtests/eval/eval_runner.py377 except Exception as exc:CODE
LOWtests/eval/eval_runner.py674 except Exception as exc:CODE
LOWdocs/ARCHITECTURE.md27except Exception:CODE
LOWscripts/integration_test_proxy.py291 except Exception as exc:CODE
LOWscripts/integration_test_proxy.py839 except Exception as exc:CODE
LOWscripts/run_ablation.py170 except Exception as e:CODE
LOWscripts/smoke_test_proxy.py161 except Exception as exc: # make fixture bugs visible at the HTTP boundaryCODE
LOWscripts/smoke_test_proxy.py318 except Exception:CODE
LOWscripts/standalone/lifecycle_smoke.py263 except Exception:CODE
LOWsrc/forge/server.py451 except Exception as exc:CODE
LOWsrc/forge/server.py459 except Exception as exc:CODE
LOWsrc/forge/server.py559 except Exception:CODE
LOWsrc/forge/core/runner.py346 except Exception as exc:CODE
LOWsrc/forge/core/slot_worker.py137 except Exception as exc:CODE
LOWsrc/forge/proxy/server.py269 except Exception:CODE
LOWsrc/forge/proxy/server.py314 except Exception as exc:CODE
LOWsrc/forge/proxy/server.py390 except Exception:CODE
LOWsrc/forge/proxy/server.py394 except Exception:CODE
LOWsrc/forge/proxy/server.py400 except Exception:CODE
LOWsrc/forge/proxy/server.py640 except Exception:CODE
LOWsrc/forge/proxy/server.py789 except Exception as exc:CODE
LOWsrc/forge/proxy/server.py882 except Exception as exc:CODE
LOWsrc/forge/proxy/_installer.py896 except Exception:CODE
LOWsrc/forge/proxy/__main__.py347 except Exception as exc:STRING
LOWsrc/forge/proxy/__main__.py370 except Exception as exc:STRING
LOWsrc/forge/proxy/__main__.py389 except Exception as exc:STRING
Cross-Language Confusion6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/eval/dataset_builder.py696 if not parquet_file.schema_arrow.equals(schema, check_metadata=True):STRING
HIGHsrc/forge/proxy/_installer.py760 'while kill -0 "$parent" 2>/dev/null; do sleep 0.1; done',CODE
HIGHsrc/forge/proxy/_installer.py763 '[ "$(cat "$marker" 2>/dev/null)" = "$expected" ] || exit 2',CODE
HIGHsrc/forge/proxy/_installer.py788 f"rmdir -- {q(str(paths.command_dir))} 2>/dev/null || true",CODE
HIGHsrc/forge/proxy/_installer.py789 f"rmdir -- {q(str(paths.root))} 2>/dev/null || true",CODE
HIGHsrc/forge/prompts/nudges.py69 args content (e.g. an empty string, null, a list, or a primitiveSTRING
Structural Annotation Overuse16 hits · 28 pts
SeverityFileLineSnippetContext
LOWtests/eval/scenarios/_compaction_chain.py532 # Step 1: patient MRN (not in user message)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py534 # Step 3: lab values (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py536 # Step 4: imaging findings (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py538 # Step 5: specialist (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py540 # Step 6: medication concern (only from tool result)COMMENT
LOWdocs/decisions/003-thinking-label-ux.md64### Step 1: Add `_resolve_reasoning()` to OllamaClientCOMMENT
LOWdocs/decisions/003-thinking-label-ux.md86### Step 2: Use it in `send()` (batch path)COMMENT
LOWdocs/decisions/003-thinking-label-ux.md102### Step 3: Use it in `_iter_stream()` (streaming path)COMMENT
LOWdocs/decisions/003-thinking-label-ux.md124### Step 4: Add unit testsCOMMENT
LOWdocs/decisions/003-thinking-label-ux.md187### Step 5: Update README roadmapCOMMENT
LOWdocs/decisions/004-async-on-chunk.md75### Step 1: Change type signatureCOMMENT
LOWdocs/decisions/004-async-on-chunk.md91### Step 2: Await the callback in `_send_streaming()`COMMENT
LOWdocs/decisions/004-async-on-chunk.md107### Step 3: Update `_make_runner` helper type hintCOMMENT
LOWdocs/decisions/004-async-on-chunk.md127### Step 4: Update the testCOMMENT
LOWdocs/decisions/004-async-on-chunk.md171### Step 5: Update docstringCOMMENT
LOWdocs/decisions/004-async-on-chunk.md180### Step 6: Update README roadmapCOMMENT
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHsrc/forge/server.py656Resolve the ContextManager budget for the given mode. Args: mode: The budget mode to use. STRING
HIGHsrc/forge/server.py711Start server with the specified budget mode and return the resolved budget. Handles the mode-specific startup dSTRING
HIGHsrc/forge/clients/sampling_defaults.py254Apply the recommended-sampling policy for ``model``. Called by client constructors at instantiation time. The four-STRING
HIGHsrc/forge/core/inference.py200Send messages to the LLM with compaction, folding, validation, and retry. Retries are handled internally — the callSTRING
HIGHsrc/forge/core/slot_worker.py65Submit a workflow for execution and wait for the result. Args: workflow: The workflow to execute. STRING
Fake / Example Data18 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_argument_transformation.py68 "Acme Corp",CODE
LOWtests/unit/test_argument_transformation.py87 {"vendor_name": "Acme Corp"},CODE
LOWtests/unit/test_argument_transformation.py237 assert "Acme Corp" in system.get_approved_vendors()CODE
LOWtests/unit/test_inconsistent_api_recovery.py38 assert "Acme Corp" in outCODE
LOWtests/unit/test_inconsistent_api_recovery.py261 assert "Acme Corp" in outCODE
LOWtests/eval/scenarios/_base.py15 placeholder_field: str = Field(description="placeholder")CODE
LOWtests/eval/scenarios/_base.py49 spec=ToolSpec(name=terminal_tool, description="placeholder",CODE
LOWtests/eval/scenarios/_base.py56 spec=ToolSpec(name=s, description="placeholder",CODE
LOWtests/eval/scenarios/_base.py64 description="placeholder",CODE
LOWtests/eval/scenarios/_model_reasoning.py300# approved 'Acme Corp'. Literal string compare over-flags it;COMMENT
LOWtests/eval/scenarios/_model_reasoning.py313 "Acme Corp",CODE
LOWtests/eval/scenarios/_model_reasoning.py326 ("TX-1002", "2024-10-12", "Acme Corp", 12000, "USD", False), # approvedCODE
LOWtests/eval/scenarios/_model_reasoning.py377 if name == "Acme Corp":CODE
LOWtests/eval/scenarios/_model_reasoning.py621 (12345, "Acme Corp"),CODE
LOWtests/eval/scenarios/_stateful_model_reasoning.py368 "Acme Corp",CODE
LOWtests/eval/scenarios/_stateful_model_reasoning.py378 ("TX-1002", "2024-10-12", "Acme Corp", 12000, "USD"),CODE
LOWtests/eval/scenarios/_stateful_model_reasoning.py441 if name == "Acme Corp":CODE
LOWtests/eval/scenarios/_stateful_model_reasoning.py681 (12345, "Acme Corp"),CODE
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/forge/clients/vllm.py0per-call headers to apply, enforcing the one-credential rule. returns the dict to pass as httpx ``headers=`` (merged oveSTRING
HIGHsrc/forge/clients/llamafile.py0per-call headers to apply, enforcing the one-credential rule. returns the dict to pass as httpx ``headers=`` (merged oveSTRING
HIGHsrc/forge/clients/openai_compat.py0per-call headers to apply, enforcing the one-credential rule. returns the dict to pass as httpx ``headers=`` (merged oveSTRING
HIGHsrc/forge/clients/ollama.py0per-call headers to apply, enforcing the one-credential rule. returns the dict to pass as httpx ``headers=`` (merged oveSTRING
Over-Commented Block19 hits · 18 pts
SeverityFileLineSnippetContext
LOWinstall.sh1#!/bin/shCOMMENT
LOWtests/eval/report.py501# model under different identity strings:COMMENT
LOWtests/eval/scenarios/_model_reasoning.py61 top_vendor: str = Field(description="Vendor of the single largest flagged transaction")COMMENT
LOWtests/eval/scenarios/_model_reasoning.py281 tags=["advanced_reasoning", "reasoning", "model_quality"],COMMENT
LOWtests/eval/scenarios/_model_reasoning.py561COMMENT
LOWtests/eval/scenarios/_model_reasoning.py881 "txn_count (int)."COMMENT
LOWtests/eval/scenarios/_model_reasoning.py901# Sarah Chen — top-decile attractor; BLOCKER: Stripe non-competeCOMMENT
LOWexamples/foreign_loop.py141# The respond tool eliminates this ambiguity: the model callsCOMMENT
LOWsrc/forge/clients/sampling_defaults.py101 "gemma4:e4b-it-q4_K_M": {"temperature": 1.0, "top_p": 0.95, "top_k": 64}, # https://huggingface.co/goCOMMENT
LOWsrc/forge/clients/sampling_defaults.py121 # supports low/high/max reasoning effort. This one registry value is theCOMMENT
LOWsrc/forge/clients/sampling_defaults.py141 # so the model emits something substantive instead of empty <think> blocks. Native tool format isCOMMENT
LOWsrc/forge/clients/sampling_defaults.py181 "ministral-3:8b-reasoning-2512-q8_0": {"temperature": 0.7}, # https://huggingface.co/mistralai/Ministral-3-8B-ReCOMMENT
LOWsrc/forge/clients/sampling_defaults.py201 "Mellum2-12B-A2.5B-Instruct-Q4_K_M": {"temperature": 0.6, "top_p": 0.95, "top_k": 20}, # https://huggingface.co/COMMENT
LOWsrc/forge/clients/llamafile.py41# index is filesystem layout, not model identity, so strip it for theCOMMENT
LOWsrc/forge/clients/llamafile.py61# The gate is STRUCTURAL, not phrase-based: a 500 is rescuable iff its bodyCOMMENT
LOWsrc/forge/clients/anthropic.py41# lowercases all inbound header keys, so a relocated ``x-api-key`` would failCOMMENT
LOWsrc/forge/clients/anthropic.py121 ) -> None:COMMENT
LOWsrc/forge/clients/anthropic.py141 log.debug(COMMENT
LOWsrc/forge/guardrails/nudge.py41COMMENT
AI Structural Patterns18 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_runner.py69CODE
LOWtests/unit/test_proxy_server.py143CODE
LOWtests/eval/batch_eval.py1065CODE
LOWsrc/forge/server.py1004CODE
LOWsrc/forge/server.py1106CODE
LOWsrc/forge/server.py236CODE
LOWsrc/forge/server.py695CODE
LOWsrc/forge/clients/vllm.py67CODE
LOWsrc/forge/clients/llamafile.py332CODE
LOWsrc/forge/clients/openai_compat.py61CODE
LOWsrc/forge/clients/anthropic.py108CODE
LOWsrc/forge/clients/ollama.py106CODE
LOWsrc/forge/core/runner.py35CODE
LOWsrc/forge/core/inference.py179CODE
LOWsrc/forge/proxy/server.py180CODE
LOWsrc/forge/proxy/handler.py256CODE
LOWsrc/forge/proxy/proxy.py62CODE
LOWsrc/forge/proxy/_installer.py924CODE
Modern Structural Boilerplate15 hits · 15 pts
SeverityFileLineSnippetContext
LOWtests/eval/scenarios/__init__.py81__all__ = [CODE
LOWscripts/integration_test_proxy.py98def _setup_logging() -> None:CODE
LOWsrc/forge/server.py221 def _set_resolved_daemon_target(self, target: ResolvedBackend) -> None:CODE
LOWsrc/forge/__init__.py78__all__ = [CODE
LOWsrc/forge/clients/vllm.py173 def _set_model_identity(self, wire_id: str | Path) -> None:CODE
LOWsrc/forge/clients/__init__.py14__all__ = [CODE
LOWsrc/forge/clients/ollama.py462 def set_num_ctx(self, num_ctx: int | None) -> None:CODE
LOWsrc/forge/tools/__init__.py9__all__ = [CODE
LOWsrc/forge/context/__init__.py20__all__ = [CODE
LOWsrc/forge/context/hardware.py21logger = logging.getLogger(__name__)CODE
LOWsrc/forge/context/manager.py131 def update_token_count(self, total_tokens: int) -> None:CODE
LOWsrc/forge/core/__init__.py3__all__ = ["WorkflowRunner"]CODE
LOWsrc/forge/guardrails/__init__.py19__all__ = [CODE
LOWsrc/forge/proxy/__init__.py5__all__ = ["ProxyServer"]CODE
LOWsrc/forge/prompts/__init__.py6__all__ = [CODE
Verbosity Indicators5 hits · 11 pts
SeverityFileLineSnippetContext
LOWtests/eval/scenarios/_compaction_chain.py532 # Step 1: patient MRN (not in user message)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py534 # Step 3: lab values (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py536 # Step 4: imaging findings (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py538 # Step 5: specialist (only from tool result)COMMENT
LOWtests/eval/scenarios/_compaction_chain.py540 # Step 6: medication concern (only from tool result)COMMENT
AI Slop Vocabulary1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/test_proxy_auth.py45 # The proxy lowercases keys, but be robust to mixed case anyway.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWexamples/foreign_loop.py175 # Check if the model called respond -- extract the messageCOMMENT