Repository Analysis

router-for-me/CLIProxyAPI

Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Grok Build as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 3.1 Pro, GPT 5.5, Grok 4.3, Claude model through API

1.8 Likely human-written View on GitHub
1.8
Adjusted Score
1.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
35,452
Stars
Go
Language
166,055
Lines of Code
589
Files
207
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 6MEDIUM 17LOW 184

Pattern Findings

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

Over-Commented Block162 hits · 161 pts
SeverityFileLineSnippet
LOWconfig.example.yaml121 # Session IDs are extracted from: metadata.user_id (Claude Code session format),
LOWconfig.example.yaml141# bootstrap-retries: 1 # Default: 0 (disabled). Retries before first byte is sent.
LOWconfig.example.yaml161# proxy-url: "socks5://proxy.example.com:1080"
LOWconfig.example.yaml181# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
LOWconfig.example.yaml201# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
LOWconfig.example.yaml221# experimental-cch-signing: false # optional: default is false; when true, sign the final /v1/messages body using th
LOWconfig.example.yaml241# does not send the header. `user-agent` applies to HTTP and websocket requests;
LOWconfig.example.yaml261# models: # The models supported by the provider.
LOWconfig.example.yaml281# - api-key: "vk-123..." # x-goog-api-key header
LOWconfig.example.yaml301# # Optional: Override API key for Amp upstream (otherwise uses env or file)
LOWconfig.example.yaml321# # Useful when Amp CLI requests models you don't have access to (e.g., Claude Opus 4.5)
LOWconfig.example.yaml341# gemini-cli:
LOWconfig.example.yaml361# - name: "kimi-k2.5"
LOWconfig.example.yaml381# - "claude-3-5-haiku-20241022"
LOWconfig.example.yaml401# - "metadata.mode": "dev"
LOWconfig.example.yaml421# - models:
LOWcmd/fetch_codex_models/main.go1// Command fetch_codex_models connects to the Codex API using stored auth
LOWcmd/fetch_antigravity_models/main.go1// Command fetch_antigravity_models connects to the Antigravity API using the
LOWinternal/misc/claude_code_instructions.go1// Package misc provides miscellaneous utility functions and embedded data for the CLI Proxy API.
LOWinternal/util/provider.go21// - "gemini" for Google's Gemini family
LOWinternal/util/provider.go141// InArray checks if a string exists in a slice of strings.
LOWinternal/util/provider.go181//
LOWinternal/util/translator.go21// - path: The current path in the JSON structure (empty string for root)
LOWinternal/signature/claude_validation.go1// Claude thinking signature validation.
LOWinternal/signature/claude_validation.go21// After base64 decoding to raw bytes, the first byte must be 0x12:
LOWinternal/signature/claude_validation.go61)
LOWinternal/signature/gemini_validation.go1// Gemini thought signature validation notes.
LOWinternal/signature/gemini_validation.go21//
LOWinternal/signature/gemini_validation.go41// currently include Gemini 3.x field-2 -> field-1 payloads and Gemini 2.5
LOWinternal/signature/gemini_validation.go81)
LOWinternal/config/config.go201 // DisableAutoUpdatePanel disables automatic periodic background updates of the management panel asset from GitHub.
LOWinternal/config/config.go221 AntigravityCredits bool `yaml:"antigravity-credits" json:"antigravity-credits"`
LOWinternal/config/config.go281 // is used for the upstream Amp request.
LOWinternal/config/config.go361// CloakConfig configures request cloaking for non-Claude-Code clients.
LOWinternal/config/config.go601// and returns it.
LOWinternal/config/config.go661 // if errLegacy := yaml.Unmarshal(data, &legacy); errLegacy == nil {
LOWinternal/config/config.go741 cfg.SanitizeOAuthModelAlias()
LOWinternal/config/vertex_compat.go1package config
LOWinternal/config/sdk_config.go1// Package config provides configuration management for the CLI Proxy API server.
LOWinternal/config/sdk_config.go21
LOWinternal/auth/models.go1// Package auth provides authentication functionality for various AI service providers.
LOWinternal/auth/gemini/gemini_auth.go61// GetAuthenticatedClient configures and returns an HTTP client ready for making authenticated API calls.
LOWinternal/auth/gemini/gemini_auth.go121 return nil, fmt.Errorf("failed to unmarshal token: %w", err)
LOWinternal/auth/gemini/gemini_token.go41 Metadata map[string]any `json:"-"`
LOWinternal/auth/empty/token.go1// Package empty provides a no-operation token storage implementation.
LOWinternal/auth/claude/token.go41 // It is not exported to JSON directly to allow flattening during serialization.
LOWinternal/auth/claude/pkce.go1// Package claude provides authentication and token management functionality
LOWinternal/auth/claude/oauth_server.go41 // Code is the authorization code received from the OAuth provider
LOWinternal/auth/claude/anthropic_auth.go141// NewClaudeAuth creates a new Anthropic authentication service.
LOWinternal/auth/claude/anthropic_auth.go221 parsedCode = splits[0]
LOWinternal/auth/claude/anthropic_auth.go441 LastRefresh: bundle.LastRefresh,
LOWinternal/auth/codex/token.go41// SetMetadata allows external callers to inject metadata into the storage before saving.
LOWinternal/auth/codex/oauth_server.go241
LOWinternal/runtime/executor/antigravity_executor.go2081 }
LOWinternal/runtime/executor/claude_executor.go101// The reverse map is now computed per-request in remapOAuthToolNames so that
LOWinternal/runtime/executor/claude_executor.go1121}
LOWinternal/runtime/executor/claude_executor.go1881 }
LOWinternal/runtime/executor/claude_executor.go2041// so the total does not exceed the Anthropic API limit (currently 4).
LOW…rnal/translator/gemini/claude/gemini_claude_request.go21// ConvertClaudeRequestToGemini parses a Claude API request and returns a complete
LOW…nal/translator/gemini/claude/gemini_claude_response.go41//
102 more matches not shown…
Magic Placeholder Names6 hits · 56 pts
SeverityFileLineSnippet
HIGHconfig.example.yaml310# - "your-api-key-1"
HIGHconfig.example.yaml311# - "your-api-key-2"
HIGHconfig.example.yaml314# - "your-api-key-3"
HIGHconfig.example.yaml40 - "your-api-key-1"
HIGHconfig.example.yaml41 - "your-api-key-2"
HIGHconfig.example.yaml42 - "your-api-key-3"
AI Slop Vocabulary11 hits · 32 pts
SeverityFileLineSnippet
MEDIUM…nal/translator/gemini/claude/gemini_claude_response.go6// multiple response chunks to provide a seamless streaming experience.
MEDIUM…ernal/translator/codex/claude/codex_claude_response.go6// multiple response chunks to provide a seamless streaming experience.
MEDIUM…slator/gemini-cli/claude/gemini-cli_claude_response.go6// multiple response chunks to provide a seamless streaming experience.
MEDIUM…ator/antigravity/claude/antigravity_claude_response.go6// multiple response chunks to provide a seamless streaming experience.
MEDIUM…penai/openai/chat-completions/openai_openai_request.go25 // For now, we'll return the original, but in a real scenario, logging or a more robust error
MEDIUMinternal/registry/models/codex_client_models.json55 "base_instructions": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your
MEDIUMinternal/registry/models/codex_client_models.json57 "instructions_template": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, an
MEDIUMinternal/registry/models/codex_client_models.json407 "base_instructions": "You are GPT-5.2 running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an
MEDIUMinternal/api/modules/amp/amp.go302 // Build map for efficient and robust comparison
MEDIUMsdk/api/handlers/claude/code_handlers.go5// between Claude API format and the underlying Gemini backend, providing seamless
MEDIUMsdk/api/handlers/claude/code_handlers.go6// API compatibility while maintaining robust error handling and connection management.
Fake / Example Data18 hits · 18 pts
SeverityFileLineSnippet
LOWinternal/watcher/watcher_test.go120 "email": "user@example.com",
LOWinternal/watcher/synthesizer/file_test.go546 "email": "user@example.com",
LOWinternal/runtime/executor/xai_executor_test.go52 "email": "user@example.com",
LOW…nal/runtime/executor/codex_websockets_executor_test.go192 Metadata: map[string]any{"email": "user@example.com"},
LOW…nal/runtime/executor/codex_websockets_executor_test.go237 Metadata: map[string]any{"email": "user@example.com"},
LOW…nal/runtime/executor/codex_websockets_executor_test.go262 Metadata: map[string]any{"email": "user@example.com"},
LOW…nal/runtime/executor/codex_websockets_executor_test.go291 Metadata: map[string]any{"email": "user@example.com"},
LOW…nal/runtime/executor/codex_websockets_executor_test.go468 Metadata: map[string]any{"email": "user@example.com"},
LOW…nal/runtime/executor/codex_websockets_executor_test.go491 Metadata: map[string]any{"email": "user@example.com"},
LOWinternal/redisqueue/plugin_test.go34 Source: "user@example.com",
LOWinternal/redisqueue/plugin_test.go93 Source: "user@example.com",
LOWinternal/redisqueue/plugin_test.go124 Source: "user@example.com",
LOWinternal/redisqueue/plugin_test.go176 Source: "user@example.com",
LOW…/api/handlers/management/auth_files_project_id_test.go24 if errWrite := os.WriteFile(filePath, []byte(`{"type":"gemini","email":"user@example.com","project_id":"project-a"}`),
LOW…/api/handlers/management/auth_files_project_id_test.go39 "email": "user@example.com",
LOW…/api/handlers/management/auth_files_project_id_test.go62 if errWrite := os.WriteFile(filePath, []byte(`{"type":"gemini","email":"user@example.com","project_id":"project-a"}`),
LOW…/api/handlers/management/auth_files_project_id_test.go81 if errWrite := os.WriteFile(filePath, []byte(`{"type":"codex","email":"user@example.com"}`), 0o600); errWrite != nil {
LOW…/api/handlers/management/auth_files_project_id_test.go118 if errWrite := os.WriteFile(filePath, []byte(`{"type":"codex","email":"user@example.com","websockets":false}`), 0o600);
Slop Phrases7 hits · 16 pts
SeverityFileLineSnippet
LOWinternal/registry/models/codex_client_models.json55 "base_instructions": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your
LOWinternal/registry/models/codex_client_models.json57 "instructions_template": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, an
LOWinternal/registry/models/codex_client_models.json407 "base_instructions": "You are GPT-5.2 running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an
MEDIUMexamples/custom-provider/main.go9// for demonstration purposes. In a real implementation, you would replace
MEDIUMexamples/custom-provider/main.go48// init registers trivial translators for demonstration purposes.
MEDIUMexamples/custom-provider/main.go65// MyExecutor is a minimal provider implementation for demonstration purposes.
MEDIUMexamples/http-request/main.go26// EchoExecutor is a minimal provider implementation for demonstration purposes.
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMinternal/tui/i18n.go50// ──────────────────────────────────────────
MEDIUMinternal/tui/i18n.go52// ──────────────────────────────────────────
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWinternal/api/modules/modules.go69// Example usage: