Repository Analysis

su-kaka/gcli2api

将 GeminiCLI 和 Antigravity 转换为 OpenAI 、GEMINI 和 Claude API 接口

20.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of su-kaka/gcli2api, a Python project with 4,977 GitHub stars. SynthScan v2.0 examined 36,928 lines of code across 74 source files, recording 671 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 20.1 places this repository in the Moderate 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).

20.1
Adjusted Score
20.1
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.0K
Stars
Python
Language
36.9K
Lines of Code
74
Files
671
Pattern Hits
2026-07-14
Scan Date
0.09
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

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

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 7MEDIUM 40LOW 624

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 671 distinct pattern matches across 11 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.

Excessive Try-Catch Wrapping314 hits · 284 pts
SeverityFileLineSnippetContext
LOWweb.py52 except Exception as e:CODE
LOWweb.py61 except Exception as e:CODE
LOWweb.py70 except Exception as e:CODE
LOWweb.py81 except Exception as e:CODE
LOWweb.py88 except Exception as e:CODE
LOWweb.py96 except Exception as e:CODE
LOWconfig.py67 except Exception:CODE
LOWconfig.py88 except Exception:CODE
LOWlog.py68 except Exception:CODE
LOWlog.py108 except Exception as e:CODE
LOWlog.py146 except Exception as e:CODE
LOWlog.py151 except Exception:CODE
LOWlog.py160 except Exception:CODE
LOWlog.py87 except Exception as e:CODE
LOWlog.py172 except Exception:CODE
MEDIUMsrc/auth.py102def patched_validate(params):CODE
MEDIUMsrc/auth.py952def shutdown_server_async():CODE
LOWsrc/auth.py506 except Exception as e:CODE
LOWsrc/auth.py510 except Exception as e:CODE
LOWsrc/auth.py761 except Exception as e:CODE
LOWsrc/auth.py765 except Exception as e:CODE
LOWsrc/auth.py87 except Exception as e:CODE
LOWsrc/auth.py142 except Exception:CODE
LOWsrc/auth.py253 except Exception as e:CODE
LOWsrc/auth.py298 except Exception as e:CODE
LOWsrc/auth.py336 except Exception as e:CODE
LOWsrc/auth.py870 except Exception as e:CODE
LOWsrc/auth.py882 except Exception as e:CODE
LOWsrc/auth.py902 except Exception as e:CODE
LOWsrc/auth.py906 except Exception as e:CODE
LOWsrc/auth.py941 except Exception as e:CODE
LOWsrc/auth.py963 except Exception as e:CODE
LOWsrc/auth.py977 except Exception as e:CODE
LOWsrc/auth.py1009 except Exception as e:CODE
LOWsrc/credential_manager.py129 except Exception as e:CODE
LOWsrc/credential_manager.py150 except Exception as e:CODE
LOWsrc/credential_manager.py168 except Exception as e:CODE
LOWsrc/credential_manager.py177 except Exception as e:CODE
LOWsrc/credential_manager.py189 except Exception as e:CODE
LOWsrc/credential_manager.py239 except Exception as e:CODE
LOWsrc/credential_manager.py300 except Exception as e:CODE
LOWsrc/credential_manager.py350 except Exception as e:CODE
LOWsrc/credential_manager.py354 except Exception as e:CODE
LOWsrc/credential_manager.py374 except Exception as e:CODE
LOWsrc/credential_manager.py397 except Exception as e:CODE
LOWsrc/credential_manager.py425 except Exception as e2:CODE
LOWsrc/keeplive.py30 except Exception as e:CODE
LOWsrc/google_oauth_api.py113 except Exception as e:CODE
LOWsrc/google_oauth_api.py243 except Exception as e:CODE
LOWsrc/google_oauth_api.py315 except Exception as e:CODE
LOWsrc/google_oauth_api.py344 except Exception as e:CODE
LOWsrc/google_oauth_api.py369 except Exception as e:CODE
LOWsrc/google_oauth_api.py386 except Exception as e:CODE
LOWsrc/google_oauth_api.py400 except Exception as e:CODE
LOWsrc/google_oauth_api.py439 except Exception as e:CODE
LOWsrc/google_oauth_api.py460 except Exception as e:CODE
LOWsrc/google_oauth_api.py465 except Exception as e:CODE
LOWsrc/google_oauth_api.py505 except Exception as e:CODE
LOWsrc/google_oauth_api.py608 except Exception as e:CODE
LOWsrc/google_oauth_api.py625 except Exception as e:CODE
254 more matches not shown…
Hyper-Verbose Identifiers143 hits · 139 pts
SeverityFileLineSnippetContext
LOWconfig.py185async def get_anti_truncation_max_attempts() -> int:CODE
LOWconfig.py304async def get_compatibility_mode_enabled() -> bool:CODE
LOWconfig.py322async def get_return_thoughts_to_frontend() -> bool:CODE
LOWconfig.py358async def get_antigravity_switch_credential_enabled() -> bool:CODE
LOWconfig.py410async def get_resource_manager_api_url() -> str:CODE
LOWconfig.py429async def get_service_usage_api_url() -> str:CODE
LOWfront/common.js1458function refreshAntigravityCredsList() { AppState.antigravityCreds.refresh(); }CODE
LOWfront/common.js1459function applyAntigravityStatusFilter() { AppState.antigravityCreds.applyStatusFilter(); }CODE
LOWfront/common.js1461function changeAntigravityPageSize() { AppState.antigravityCreds.changePageSize(); }CODE
LOWfront/common.js1462function toggleAntigravityFileSelection(filename) {CODE
LOWfront/common.js1470function toggleSelectAllAntigravity() {CODE
LOWfront/common.js792async function toggleAntigravityCredDetails(pathId) {CODE
LOWfront/common.js1202async function getAntigravityCredentials() {CODE
LOWfront/common.js1239function downloadAntigravityCredentials() {CODE
LOWfront/common.js1283function toggleAntigravityCallbackUrlSection() {CODE
LOWfront/common.js1351async function processAntigravityCallbackUrl() {CODE
LOWfront/common.js1502async function downloadAllAntigravityCreds() {CODE
LOWfront/common.js1526function handleAntigravityFileSelect(event) { AppState.antigravityUploadFiles.handleFileSelect(event); }CODE
LOWfront/common.js1527function handleAntigravityFileDrop(event) {CODE
LOWfront/common.js1584async function fetchAntigravityUserEmail(filename) {CODE
LOWfront/common.js1641async function verifyAntigravityProjectId(filename) {CODE
LOWfront/common.js1726async function testAntigravityCredential(filename) {CODE
LOWfront/common.js1818async function toggleAntigravityQuotaDetails(pathId) {CODE
LOWfront/common.js1942async function toggleAntigravityErrorDetails(pathId) {CODE
LOWfront/common.js2189async function batchVerifyAntigravityProjectIds() {CODE
LOWfront/common.js2371async function refreshAllAntigravityEmails() {CODE
LOWfront/common.js2423async function deduplicateAntigravityByEmail() {CODE
LOWsrc/auth.py515async def asyncio_complete_auth_flow(CODE
LOWsrc/auth.py770async def complete_auth_flow_from_callback_url(CODE
LOWsrc/auth.py45def _prepare_credentials_data(credentials: Credentials, project_id: str, mode: str = "geminicli", subscription_tier: strCODE
LOWsrc/auth.py78def _cleanup_auth_flow_server(state: str):CODE
LOWsrc/auth.py122def cleanup_auth_flows_for_memory():CODE
LOWsrc/credential_manager.py113 async def add_antigravity_credential(self, credential_name: str, credential_data: Dict[str, Any]):CODE
LOWsrc/credential_manager.py433 def _is_permanent_refresh_failure(self, error_msg: str, status_code: Optional[int] = None) -> bool:CODE
LOWsrc/google_oauth_api.py374async def fetch_user_email_from_file(cred_data: Dict[str, Any]) -> Optional[str]:CODE
LOWsrc/google_oauth_api.py534async def fetch_project_id_and_tier(CODE
LOWsrc/utils.py81def get_base_model_from_feature_model(model_name: str) -> str:CODE
LOWsrc/storage_adapter.py53 async def get_all_credential_states(self, mode: str = "geminicli") -> Dict[str, Dict[str, Any]]:CODE
LOWsrc/storage_adapter.py195 async def get_all_credential_states(self, mode: str = "geminicli") -> Dict[str, Dict[str, Any]]:CODE
LOWsrc/storage_adapter.py224 async def export_credential_to_json(self, filename: str, output_path: str = None) -> bool:CODE
LOWsrc/storage_adapter.py246 async def import_credential_from_json(self, json_path: str, filename: str = None) -> bool:CODE
LOWsrc/panel/creds.py39async def extract_json_files_from_zip(zip_file: UploadFile) -> List[dict]:CODE
LOWsrc/panel/creds.py91async def clear_all_model_cooldowns_for_credential(CODE
LOWsrc/panel/creds.py105async def upload_credentials_common(CODE
LOWsrc/panel/creds.py1057async def deduplicate_credentials_by_email(CODE
LOWsrc/panel/creds.py301async def download_all_creds_common(mode: str = "geminicli") -> Response:CODE
LOWsrc/panel/creds.py377async def refresh_all_user_emails_common(mode: str = "geminicli") -> JSONResponse:CODE
LOWsrc/panel/creds.py445async def deduplicate_credentials_by_email_common(mode: str = "geminicli") -> JSONResponse:CODE
LOWsrc/panel/creds.py532async def verify_credential_project_common(filename: str, mode: str = "geminicli") -> JSONResponse:CODE
LOWsrc/panel/creds.py1090async def verify_credential_project(CODE
LOWsrc/panel/creds.py1223async def configure_preview_channel(CODE
LOWsrc/converter/anti_truncation.py78def apply_regex_replacements_to_payload(payload: Dict[str, Any]) -> Dict[str, Any]:CODE
LOWsrc/converter/anti_truncation.py432 def _extract_content_from_chunk(self, data: Dict[str, Any]) -> str:CODE
LOWsrc/converter/anti_truncation.py459 async def _handle_non_streaming_response(self, response) -> bytes:CODE
LOWsrc/converter/anti_truncation.py543 def _check_done_marker_in_text(self, text: str) -> bool:CODE
LOWsrc/converter/anti_truncation.py551 def _check_done_marker_in_chunk_content(self, content: str) -> bool:CODE
LOWsrc/converter/anti_truncation.py555 def _extract_content_from_response(self, data: Dict[str, Any]) -> str:CODE
LOWsrc/converter/anti_truncation.py580 def _remove_done_marker_from_line(self, line: bytes, line_str: str, data: Dict[str, Any]) -> bytes:CODE
LOWsrc/converter/anti_truncation.py686async def apply_anti_truncation_to_stream(CODE
LOWsrc/converter/anti_truncation.py721def is_anti_truncation_enabled(request_data: Dict[str, Any]) -> bool:CODE
83 more matches not shown…
Decorative Section Separators36 hits · 138 pts
SeverityFileLineSnippetContext
MEDIUMlog.py22# -----------------------------------------------------------------COMMENT
MEDIUMlog.py26# -----------------------------------------------------------------COMMENT
MEDIUMlog.py32# -----------------------------------------------------------------COMMENT
MEDIUMlog.py34# -----------------------------------------------------------------COMMENT
MEDIUMlog.py58# -----------------------------------------------------------------COMMENT
MEDIUMlog.py60# -----------------------------------------------------------------COMMENT
MEDIUMlog.py112# -----------------------------------------------------------------COMMENT
MEDIUMlog.py114# -----------------------------------------------------------------COMMENT
MEDIUMlog.py203# -----------------------------------------------------------------COMMENT
MEDIUMlog.py205# -----------------------------------------------------------------COMMENT
MEDIUMlog.py224# -----------------------------------------------------------------COMMENT
MEDIUMlog.py226# -----------------------------------------------------------------COMMENT
MEDIUMsrc/panel/creds.py34# =============================================================================COMMENT
MEDIUMsrc/panel/creds.py36# =============================================================================COMMENT
MEDIUMsrc/panel/creds.py636# =============================================================================COMMENT
MEDIUMsrc/panel/creds.py638# =============================================================================COMMENT
MEDIUMsrc/panel/utils.py17# =============================================================================COMMENT
MEDIUMsrc/panel/utils.py19# =============================================================================COMMENT
MEDIUMsrc/panel/utils.py98# =============================================================================COMMENT
MEDIUMsrc/panel/utils.py100# =============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py27# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py29# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py189# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py191# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py389# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py391# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py581# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py583# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py706# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py708# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py263# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py265# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py356# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py358# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py622# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py624# ============================================================================COMMENT
Deep Nesting136 hits · 114 pts
SeverityFileLineSnippetContext
LOWlog.py119CODE
LOWsrc/token_estimator.py7CODE
LOWsrc/token_estimator.py13CODE
LOWsrc/auth.py122CODE
LOWsrc/auth.py233CODE
LOWsrc/auth.py369CODE
LOWsrc/auth.py515CODE
LOWsrc/auth.py770CODE
LOWsrc/auth.py986CODE
LOWsrc/credential_manager.py243CODE
LOWsrc/credential_manager.py303CODE
LOWsrc/credential_manager.py358CODE
LOWsrc/credential_manager.py433CODE
LOWsrc/google_oauth_api.py405CODE
LOWsrc/google_oauth_api.py634CODE
LOWsrc/google_oauth_api.py716CODE
LOWsrc/google_oauth_api.py128CODE
LOWsrc/utils.py90CODE
LOWsrc/utils.py152CODE
LOWsrc/task_manager.py58CODE
LOWsrc/storage_adapter.py83CODE
LOWsrc/storage_adapter.py283CODE
LOWsrc/panel/auth.py80CODE
LOWsrc/panel/auth.py132CODE
LOWsrc/panel/version.py18CODE
LOWsrc/panel/config_routes.py94CODE
LOWsrc/panel/creds.py39CODE
LOWsrc/panel/creds.py105CODE
LOWsrc/panel/creds.py301CODE
LOWsrc/panel/creds.py445CODE
LOWsrc/panel/creds.py769CODE
LOWsrc/panel/creds.py872CODE
LOWsrc/panel/creds.py1223CODE
LOWsrc/panel/creds.py1451CODE
LOWsrc/panel/logs.py27CODE
LOWsrc/panel/logs.py98CODE
LOWsrc/converter/anti_truncation.py78CODE
LOWsrc/converter/anti_truncation.py216CODE
LOWsrc/converter/anti_truncation.py432CODE
LOWsrc/converter/anti_truncation.py459CODE
LOWsrc/converter/anti_truncation.py555CODE
LOWsrc/converter/anti_truncation.py580CODE
LOWsrc/converter/fake_stream.py162CODE
LOWsrc/converter/fake_stream.py356CODE
LOWsrc/converter/utils.py60CODE
LOWsrc/converter/anthropic2gemini.py128CODE
LOWsrc/converter/anthropic2gemini.py267CODE
LOWsrc/converter/anthropic2gemini.py407CODE
LOWsrc/converter/anthropic2gemini.py536CODE
LOWsrc/converter/anthropic2gemini.py585CODE
LOWsrc/converter/anthropic2gemini.py924CODE
LOWsrc/converter/gemini_fix.py60CODE
LOWsrc/converter/gemini_fix.py248CODE
LOWsrc/converter/gemini_fix.py294CODE
LOWsrc/converter/gemini_fix.py562CODE
LOWsrc/converter/gemini_fix.py650CODE
LOWsrc/converter/gemini_fix.py710CODE
LOWsrc/converter/openai2gemini.py100CODE
LOWsrc/converter/openai2gemini.py197CODE
LOWsrc/converter/openai2gemini.py347CODE
76 more matches not shown…
Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsrc/utils.py162 统一的灵活认证函数,支持多种认证方式 此函数可以直接用作 FastAPI 的 Depends 依赖 支持的认证方式: - URL 参数: key - HTTP 头部: AuthoSTRING
HIGHsrc/utils.py271 简化的控制面板密码验证函数 直接验证Bearer token是否等于控制面板密码 Args: credentials: HTTPAuthorizationCredentials 自动注入 STRING
HIGHsrc/panel/utils.py137 验证 mode 参数 Args: mode: 模式字符串 ("geminicli" 或 "antigravity") Returns: str: 验证后的 mode 字符串 STRING
HIGHsrc/converter/thoughtSignature_fix.py35 将 thoughtSignature 编码到工具调用ID中,以便往返保留。 Args: tool_id: 原始工具调用ID signature: thoughtSignature(可选) STRING
HIGHsrc/converter/thoughtSignature_fix.py57 从编码的ID中提取原始工具ID和thoughtSignature。 Args: encoded_id: 编码的工具调用ID Returns: (原始工具ID, thoughtSiSTRING
HIGHsrc/api/geminicli.py47 从凭证数据准备请求头和最终payload Args: payload: 原始请求payload credential_data: 凭证数据字典 target_urlSTRING
Unused Imports23 hits · 22 pts
SeverityFileLineSnippetContext
LOWsrc/token_estimator.py2CODE
LOWsrc/credential_manager.py6CODE
LOWsrc/panel/__init__.py29CODE
LOWsrc/panel/__init__.py29CODE
LOWsrc/panel/__init__.py29CODE
LOWsrc/panel/__init__.py29CODE
LOWsrc/converter/anthropic2gemini.py6CODE
LOWsrc/router/geminicli/gemini.py33CODE
LOWsrc/router/geminicli/gemini.py51CODE
LOWsrc/router/geminicli/openai.py35CODE
LOWsrc/router/geminicli/openai.py53CODE
LOWsrc/router/geminicli/anthropic.py15CODE
LOWsrc/router/geminicli/anthropic.py35CODE
LOWsrc/router/geminicli/anthropic.py53CODE
LOWsrc/router/antigravity/gemini.py15CODE
LOWsrc/router/antigravity/gemini.py35CODE
LOWsrc/router/antigravity/gemini.py53CODE
LOWsrc/router/antigravity/openai.py35CODE
LOWsrc/router/antigravity/openai.py53CODE
LOWsrc/router/antigravity/anthropic.py15CODE
LOWsrc/router/antigravity/anthropic.py23CODE
LOWsrc/router/antigravity/anthropic.py35CODE
LOWsrc/router/antigravity/anthropic.py53CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/api/vertex.py147 h["x-goog-ext-353267353-jspb"] = "[null,null,null,194274]"CODE
AI Structural Patterns5 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/panel/creds.py659CODE
LOWsrc/storage/psql_manager.py612CODE
LOWsrc/storage/sqlite_manager.py837CODE
LOWsrc/storage/mongodb_manager.py1017CODE
LOWsrc/router/vertex/gemini.py47CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWlog.py321# 2. 设置日志文件: export LOG_FILE=log.txt (或在 .env 中设置)COMMENT
LOWdocker-compose.yml21 # Optional: Google credentials from environmentCOMMENT
LOWdocker-compose.yml41 - ./data/creds:/app/credsCOMMENT
LOWdocker-compose.yml61# image: mongo:7COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWlog.py308__all__ = ["log", "set_log_level", "LOG_LEVELS"]CODE
LOWsrc/panel/__init__.py31__all__ = [CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWinstall.sh294# Check if web.py existsCOMMENT