Repository Analysis

CJackHwang/ds2api

DeepSeek-Compatible Middleware Interface: A technical exploration project in Go, focusing on high-concurrency protocol adaptation. It serves as a reference implementation for converting diverse web protocols into standardized formats.

5.5 Low AI signal View on GitHub
5.5
Adjusted Score
5.5
Raw Score
100%
Time Factor
2026-05-10
Last Push
4,628
Stars
Go
Language
90,060
Lines of Code
522
Files
220
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 3HIGH 35MEDIUM 58LOW 124

Pattern Findings

220 matches across 7 categories. Click a row to expand file-level details.

Magic Placeholder Names35 hits · 185 pts
SeverityFileLineSnippet
HIGHAPI.md256Authorization: Bearer your-api-key
HIGHAPI.md498x-api-key: your-api-key
HIGHAPI.md1287 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1300 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1313 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1326 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1338 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1351 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1379 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1395 -H "Authorization: Bearer your-api-key" \
HIGHAPI.md1411 -H "x-api-key: your-api-key" \
HIGHAPI.md1425 -H "x-api-key: your-api-key" \
HIGHAPI.md1448 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md255Authorization: Bearer your-api-key
HIGHAPI.en.md493x-api-key: your-api-key
HIGHAPI.en.md1279 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1292 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1305 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1318 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1330 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1343 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1371 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1387 -H "Authorization: Bearer your-api-key" \
HIGHAPI.en.md1403 -H "x-api-key: your-api-key" \
HIGHAPI.en.md1417 -H "x-api-key: your-api-key" \
HIGHAPI.en.md1440 -H "Authorization: Bearer your-api-key" \
HIGHconfig.example.json5 "your-api-key-1",
HIGHconfig.example.json6 "your-api-key-2"
HIGHconfig.example.json10 "key": "your-api-key-1",
HIGHconfig.example.json15 "key": "your-api-key-2",
HIGHdocs/DEPLOY.md617 -H "Authorization: Bearer your-api-key" \
HIGHdocs/DEPLOY.en.md607 -H "Authorization: Bearer your-api-key" \
HIGHwebui/src/utils/batchImportTemplates.js14 keys: ['your-api-key'],
HIGHwebui/src/utils/batchImportTemplates.js26 keys: ['your-api-key'],
HIGHwebui/src/components/BatchImport.jsx156 placeholder={'{\n "keys": ["your-api-key"],\n "accounts": [\n {"email": "...", "password":
Decorative Section Separators56 hits · 168 pts
SeverityFileLineSnippet
MEDIUMinternal/sse/parser_edge_test.go5// ─── ParseDeepSeekSSELine edge cases ─────────────────────────────────
MEDIUMinternal/sse/parser_edge_test.go45// ─── shouldSkipPath edge cases ───────────────────────────────────────
MEDIUMinternal/sse/parser_edge_test.go101// ─── ParseSSEChunkForContent edge cases ──────────────────────────────
MEDIUMinternal/sse/parser_edge_test.go215// ─── ParseSSEChunkForContent: fragments path with THINK type ─────────
MEDIUMinternal/sse/parser_edge_test.go307// ─── ParseSSEChunkForContent: response path with nested fragment ─────
MEDIUMinternal/sse/parser_edge_test.go351// ─── ParseSSEChunkForContent: map value with wrapped response ────────
MEDIUMinternal/sse/parser_edge_test.go439// ─── ParseSSEChunkForContent: fragments/-1/content path ──────────────
MEDIUMinternal/sse/parser_edge_test.go452// ─── IsCitation edge cases ───────────────────────────────────────────
MEDIUMinternal/sse/parser_edge_test.go472// ─── extractContentRecursive edge cases ──────────────────────────────
MEDIUMinternal/sse/consumer_edge_test.go11// ─── CollectStream edge cases ────────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go12// ─── EstimateTokens edge cases ───────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go62// ─── ToBool edge cases ───────────────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go88// ─── IntFrom edge cases ─────────────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go120// ─── WriteJSON ───────────────────────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go150// ─── MessagesPrepare edge cases ──────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go240// ─── normalizeContent edge cases ─────────────────────────────────────
MEDIUMinternal/util/util_edge_test.go295// ─── ConvertClaudeToDeepSeek edge cases ──────────────────────────────
MEDIUMinternal/config/config_edge_test.go10// ─── GetModelConfig edge cases ───────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go142// ─── lower function ──────────────────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go163// ─── Config.MarshalJSON / UnmarshalJSON roundtrip ────────────────────
MEDIUMinternal/config/config_edge_test.go297// ─── Config.Clone ────────────────────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go340// ─── Account.Identifier edge cases ───────────────────────────────────
MEDIUMinternal/config/config_edge_test.go363// ─── normalizeConfigInput ────────────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go386// ─── parseConfigString edge cases ────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go424// ─── Store methods ───────────────────────────────────────────────────
MEDIUMinternal/config/config_edge_test.go671// ─── OpenAIModelsResponse / ClaudeModelsResponse ─────────────────────
MEDIUMinternal/auth/auth_edge_test.go13// ─── extractCallerToken edge cases ───────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go71// ─── Context helpers ─────────────────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go89// ─── RefreshToken edge cases ─────────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go126// ─── MarkTokenInvalid edge cases ─────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go162// ─── SwitchAccount edge cases ────────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go274// ─── Release edge cases ─────────────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go293// ─── JWT edge cases ──────────────────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go335// ─── VerifyAdminRequest edge cases ───────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go378// ─── Determine with login failure ────────────────────────────────────
MEDIUMinternal/auth/auth_edge_test.go399// ─── Determine with target account ───────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go8// ─── normalizeClaudeMessages ─────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go306// ─── buildClaudeToolPrompt ───────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go388// ─── hasSystemMessage ────────────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go423// ─── extractClaudeToolNames ──────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go487// ─── toMessageMaps ───────────────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go521// ─── extractMessageContent ──────────────────────────────────────────
MEDIUMinternal/httpapi/claude/handler_util_test.go551// ─── cloneMap ────────────────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go11// ─── reverseAccounts ─────────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go44// ─── intFromQuery edge cases ─────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go81// ─── nilIfEmpty ──────────────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go95// ─── nilIfZero ───────────────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go115// ─── toStringSlice ───────────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go173// ─── toAccount edge cases ────────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go205// ─── fieldString edge cases ──────────────────────────────────────────
MEDIUMinternal/httpapi/admin/shared/helpers_edge_test.go228// ─── statusOr ────────────────────────────────────────────────────────
MEDIUMinternal/deepseek/client/deepseek_edge_test.go8// ─── toFloat64 edge cases ────────────────────────────────────────────
MEDIUMinternal/deepseek/client/deepseek_edge_test.go46// ─── toInt64 edge cases ──────────────────────────────────────────────
MEDIUMinternal/deepseek/client/deepseek_edge_test.go78// ─── BuildPowHeader edge cases ───────────────────────────────────────
MEDIUMinternal/deepseek/client/deepseek_edge_test.go108// ─── NewClient ───────────────────────────────────────────────────────
MEDIUMinternal/account/pool_edge_test.go12// ─── Pool edge cases ─────────────────────────────────────────────────
Hyper-Verbose Identifiers97 hits · 82 pts
SeverityFileLineSnippet
LOWtests/node/chat-stream.test.js127async function runMockVercelStreamSequence(upstreamSequences, prepareOverrides = {}) {
LOWinternal/js/chat-stream/stream_emitter.js6function createChatCompletionEmitter({ res, sessionID, created, model, isClosed }) {
LOWinternal/js/chat-stream/sse_parse_impl.js457function filterLeakedContentFilterParts(parts) {
LOWinternal/js/chat-stream/sse_parse_impl.js479function stripLeakedContentFilterSuffix(text) {
LOWinternal/js/chat-stream/sse_parse_impl.js494function shouldDropCleanedLeakedChunk(cleaned) {
LOWinternal/js/chat-stream/sse_parse_impl.js515function hasContentFilterStatusValue(v) {
LOWinternal/js/chat-stream/sse_parse_impl.js544function extractAccumulatedTokenUsage(chunk) {
LOWinternal/js/chat-stream/sse_parse_impl.js624function stripReferenceMarkersText(text) {
LOWinternal/js/chat-stream/index.js89function isNodeStreamSupportedPath(rawURL) {
LOWinternal/js/chat-stream/toolcall_policy.js22function normalizePreparedToolNames(v) {
LOWinternal/js/chat-stream/toolcall_policy.js41function formatIncrementalToolCallDeltas(deltas, idStore) {
LOWinternal/js/chat-stream/toolcall_policy.js75function filterIncrementalToolCallDeltasByAllowed(deltas, allowedNames, seenNames) {
LOWinternal/js/chat-stream/vercel_stream_impl.js489function clonePayloadForEmptyOutputRetry(payload, parentMessageID) {
LOWinternal/js/chat-stream/vercel_stream_impl.js500function appendEmptyOutputRetrySuffix(prompt) {
LOWinternal/js/chat-stream/vercel_stream_impl.js508function usagePromptWithEmptyOutputRetry(originalPrompt, attempts) {
LOWinternal/js/chat-stream/vercel_stream_impl.js530function prepareContinueStateForNextRound(state) {
LOWinternal/js/chat-stream/vercel_stream_impl.js558function observeContinueDirectPatch(state, path, value) {
LOWinternal/js/chat-stream/vercel_stream_impl.js580function observeContinueResponseObject(state, response) {
LOWinternal/js/chat-stream/vercel_stream_impl.js594function observeContinueBatchPatches(state, parentPath, raw) {
LOWinternal/js/chat-stream/vercel_stream_impl.js656function upstreamEmptyOutputDetail(contentFilter, _text, thinking) {
LOWinternal/js/helpers/stream-tool-sieve/sieve.js167function splitSafeContentForToolDetection(state, s) {
LOWinternal/js/helpers/stream-tool-sieve/sieve.js275function shouldResetUnclosedMarkdownPrefix(state, prefix, suffix) {
LOWinternal/js/helpers/stream-tool-sieve/format.js5function formatOpenAIStreamToolCalls(calls, idStore, toolsRaw) {
LOWinternal/js/helpers/stream-tool-sieve/format.js21function normalizeParsedToolCallsForSchemas(calls, toolsRaw) {
LOWinternal/js/helpers/stream-tool-sieve/format.js80function normalizeToolValueWithSchema(value, schema) {
LOWinternal/js/helpers/stream-tool-sieve/format.js127function shouldCoerceSchemaToString(schema) {
LOWinternal/js/helpers/stream-tool-sieve/parse.js78function parseStandaloneToolCallsDetailed(text, toolNames) {
LOWinternal/js/helpers/stream-tool-sieve/parse.js141function shouldSkipToolCallParsingForCodeFenceExample(text) {
LOWinternal/js/helpers/stream-tool-sieve/state.js25function resetIncrementalToolState(state) {
LOWinternal/js/helpers/stream-tool-sieve/state.js43function looksLikeToolExampleContext(text) {
LOWinternal/js/helpers/stream-tool-sieve/state.js69function insideMarkdownCodeSpanWithState(state, text) {
LOWinternal/js/helpers/stream-tool-sieve/state.js77function updateMarkdownCodeSpanState(state, text) {
LOWinternal/js/helpers/stream-tool-sieve/state.js85function simulateMarkdownCodeSpanTicks(state, initialTicks, text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js869function toolMarkupPrefixContainsSlash(prefix) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js878function isToolMarkupTagTerminator(raw, idx) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js882function consumeToolMarkupNamePrefixOnce(raw, lower, idx) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js1280function normalizeCanonicalToolAttrKey(rawKey) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js1289function quoteCanonicalXMLAttrValue(rawValue) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js1293function removeToolMarkupIgnorables(rawValue) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js218function findToolCallElementBlocksOutsideIgnored(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js248function normalizeDSMLToolCallMarkup(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js268function containsCanonicalToolMarkup(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js272function containsToolCallWrapperSyntaxOutsideIgnored(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js313function containsToolMarkupSyntaxOutsideIgnored(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js351function replaceDSMLToolMarkupOutsideIgnored(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js386function parseMarkupSingleToolCall(block) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js455function findXmlStartTagOutsideCDATA(text, tag, from) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js483function findMatchingXmlEndTagOutsideCDATA(text, tag, from) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js649function findToolMarkupTagOutsideIgnored(text, from) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js674function findMatchingToolMarkupClose(text, openTag) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js702function findPartialToolMarkupStart(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js716function includeDuplicateLeadingLessThan(text, idx) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js742function isToolMarkupWhitespaceLike(ch) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js746function isPartialToolMarkupTagPrefix(text) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js785function consumeToolMarkupNamePrefix(raw, lower, idx) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js798function matchToolMarkupNameAfterArbitraryPrefix(raw, start) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js818function hasPartialToolMarkupNameAfterArbitraryPrefix(raw, start) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js834function hasDSMLNamePrefixOrPartial(raw, start) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js839function toolMarkupPrefixAllowsLocalName(prefix) {
LOWinternal/js/helpers/stream-tool-sieve/parse_payload.js853function toolMarkupPrefixAllowsLocalNameAt(raw, start, localStart) {
37 more matches not shown…
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippet
CRITICALtests/复杂场合测试.json77 "content": "{\"error\":\"[java.lang.IllegalArgumentException] Search failed: no results found\\njava.lang.IllegalArg
CRITICALtests/复杂场合测试.json155 "content": "{\"error\":\"[java.lang.IllegalArgumentException] Search failed: no results found\\njava.lang.IllegalArg
CRITICALtests/复杂场合测试.json231 "content": "{\"error\":\"[java.lang.IllegalArgumentException] Search failed: no results found\\njava.lang.IllegalArg
Fake / Example Data26 hits · 24 pts
SeverityFileLineSnippet
LOWAPI.md729 "identifier": "user@example.com",
LOWAPI.md730 "email": "user@example.com",
LOWAPI.md759 {"email": "user@example.com", "password": "pwd", "token": ""}
LOWAPI.md889 "identifier": "user@example.com",
LOWAPI.md890 "email": "user@example.com",
LOWAPI.md908{"email": "user@example.com", "password": "pwd"}
LOWAPI.md979 "account": "user@example.com",
LOWAPI.md1014{"identifier":"user@example.com"}
LOWAPI.md1035 {"email": "user@example.com", "password": "pwd", "token": ""}
LOWAPI.en.md723 "identifier": "user@example.com",
LOWAPI.en.md724 "email": "user@example.com",
LOWAPI.en.md753 {"email": "user@example.com", "password": "pwd", "token": ""}
LOWAPI.en.md878 "identifier": "user@example.com",
LOWAPI.en.md879 "email": "user@example.com",
LOWAPI.en.md899{"email": "user@example.com", "password": "pwd"}
LOWAPI.en.md970 "account": "user@example.com",
LOWAPI.en.md1005{"identifier":"user@example.com"}
LOWAPI.en.md1027 {"email": "user@example.com", "password": "pwd", "token": ""}
LOWinternal/config/config_edge_test.go168 Accounts: []Account{{Email: "user@example.com", Password: "pass", Token: "tok"}},
LOWinternal/config/config_edge_test.go201 if len(decoded.Accounts) != 1 || decoded.Accounts[0].Email != "user@example.com" {
LOWinternal/config/config_test.go364 "accounts":[{"email":"user@example.com","password":"p"}]
LOWinternal/chathistory/store_test.go50 AccountID: "user@example.com",
LOWinternal/httpapi/admin/handler_test.go16 "email": "user@example.com",
LOWinternal/httpapi/admin/handler_test.go19 if acc.Email != "user@example.com" {
LOW…nal/httpapi/admin/history/handler_chat_history_test.go40 AccountID: "user@example.com",
LOWwebui/src/features/account/AddAccountModal.jsx51 placeholder="user@example.com"
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMinternal/deepseek/client/client_continue.go34// The caller sees a single, seamless SSE stream.
MEDIUMinternal/toolcall/toolcalls_markup.go96 // 2. If no CDATA, we still want to be robust.
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippet
LOW…ternal/httpapi/openai/shared/leaked_output_sanitize.go21