AI Slop Code Risk Monitor

QuantumNous/new-api

SlopCodeMonitor badge for QuantumNous/new-api Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Open-source AI gateway. Self-hosted LLM gateway with OpenAI-, Claude- and Gemini-compatible APIs, model routing, access control, usage tracking and cost accounting.

0.7 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for QuantumNous/new-api, a Go project with 51,087 GitHub stars. SynthScan examined 661,289 lines of code across 2603 source files, recording 391 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 0.7 (Low 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.

0.7
Adjusted Signal
0.7
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
51.1K
Stars
Go
Language
661.3K
Lines of Code
2.6K
Files
391
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 2.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.6/100 · LOW

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

Agent Over-Engineering Ratio 2.3/100 · LOW

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

PR Review Velocity Impact 3.4/100 · LOW

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

What These Metrics Mean

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

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 13MEDIUM 3LOW 375

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 391 distinct pattern matches across 10 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 Identifiers290 hits · 293 pts
SeverityFileLineSnippetContext
LOWplugins/tasks/sunoapi/plugin.js96function validateAndNormalize(ctx) {CODE
LOWweb/src/context/theme-customization-provider.tsx89export function ThemeCustomizationProvider(props: {CODE
LOW…rc/features/usage-logs/components/usage-logs-table.tsx66function getColumnVisibilityStorageKey(CODE
LOW…age-logs/components/compact-date-time-range-picker.tsx50export function CompactDateTimeRangePicker({CODE
LOWweb/src/features/usage-logs/audit/lib/audit-details.ts204function describeAccessTokenScopes(CODE
LOWweb/src/features/usage-logs/lib/task-artifacts.ts163export function parseTaskArtifactsResponse(CODE
LOWweb/src/features/usage-logs/lib/format.ts63export function getParamOverrideActionLabel(CODE
LOWweb/src/features/usage-logs/lib/format.ts173export function getReasoningEffortVariant(CODE
LOWweb/src/features/usage-logs/lib/format.ts206export function getFirstResponseTimeColor(CODE
LOW…eatures/playground/components/chat/playground-chat.tsx92 function handleToggleMessageSource(message: MessageType): void {CODE
LOW…ground/components/input/playground-parameter-panel.tsx74function PlaygroundParameterContent({CODE
LOW…atures/playground/hooks/use-playground-conversation.ts37export function usePlaygroundConversation({CODE
LOWweb/src/features/playground/hooks/use-stream-request.ts59export function createStreamRequestController(CODE
LOW…ures/playground/lib/options/playground-option-utils.ts60export function getOptionLoadErrorMessage(CODE
LOW…/src/features/playground/lib/input/input-tool-utils.ts49export function getAttachmentActionNotice(action: string): InputToolNotice {CODE
LOW…b/src/features/playground/lib/message/message-utils.ts63export function updateCurrentVersionContent(CODE
LOW…b/src/features/playground/lib/message/message-utils.ts92export function createLoadingAssistantMessage(CODE
LOW…eatures/playground/lib/message/message-action-utils.ts43export function getMessageActionsVisibilityClass(CODE
LOW…eatures/playground/lib/message/message-update-utils.ts27export function updateAssistantMessageWithError(CODE
LOW…eatures/playground/lib/message/message-update-utils.ts51export function updateLastAssistantMessage(CODE
LOW…s/playground/lib/message/conversation-message-utils.ts70export function createRegeneratedMessages(CODE
LOW…s/playground/lib/message/conversation-message-utils.ts164export function getChatMessageRenderState(CODE
LOW…ures/playground/lib/message/message-streaming-utils.ts165export function isAssistantMessagePending(message: Message): boolean {CODE
LOW…ures/playground/lib/message/message-streaming-utils.ts172export function isPendingAssistantMessage(message?: Message): boolean {CODE
LOW…ures/playground/lib/message/message-streaming-utils.ts187export function applyChatCompletionChoice(CODE
LOW…ures/playground/lib/message/message-streaming-utils.ts200export function applyChatCompletionResponse(CODE
LOW…eatures/playground/lib/state/playground-state-utils.ts31export function getInitialPlaygroundConfig(): PlaygroundConfig {CODE
LOW…eatures/playground/lib/state/playground-state-utils.ts35export function getInitialParameterEnabled(): ParameterEnabled {CODE
LOWweb/src/features/playground/lib/storage/storage.ts171function findLastRepeatedSectionRunStart(text: string): number {CODE
LOWweb/src/features/playground/lib/storage/storage.ts199function collapseRepeatedSectionSnapshots(text: string): string {CODE
LOWweb/src/features/playground/lib/storage/storage.ts212function normalizeStoredMessageForLoad(message: Message): Message {CODE
LOWweb/src/features/playground/lib/storage/storage.ts273function trimMessagesByContentSize(messages: Message[]): Message[] {CODE
LOW…c/features/playground/lib/streaming/payload-builder.ts30export function buildChatCompletionPayload(CODE
LOW…/src/features/playground/lib/streaming/stream-utils.ts67export function parseStreamMessageUpdates(data: string): StreamMessageUpdate[] {CODE
LOW…res/playground/lib/parameters/playground-parameters.ts95export function normalizeParameterNumberValue(CODE
LOW…res/playground/lib/parameters/playground-parameters.ts120export function getParameterControlValueText(CODE
LOWweb/src/features/security/lib/access-token-catalog.ts31export function accessTokenPermissionGroups(CODE
LOW…/src/features/auth/sign-up/components/sign-up-form.tsx188 async function handleSendVerificationCode() {CODE
LOWweb/src/features/auth/passkey/api.ts50export function finishPasskeyRegistration(CODE
LOWweb/src/features/auth/passkey/api.ts127export function finishPasskeyVerification(CODE
LOW…es/auth/passkey/__tests__/domain-verification.test.tsx106function DomainVerificationHarness(props: {CODE
LOWweb/src/features/auth/secure-verification/api.ts113export async function getLoginVerificationRequirements(CODE
LOWweb/src/features/auth/lib/password-encryption.ts38export function clearPasswordEncryptionCache(): void {CODE
LOWweb/src/features/auth/lib/oauth.ts35export function getAvailableOAuthProviders(CODE
LOWweb/src/features/auth/lib/oauth-callback-mode.ts22export function rememberOAuthLoginRedirect(CODE
LOWweb/src/features/auth/lib/oauth-callback-mode.ts34export function consumeOAuthLoginRedirect(state: string): string | null {CODE
LOWweb/src/features/auth/lib/oauth-bind-window.ts56export function parseTelegramBindCallback(CODE
LOWweb/src/features/auth/lib/oauth-bind-window.ts98export function startOAuthBindResponseDeadline(CODE
LOWweb/src/features/auth/lib/telegram-login.ts40export function pickTelegramAuthorization(CODE
LOWweb/src/features/models/api.ts325export async function testDeploymentConnectionWithKey(CODE
LOWweb/src/features/models/api.ts406export async function getDeploymentContainerDetails(CODE
LOWweb/src/features/models/api.ts625export async function checkClusterNameAvailability(name: string): Promise<{CODE
LOWweb/src/features/models/constants.ts106export function getDeploymentStatusOptions(t: TFunction) {CODE
LOWweb/src/features/models/constants.ts118export function getDeploymentStatusConfig(t: TFunction): Record<CODE
LOW…components/dialogs/prefill-group-management-dialog.tsx75export function PrefillGroupManagementDialog({CODE
LOW…features/models/hooks/use-model-deployment-settings.ts55export function useModelDeploymentSettings() {CODE
LOWweb/src/features/models/lib/model-form.ts86export function transformModelToFormDefaults(model: Model): ModelFormValues {CODE
LOWweb/src/features/models/lib/model-form.ts106export function transformFormDataToModelPayload(CODE
LOWweb/src/features/models/lib/deployments-utils.ts19export function normalizeDeploymentStatus(status: unknown) {CODE
LOWweb/src/features/subscriptions/api.ts93export async function invalidateUserSubscription(CODE
230 more matches not shown…
Magic Placeholder Names12 hits · 60 pts
SeverityFileLineSnippetContext
HIGH…/src/features/pricing/components/model-details-api.tsx122 ` api_key="<YOUR_API_KEY>",`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx122 ` api_key="<YOUR_API_KEY>",`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx189 ` api_key="<YOUR_API_KEY>",`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx189 ` api_key="<YOUR_API_KEY>",`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx259 `genai.configure(api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx259 `genai.configure(api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx309 `client = OpenAI(base_url="${ctx.baseUrl}/v1", api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx309 `client = OpenAI(base_url="${ctx.baseUrl}/v1", api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx375 `client = OpenAI(base_url="${ctx.baseUrl}/v1", api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx375 `client = OpenAI(base_url="${ctx.baseUrl}/v1", api_key="<YOUR_API_KEY>")`,CODE
HIGH…/src/features/pricing/components/model-details-api.tsx543 {'<YOUR_API_KEY>'}CODE
HIGH…/src/features/pricing/components/model-details-api.tsx543 {'<YOUR_API_KEY>'}CODE
Over-Commented Block51 hits · 51 pts
SeverityFileLineSnippetContext
LOWdocker-compose.dev.yml1# Frontend Development - Backend built from local sourceCOMMENT
LOWdocker-compose.yml1# New-API Docker Compose ConfigurationCOMMENT
LOWdocker-compose.yml41# - RELAY_IDLE_CONN_TIMEOUT=90 # Relay HTTP 客户端空闲连接超时时间,单位秒,默认跟随 Go 标准库,设置为0表示不限制 (Relay HTTP client idle keep-aliCOMMENT
LOWdocker-compose.yml81 environment:COMMENT
LOWdocker-compose.yml101# networks:COMMENT
LOWplugins/tasks/alibaba/plugin.js21 "wanx2.1-t2v-turbo": { kind: "size", resolutions: ["480P", "720P"], defaultResolution: "720P", durations: [5] },COMMENT
LOWweb/src/features/system-settings/models/constants.ts21// ---------------------------------------------------------------------------COMMENT
LOWweb/src/features/pricing/lib/mock-stats.ts21 hashStringToSeed,COMMENT
LOWcontroller/topup_stripe.go341 }COMMENT
LOWcommon/database.go41 return logDatabaseType == databaseTypeCOMMENT
LOWcommon/database.go61// front, so writers serialize through the busy timeout instead of dying onCOMMENT
LOWrelaykit/dto/channel_settings.go21 SystemPrompt string `json:"system_prompt,omitempty"`COMMENT
LOWrelaykit/dto/openai_request.go1241// ParseInput parses the Responses API `input` field into a normalized slice of MediaInput.COMMENT
LOWrelaykit/relayconvert/convmeta/options.go21 // surface, which accepts extra fields (reasoning config, cache_control onCOMMENT
LOWrelaykit/relayconvert/convmeta/options.go41COMMENT
LOWrelaykit/relayconvert/convmeta/options.go61 // every request.COMMENT
LOWrelaykit/relayconvert/convmeta/websearch.go61 // instead.COMMENT
LOWrelaykit/relayconvert/convmeta/meta.go41 // instance must be returned for the lifetime of one streaming session; aCOMMENT
LOW…ayconvert/internal/oai_chat/to_claude_messages_resp.go121 var claudeResponses []*dto.ClaudeResponseCOMMENT
LOWrelaykit/relayconvert/kitutil/mask.go81 for _, key := range slices.Sorted(maps.Keys(values)) {COMMENT
LOWmodel/task.go121 TokenId int `json:"token_id,omitempty"` // 令牌 ID,用于令牌额度退款COMMENT
LOWservice/error.go41// common.SysLog(fmt.Sprintf("error: %s", text))COMMENT
LOWservice/tiered_settle.go21// expression". Sub-categories (cache, image, audio) are only subtractedCOMMENT
LOWservice/auth_session.go361// script-readable marker. The Refresh Cookie itself is HttpOnly and scoped toCOMMENT
LOWservice/channel_select.go81//COMMENT
LOWservice/channel_select.go101// 示例流程(2个分组,每个有2个优先级,RetryTimes=3):COMMENT
LOWsetting/billing_setting/builtin_billing.go21 // https://developers.openai.com/api/docs/pricing (Standard, 2026-10-22):COMMENT
LOWrelay/channel/adapter.go41COMMENT
LOWrelay/channel/claude/dto.go1package claudeCOMMENT
LOWrelay/channel/claude/dto.go21// Input any `json:"input,omitempty"`COMMENT
LOWrelay/channel/claude/dto.go41//}COMMENT
LOWrelay/channel/claude/dto.go61// Stream bool `json:"stream,omitempty"`COMMENT
LOWrelay/channel/claude/dto.go81// Completion string `json:"completion"`COMMENT
LOWrelay/channel/jimeng/sign.go21)COMMENT
LOWrelay/channel/volcengine/adaptor.go121 // for key, values := range formData {COMMENT
LOWrelay/channel/volcengine/adaptor.go141 // for fieldName, files := range c.Request.MultipartForm.File {COMMENT
LOWrelay/channel/volcengine/adaptor.go161 // defer file.Close()COMMENT
LOWrelay/channel/volcengine/adaptor.go181 // }COMMENT
LOWrelay/channel/volcengine/adaptor.go201 //COMMENT
LOWrelay/channel/xai/dto.go21 // Size string `json:"size,omitempty"`COMMENT
LOWrelay/channel/zhipu_4v/dto.go1package zhipu_4vCOMMENT
LOWrelay/channel/zhipu_4v/dto.go21// Temperature float64 `json:"temperature,omitempty"`COMMENT
LOWrelay/channel/task/jsplugin/submit_stream.go21// arrives, and frameLimit bounds each event.COMMENT
LOWrelay/channel/tencent/dto.go1package tencentCOMMENT
LOWrelay/channel/tencent/dto.go21 Messages []*TencentMessage `json:"Messages"`COMMENT
LOWrelay/channel/ali/adaptor.go141 // info.IsStream = trueCOMMENT
LOWrelay/channel/ali/web_search.go21const (COMMENT
LOWrelay/channel/ali/web_search.go101 aliSearchAgentKey: int(count.Int()),COMMENT
LOWrelay/common/relay_info.go181 // ImageQuotaBeforeGroup is the frozen legacy estimate before request ratios.COMMENT
LOWrelay/common/relay_info.go201 VendorToolUsage func(raw []byte) map[string]intCOMMENT
LOWrelay/common/outbound_body.go1package commonCOMMENT
Fake / Example Data23 hits · 24 pts
SeverityFileLineSnippetContext
LOWweb/src/features/profile/__tests__/settings.test.tsx294 expect(threshold).toHaveAttribute('placeholder', '0.002')CODE
LOW…ponents/dialogs/__tests__/user-binding-dialog.test.tsx109 email: 'user@example.com',CODE
LOW…res/keys/components/__tests__/api-key-listing.test.tsx317 data: { success: true, data: { key: 'fake-key-for-test-only' } },CODE
LOW…res/keys/components/__tests__/api-key-listing.test.tsx430 ? { data: { success: true, data: { key: 'fake-key-for-test-only' } } }CODE
LOW…res/keys/components/__tests__/api-key-listing.test.tsx440 expect(copy).toHaveBeenCalledWith('sk-fake-key-for-test-only')CODE
LOW…ls/components/__tests__/channel-configuration.test.tsx235 'placeholder',CODE
LOW…ls/components/__tests__/channel-configuration.test.tsx246 'placeholder',CODE
LOW…ls/components/__tests__/channel-configuration.test.tsx256 'placeholder',CODE
LOW…ls/components/__tests__/channel-configuration.test.tsx309 await waitFor(() => expect(address).toHaveAttribute('placeholder', url))CODE
LOW…ls/components/__tests__/channel-configuration.test.tsx339 expect(address).toHaveAttribute('placeholder', 'Leave empty to use default')CODE
LOWweb/src/components/json-code-editor.tsx220 editor.textarea.removeAttribute('placeholder')CODE
LOW…s/json-code-editor/__tests__/json-code-editor.test.tsx49 expect(textarea).toHaveAttribute('placeholder', '{"model":"gpt"}')CODE
LOWcontroller/token_test.go668 user := &model.User{Username: "quota-owner", Password: "placeholder", Role: common.RoleCommonUser, Status: common.UseCODE
LOW⚡controller/token_test.go768 user := &model.User{Username: "token-owner", Password: "placeholder", Role: common.RoleCommonUser, Status: common.UserSCODE
LOW⚡controller/token_test.go770 other := &model.User{Username: "other-owner", Password: "placeholder", Role: common.RoleCommonUser, Status: common.UserCODE
LOW⚡controller/token_test.go772 session := &model.UserSession{SID: "token-audit-session", UserID: user.Id, Version: 1, UserAuthVersion: 1, Status: modeCODE
LOWcontroller/access_token_audit_test.go58 user := &model.User{Username: "audit-owner", Password: "placeholder", Role: common.RoleAdminUser, Status: common.UserStCODE
LOWcontroller/access_token_audit_test.go218 other := &model.User{Username: "audit-other", Password: "placeholder", Role: common.RoleCommonUser, Status: common.UserCODE
LOWcontroller/access_token_audit_test.go431 other := &model.User{Username: "audit-other", Password: "placeholder", Role: common.RoleCommonUser, Status: common.UserCODE
LOWcontroller/access_token_audit_test.go650 session := &model.UserSession{SID: "audit-permissions-session", UserID: admin.Id, Version: 1, UserAuthVersion: 1, StatuCODE
LOWcontroller/access_token_audit_test.go1074 require.NoError(t, db.Create(&releasedAuditUser{Username: "released-owner", Password: "placeholder", AccessToken: CODE
LOWcontroller/access_token_audit_test.go1082 require.NoError(t, db.Create(&model.User{Username: "fresh-owner", Password: "placeholder", AffCode: "fresh-aff"}).CODE
LOWcontroller/access_token_audit_test.go1101 require.Error(t, db.Create(&model.User{Username: "duplicate", Password: "placeholder", AffCode: "duplicate-aff", AcCODE
Structural Annotation Overuse7 hits · 10 pts
SeverityFileLineSnippetContext
LOW…features/models/hooks/use-model-deployment-settings.ts74 // Step 1: Fetch settings first (usually fast)COMMENT
LOW…features/models/hooks/use-model-deployment-settings.ts90 // Step 2: Check connection (check cache first)COMMENT
LOW.agents/skills/i18n-translate/SKILL.md66### Step 1: Run sync and read reportCOMMENT
LOW.agents/skills/i18n-translate/SKILL.md74### Step 2: Find missing keys (used in code but not in locale files)COMMENT
LOW.agents/skills/i18n-translate/SKILL.md137### Step 3: Find untranslated entries (value equals English)COMMENT
LOW.agents/skills/i18n-translate/SKILL.md197### Step 4: Add translationsCOMMENT
LOW.agents/skills/i18n-translate/SKILL.md258### Step 5: Verify and clean upCOMMENT
Decorative Section Separators3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMrelay/channel/adapter.go42 // ── Billing ──────────────────────────────────────────────────────COMMENT
MEDIUMrelay/channel/adapter.go66 // ── Request / Response ───────────────────────────────────────────COMMENT
MEDIUMrelay/channel/adapter.go78 // ── Polling ──────────────────────────────────────────────────────COMMENT
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHAGENTS.md185**Issues:** When opening a GitHub issue, first refuse out-of-scope requests listed in `.agents/github/ISSUE.md` (Coding CODE
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…features/models/hooks/use-model-deployment-settings.ts74 // Step 1: Fetch settings first (usually fast)COMMENT
LOW…features/models/hooks/use-model-deployment-settings.ts90 // Step 2: Check connection (check cache first)COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdocker-compose.dev.yml3# Usage:COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmodel/user.go77// User if you add sensitive fields, don't forget to clean them in setupLogin function.COMMENT