router-for-me/CLIProxyAPI
49.0
Weak · 6 August 2026
175.7k
lines of production code
Go
primary language
3
measurements over time
What this system is
This system is a high-performance API proxy and gateway that translates between various AI provider protocols, including OpenAI, Claude, Gemini, and others. It provides a unified interface for managing authentication, model routing, and request/response translation across multiple AI backends. The system supports plugin extensibility, real-time usage tracking, and dynamic configuration hot-reloading, enabling flexible integration with diverse AI services.
How it got here
2025 — multi-provider translation and auth expansion
64 changes.
The codebase evolved from initial scaffolding into a comprehensive proxy that translates between multiple AI API formats, including OpenAI, Claude, Gemini, and Antigravity. This period introduced extensive translation layers, new authentication providers, and modularized internal components like the watcher and logging systems.
2026 — multi-provider thinking and plugin ecosystem
40 changes.
This period focused on unifying the handling of adaptive reasoning across diverse AI providers, establishing a consistent internal interface for thinking configurations. Simultaneously, the codebase expanded its plugin architecture with a formalized ABI, SDK, and store, while introducing a new terminal-based management interface and enhanced proxy support.
Features
Add API key usage tracking and generic API call proxy endpoints
The management API now exposes two new endpoints: a GET /v0/management/api-key-usage endpoint that returns recent request success/failure counts and time-bucketed usage statistics grouped by provider and API key (including OpenAI compatibility names), and a POST /v0/management/api-call endpoint that allows authenticated management users to make arbitrary HTTP requests through the proxy, with automatic injection of authentication tokens and per-credential proxy routing. The implementation includes new handler files (api\_key\_usage.go, api\_tools.go) and corresponding tests (api\_key\_usage\_test.go, api\_tools\_test.go) that verify the new functionality.
internal/api/handlers/management · high confidence
Add Antigravity and AI Studio executor implementations
Users can now route requests to the Antigravity and AI Studio providers. The Antigravity executor handles OAuth credential management, token refresh, and credit quota fallback, while the AI Studio executor routes requests through a websocket-backed transport. Both executors include comprehensive unit tests to validate request building, schema sanitization, and usage tracking.
internal/runtime/executor · high confidence
Add Antigravity translation for OpenAI Responses
The system now supports translating OpenAI Responses format requests to the Antigravity format, specifically handling Claude reasoning blocks by preserving compatible signatures and dropping incompatible or empty ones. This includes new request and response conversion logic, along with the necessary registration to enable the translation pipeline.
internal/translator/antigravity/openai/responses · high confidence
Add Antigravity translation logic for OpenAI Chat Completions
Introduces a new translator that converts OpenAI Chat Completions requests and responses to and from the Antigravity API format. The implementation handles request mapping (including thinking configurations, tool calls, and multimodal content) and response mapping (including reasoning content, tool calls, and usage metadata). Tests verify that empty text parts are skipped without null values, unsigned reasoning content is sanitized for Claude models, and finish reasons are correctly mapped.
internal/translator/antigravity/openai/chat-completions · high confidence
Add Antigravity translator and benchmark suite for request/response translation
The translator module now includes support for the 'antigravity' provider, with new translation logic for Claude, Gemini, Interactions, and OpenAI (Chat Completions and Responses) formats. Additionally, a comprehensive benchmark suite has been added to measure the performance of request and response translation across large conversation histories and payloads, covering various source-to-target combinations including the new Antigravity routes.
internal/translator · high confidence
Add Antigravity translator for Claude Code API compatibility
The system now supports translating requests and responses between the Claude Code API and the Antigravity backend. This includes handling tool calls, system instructions, and thinking blocks, with specific logic for web search grounding and signature validation. The translator ensures compatibility by mapping tool names, handling empty content, and preserving thinking signatures for caching and replay.
internal/translator/antigravity/claude · high confidence
Add Antigravity-to-Gemini request and response translation
A new translator implementation for the Antigravity-to-Gemini bridge was added, enabling the proxy to translate Antigravity API requests into the Gemini API format and vice versa. The request translator handles model name extraction, system instruction mapping, and tool declaration normalization, including disambiguating and deduplicating function names. It also manages thought signatures, sanitizing or stripping them based on the model (e.g., preserving strict signatures for Claude models while dropping incompatible ones). The response translator restores usage metadata and reverses function name sanitization. Tests cover signature handling, tool normalization, and metadata restoration.
internal/translator/antigravity/gemini, internal/translator/gemini/claude · high confidence
Add CLI tools to fetch and validate Codex client model catalogs
Users can now use the new \fetch\_codex\_models\ command to dynamically retrieve the Codex client model catalog from the upstream API and save it as a JSON file, with options to specify the client version and output path. A companion \validate\_codex\_models\ command is also added to verify the structure and validity of a downloaded model catalog. These tools enable inspection and offline use of the model list, supporting the broader remote-refresh capability for the Codex client model registry.
_cmd/fetch\_codex\models · high confidence
Add Claude (Anthropic) OAuth2 authentication support
Users can now authenticate with the Claude API using a full OAuth2 flow with PKCE. The change introduces a new \claude\ package in \internal/auth/claude\ that handles the complete authentication lifecycle: generating PKCE codes, exchanging authorization codes for tokens at \platform.claude.com\, and refreshing tokens with bounded timeouts and 429 backoff. It also manages a single-device identity pool for each credential and decodes stacked response encodings (gzip, brotli, etc.) from the OAuth provider. A local callback server and HTML templates are included to facilitate the browser-based login. Tests verify the token exchange, device pool management, and proxy URL override behavior.
internal/auth/claude · high confidence
Add Claude Code web search router example plugin
The \examples/plugin\ directory now includes a new \claude-web-search-router\ example plugin that detects Claude Code web search requests and routes them through a configurable backend chain (antigravity, codex, xai, or tavily) with fallback logic. The example demonstrates ModelRouter capabilities, including detection of \web\_search\ tool types, query extraction, and execution orchestration. The plugin supports multiple routing strategies (fallback, single backend, or default provider) and includes Go implementation files with corresponding tests. A Makefile is also added to build all plugin examples across Go, C, and Rust.
examples/plugin · high confidence
Add Claude thinking provider with adaptive and manual thinking support
Introduces a new \claude\ thinking provider that implements the \thinking.ProviderApplier\ interface to configure thinking modes for Claude models. The provider supports manual thinking (via \budget\_tokens\), adaptive thinking (via \output\_config.effort\ for Claude 4.6+), and auto/disabled modes. It enforces the Anthropic API constraint that \max\_tokens\ must be greater than \budget\_tokens\ by normalizing the budget in the \normalizeClaudeBudget\ method.
internal/thinking/provider/claude · high confidence
Add Claude-specific utility functions for attribution, model detection, schema normalization, and tool ID handling
The internal/util package introduces new helper functions to support Claude model integration. These include detecting Claude Code attribution headers, identifying Claude 'thinking' models, normalizing tool input schemas to remove unsupported root-level unions, sanitizing tool IDs to comply with Claude's regex constraints, and converting Claude tool result content into a structured format for Gemini compatibility. Tests are included for all new functions.
internal/util · high confidence
Add Codex to Claude request and response translators
Introduces the complete translation layer between Codex and Claude APIs. The new \internal/translator/codex/claude\ package provides \ConvertClaudeRequestToCodex\ for transforming Claude Code API requests into the internal client format, and \ConvertCodexResponseToClaude\ for converting Codex API responses into Claude Code-compatible Server-Sent Events (SSE) format. This includes handling parallel tool calls, streaming function call arguments, reasoning/thinking blocks with signature preservation, web search tool results, and error translation. The implementation is registered in \init()\ and supported by comprehensive unit tests and benchmarks.
internal/translator/codex/claude · high confidence
Add Codex-to-Gemini and Codex-to-Interactions request/response translators
New translators have been added to support bidirectional conversion between Codex API formats and both the Gemini and Google Interactions APIs. For Gemini, the system now handles parsing and transforming requests (including model mapping, system instructions, message contents, and tool declarations) and converts responses (including text, function calls, and image generation calls) into the expected Gemini format. Similarly, for Google Interactions, the system translates requests (handling system instructions, input steps, and tool configurations) and responses (converting text, reasoning, and function call events) into the Interactions format. These additions are accompanied by comprehensive unit tests validating the translation logic, including edge cases like incomplete terminals, duplicate image suppression, and call ID preservation.
internal/translator/codex/gemini · high confidence
Add Gemini thinking configuration support
Introduces a new \Applier\ for the Gemini provider that handles thinking configuration for both Gemini 2.5 (numeric \thinkingBudget\) and Gemini 3.x (string \thinkingLevel\) models. The implementation supports \ModeNone\ to disable thinking, \ModeLevel\ for discrete levels, and \ModeBudget\/\ModeAuto\ for budget-based control. It also normalizes \includeThoughts\ and \include\_thoughts\ fields to ensure consistent output formatting.
internal/thinking/provider/gemini · high confidence
Add Gemini-to-Gemini request normalization and passthrough support
The Gemini translator now normalizes incoming v1beta requests by ensuring content roles are valid (defaulting to 'user' and alternating), renaming 'responseSchema' to 'responseJsonSchema' in the generation config, and backfilling empty function response names from preceding function calls. Responses are passed through unchanged, with the stream handler correctly processing the '\[DONE\]' marker. Tests confirm the backfill logic works for single, parallel, and multiple call/response groups.
internal/translator/gemini/gemini · high confidence
Add Gemini↔Claude request and response translation support
Users can now route requests to and from the Gemini and Claude Code APIs using a new bidirectional translator. Incoming Gemini requests are converted to the Claude Code format, preserving custom tool IDs, mapping generation config (max tokens, top P, stop sequences, and adaptive thinking levels), and handling inline data. Outgoing Claude Code responses are converted back to Gemini format, correctly assembling streaming tool calls and preserving tool use IDs. The translator is registered in the system via an init function, and comprehensive tests verify the preservation of tool IDs, temperature filtering, and schema normalization.
internal/translator/claude/gemini, internal/translator/openai/claude, internal/translator/openai/gemini · high confidence
Add Google Interactions support and configurable model display names
The Gemini handler now supports Google Interactions, allowing requests to be routed to either a specific model or an agent via the /v1beta/interactions endpoint. The model listing endpoint has been updated to pull from a dynamic registry, ensuring that configured display names and descriptions are preserved in the response. Additionally, the handler normalizes model names by ensuring they include the 'models/' prefix and provides a fallback for missing display names and descriptions.
sdk/api/handlers/gemini · high confidence
Add Grok Shell-aware model list response formatting
A new internal client package (internal/client/grokbuild) was added to handle model list responses specifically for the Grok Shell client. This includes logic to detect Grok Shell via the User-Agent header and a dedicated response builder that formats model data with fields like context window, API backend, and reasoning efforts. Tests confirm the correct mapping of model information into the Grok Shell-specific response structure.
internal/client/grokbuild · high confidence
Add Kimi (Moonshot AI) authentication support
Users can now authenticate with the Kimi (Moonshot AI) API using the OAuth2 device authorization grant flow. This includes managing access and refresh tokens, handling device IDs, and supporting proxy URL overrides for the authentication client. The implementation also deduplicates concurrent token refresh requests to prevent race conditions.
internal/auth/kimi · high confidence
Add OpenAI Chat Completions to Claude translator
The translator now supports translating OpenAI Chat Completions requests to the Claude Code API format. This includes mapping OpenAI parameters (model, max\_tokens, top\_p, stop sequences, streaming) and handling message content conversion, tool call ID sanitization, and grouping of consecutive tool results. On the response side, Claude Code API responses are converted back to OpenAI Chat Completions format, including streaming and non-streaming modes. The implementation tracks token usage, including cache read and creation tokens, and maps OpenAI's reasoning\_effort to Claude's adaptive thinking configuration.
internal/translator/claude/openai/chat-completions, internal/translator/codex/openai/chat-completions · high confidence
Add OpenAI Chat Completions translator for request/response passthrough
The OpenAI Chat Completions translator is introduced, registering handlers to convert OpenAI Chat Completions requests and responses. Request translation updates the model name in the JSON payload, while response translation normalizes streaming chunks by stripping the 'data:' prefix and dropping the '\[DONE\]' marker. Tests verify that matching model payloads are reused without copying, different models are updated correctly, and post-DONE streaming chunks are dropped.
internal/translator/openai/openai/chat-completions · high confidence
Add OpenAI Codex authentication and token management
The internal/auth/codex package is introduced to support OpenAI's Codex API authentication. This includes a new OAuth2 flow using PKCE, with dedicated structs for token data and authentication bundles. The implementation adds an OAuth callback server, JWT parsing, and credential storage. A key behavioral change is the inclusion of the account ID hash in credential filenames to prevent overwrites for team plans, with plan types normalized to lowercase. Additionally, concurrent token refresh requests are deduplicated using singleflight, and non-retryable errors like refresh\_token\_reused are handled without retrying.
internal/auth/codex · high confidence
Add OpenAI Responses API support for Claude
The translator now supports bidirectional conversion between OpenAI Responses and Claude APIs. Requests are translated from OpenAI Responses format to Claude Messages format, handling system instructions, tool calls, and adaptive thinking configurations. Responses are translated from Claude back to OpenAI Responses format, preserving reasoning signatures, redacted thinking payloads, and usage metadata. The new \responses\ package registers itself in the translator registry, enabling the proxy to route requests and process responses for the OpenAI Responses API using Claude's underlying capabilities.
internal/translator/claude/openai/responses, internal/translator/codex/openai/responses, internal/translator/gemini/openai/responses · high confidence
Add OpenAI Responses API support for request and response translation
The internal translator now supports the OpenAI Responses API format. New files in the \responses\ package implement bidirectional translation: \ConvertOpenAIResponsesRequestToOpenAIChatCompletions\ converts incoming Responses requests into the standard Chat Completions format, while \ConvertOpenAIChatCompletionsResponseToOpenAIResponses\ transforms Chat Completions responses back into the Responses format. This includes handling of tool calls, reasoning content, and usage metadata. The module is registered via \init()\ in \init.go\ and includes comprehensive unit tests in \openai\_openai-responses\_request\_test.go\ and \openai\_openai-responses\_response\_test.go\ to validate the conversion logic.
internal/translator/openai/openai/responses · high confidence
Add OpenAI thinking provider implementation
Introduces the OpenAI provider implementation for the thinking feature, enabling support for reasoning\_effort levels (low, medium, high, xhigh) and handling both level-based and budget-based thinking configurations for OpenAI and Codex models.
internal/thinking/provider/openai · high confidence
Add authentication support for Antigravity, Claude, Codex, Kimi, and xAI
The SDK introduces new authenticators for Antigravity, Claude, Codex, Kimi, and xAI, each implementing the standard login flow with browser opening, callback handling, and token persistence. Codex supports a device-code login mode. The filestore now persists a 'disabled' flag in auth files and validates auth weights. Tests cover the disabled flag persistence and filestore behavior.
sdk/auth · high confidence
Add bidirectional translation between Interactions and Claude
Users can now use the Interactions format with Claude models. This change introduces new translator modules that convert Interactions requests to Claude requests and vice versa, supporting features like system instructions, generation config, tool calls, and streaming responses. The implementation includes request and response conversion logic, along with comprehensive unit tests to ensure correct mapping of fields such as thinking levels, tool choices, and usage statistics.
internal/translator/claude/interactions, internal/translator/interactions · high confidence
Add bidirectional translation between OpenAI Chat Completions and Google Interactions formats
New files in the \chat-completions\ and \responses\ directories implement the full request and response translation logic between OpenAI's Chat Completions and Google Interactions formats. This includes mapping messages, tool calls, streaming states, and metadata. The \init.go\ files register these translators with the system. Tests verify the correct mapping of fields like \tool\_calls\, \reasoning\_content\, and \stream\ behavior.
internal/translator/openai/interactions · high confidence
Add built-in translator registry and helpers
The SDK now includes a 'builtin' package that exposes a default registry and pipeline pre-populated with all built-in translators. This allows users to easily access and utilize the standard set of translation capabilities without manual registration.
examples/translator, sdk/translator/builtin · high confidence
Add common translation utilities for cache control, file data, and usage tracking
The internal/translator/common package now includes new helper functions to support specific translation features. AttachCacheControl and AttachMessageCacheControl handle copying and applying cache control settings to messages and content blocks. NormalizeOpenAIFileData extracts MIME types and base64 payloads from OpenAI-style file data, supporting both raw base64 and data URLs. ClaudeMessageSystemReminderText converts system-level text into user-visible reminders. InteractionsUsage extracts usage data from various response paths, and RequestModelName retrieves the model name from original or translated requests.
internal/translator/common · high confidence
Add custom provider and HTTP request examples
The examples/custom-provider directory now includes a new custom provider example that demonstrates how to create a custom AI provider executor, register custom translators for request/response transformation, and integrate the custom provider with the SDK server. Additionally, a new http-request example shows how to use coreauth.Manager.HttpRequest/NewHttpRequest to execute arbitrary HTTP requests with provider credentials injected. Both examples use the CLIProxyAPI v7 SDK.
examples/custom-provider · high confidence
Add login commands for Anthropic Claude, Antigravity, Kimi, and xAI providers
The CLI now supports authenticating with Anthropic Claude, Antigravity, Kimi (Moonshot AI), and xAI. New commands (DoClaudeLogin, DoAntigravityLogin, DoKimiLogin, DoXAILogin) are added to the internal/cmd package, each triggering the respective provider's OAuth or device-code flow and saving tokens via the centralized auth manager. The auth manager is updated to include authenticators for these providers, and the login prompt utility is refactored to support interactive input for these flows.
internal/cmd · high confidence
Add native Interactions thinking provider
A new 'interactions' thinking provider has been added, allowing the system to apply thinking configuration using native Interactions generation\_config fields. The implementation handles mapping thinking modes (budget, level, auto, none) to the provider's specific parameters, including normalizing thinking levels and managing the visibility of thinking summaries.
internal/thinking/provider/interactions · high confidence
Add pluginstore SDK with direct install support and validation
The pluginstore package is introduced to provide a public SDK for plugin registry and artifact installation. It exposes types and helper functions for managing plugin sources, authentication configurations, and artifact selection. A key addition is support for a 'direct' install type, allowing plugins to be installed via a direct URL and version rather than through a registry. The SDK also includes validation logic to ensure manifests and plugins are well-formed, and provides synchronization and version management capabilities for plugins.
sdk/pluginstore · high confidence
Add proxy utility for HTTP and SOCKS5 proxy support
The SDK now includes a new \proxyutil\ package that provides utilities for configuring HTTP and SOCKS5/HTTP CONNECT proxy connections. Users can now specify proxy settings to route outbound traffic through a proxy server, with support for \http\, \https\, \socks5\, and \socks5h\ schemes. The library also allows bypassing proxies entirely or inheriting default transport settings, ensuring that proxy configurations are applied consistently across HTTP and lower-level dialer operations.
sdk/proxyutil · high confidence
Add support for Antigravity provider integration
The server now supports the Antigravity provider, allowing users to authenticate and use models via the Antigravity service. This is exposed through a new \-antigravity-login\ command-line flag that initiates the OAuth flow for this provider.
cmd/server · high confidence
Add support for Google Interactions protocol
The system now supports the Google Interactions protocol, enabling bidirectional translation between the internal Interactions format and the Gemini API format. This includes handling system instructions, generation configurations, tool calls, and usage metadata (including snake\_case variants for token counts). The implementation registers new translation handlers in \init.go\ and provides the core conversion logic in \interactions\_gemini\_common.go\ and \interactions\_gemini\_response.go\, with comprehensive unit tests verifying the mapping of inputs, outputs, and streaming events.
internal/translator/gemini/interactions · high confidence
Add support for Google Interactions via Antigravity translator
Users can now send and receive Interactions-style requests and responses through the Antigravity backend. This change introduces a new translator that converts Interactions payloads to Antigravity format and back, handling function calls, system instructions, generation config, and tool disambiguation. The implementation includes both streaming and non-streaming response conversion, ensuring that tool names are deduplicated and disambiguated, and that function names are properly mapped and restored. Tests verify that the translator correctly handles various input formats, preserves generation config, and manages tool configurations.
internal/translator/antigravity/interactions · high confidence
Add support for Google Vertex AI Gemini authentication
Users can now authenticate with Google Vertex AI Gemini using service account credentials. The system introduces a new credential storage structure that persists service account JSON, along with extracted metadata such as project ID, email, and location. A new utility module handles the normalization and sanitization of private keys, ensuring they are valid RSA PEM blocks. Additionally, the credential storage supports an optional prefix field, allowing users to namespace model names for better organization.
internal/auth/vertex · high confidence
Added WebSocket relay for HTTP and streaming requests
The internal/wsrelay package now provides a WebSocket-based proxy that allows clients to send HTTP requests and receive responses, including support for both non-streaming and streaming (SSE-style) HTTP responses. The Manager exposes a configurable HTTP path (defaulting to /v1/ws) and manages connected sessions, routing messages via a message type system (http\_request, http\_response, stream\_start/chunk/end, error). This enables real-time, bidirectional communication for API calls and streaming data.
internal/wsrelay · high confidence
Added xAI OAuth2 authentication with device flow and token persistence
Users can now authenticate with xAI using the OAuth2 device authorization flow (RFC 8628), which allows login via a user code on a separate device. The system persists OAuth credentials to disk and supports refresh token rotation. Additionally, concurrent refresh token requests are deduplicated to prevent race conditions.
internal/auth/xai · high confidence
Antigravity provider implements thinking configuration for Antigravity API format
The antigravity provider now applies thinking configuration to the Antigravity API format, supporting both budget and level modes. For Claude models, it enforces that the thinking budget is less than max\_tokens and removes the thinkingConfig if the budget is below the minimum allowed. It also normalizes the includeThoughts field name and handles cross-protocol summary visibility.
internal/thinking/provider/antigravity · high confidence
CLIProxy SDK refactors service construction and adds execution tracking
The CLIProxy SDK introduces a new Builder pattern for constructing the proxy service, allowing callers to inject dependencies like token and API key providers, file watchers, and lifecycle hooks. A new execution registry tracks in-flight Home-dispatched executions, providing observation barriers and concurrency release mechanisms. Additionally, the SDK adds support for Antigravity model capability hints, configurable model display names, and max context length overrides across multiple providers including Claude, Gemini, and Codex.
sdk/cliproxy · high confidence
Centralized utility package for header scrubbing, version caching, and OAuth helpers
The \internal/misc\ package now provides a centralized set of utilities for the CLI proxy. This includes a background updater that dynamically fetches and caches the Antigravity Hub version from a remote manifest, with a fallback to version 2.2.1. Header handling is consolidated: \ScrubProxyAndFingerprintHeaders\ removes proxy and fingerprint headers, while \EnsureHeader\ and \AntigravityUserAgent\ functions standardize User-Agent strings for Antigravity and related clients. Additionally, the package introduces \GenerateRandomState\ and \ParseOAuthCallback\ for secure OAuth2 flows, \CopyConfigTemplate\ for config management, and embedded instructions for Claude Code interactions.
internal/misc · high confidence
Configurable Codex Live media relay and deep config cloning
The configuration system now supports in-process WebRTC media relay for Codex Live sessions, with configurable session limits, UDP port ranges, and ICE/STUN/TURN server settings. A new \CloneForRuntime\ method provides a deep, independent snapshot of the entire configuration, ensuring that runtime modifications do not affect the original config. Additionally, the config loader now supports optional loading for cloud deploy mode, where missing or invalid config files return an empty configuration instead of failing, and legacy private IP settings for the media relay are automatically migrated to the new \disable-private-remote-ips\ option.
internal/config · high confidence
Cross-platform browser opening functionality added
A new browser module has been introduced to provide cross-platform functionality for opening URLs in the default web browser. The implementation abstracts underlying OS commands, first attempting to use the 'open-golang' library and falling back to platform-specific commands (e.g., 'open' on macOS, 'rundll32' on Windows, and 'xdg-open' on Linux) if the library fails. The module also includes utilities to check browser availability and retrieve platform-specific information.
internal/browser · high confidence
Define plugin ABI types and method constants
The plugin ABI now includes a formalized set of method constants and data types for the plugin-host communication layer. This introduces a structured Envelope for responses, an Error type with HTTP status support, and explicit method names for plugin registration, model routing, scheduler picking, request/response interception, thinking application, and host capabilities (HTTP, model, auth, logging). The schema version is set to 2, indicating support for request lifecycle completion and active request termination. Tests ensure the stability of these method names and the correct serialization of the envelope structure.
sdk/pluginabi · high confidence
Enhanced authentication management with auto-refresh, model aliasing, and capability routing
The authentication subsystem introduces an automatic token refresh loop that schedules and executes credential updates based on expiry and provider-specific lead times, preventing stale tokens. API-key and OpenAI-compatible auths now support configurable model aliases that map user-facing model names to upstream provider models, with hot-reload support for configuration changes. Additionally, the system resolves and attaches detailed model capability information (such as thinking support levels) to requests, allowing the proxy to route requests with the correct upstream model and metadata. The refactored auth manager also includes a new \conductor.go\ file that defines the core interfaces for execution, selection, and hooks, consolidating the logic for managing auth states and executing provider requests.
sdk/cliproxy/auth · high confidence
Expose build metadata via package
A new buildinfo package has been added to the codebase, defining variables for Version, Commit, and BuildDate. These compile-time metadata fields are intended to be overridden via ldflags during release builds, providing a centralized source for build information.
internal/buildinfo · high confidence
Initial project scaffolding and configuration templates
The repository was initialized with core infrastructure files, including a Go-based Dockerfile for building the server, a sample YAML configuration file (config.example.yaml) defining server, TLS, and management settings, and environment variable examples (.env.example, .env.cluster.example) for remote storage and authentication. Additionally, a Windows PowerShell script (docker-build.ps1) and a Bash script (docker-build.sh) were added to automate local Docker image builds with injected version metadata, alongside .gitignore and .dockerignore templates to manage build artifacts and sensitive files.
(repo-wide) · high confidence
Introduce Antigravity OAuth2 authentication service
Added a new internal authentication service for the Antigravity provider, implementing OAuth2 flows including token exchange, user info retrieval, and project ID fetching. The implementation includes dedicated modules for handling HTTP headers, user-agent strings, and credential file naming, alongside a comprehensive test suite verifying request headers and response parsing.
internal/auth/antigravity · high confidence
Introduce Claude Code API handler with model ID prefix handling and model list cloaking
Added a new Claude Code API handler that implements Claude-compatible streaming and non-streaming chat completions, including a model ID prefix resolution mechanism that decodes obfuscated model identifiers (e.g., 'claude-fable-5-dd-o4-tpg' to 'gpt-4o') for upstream routing. The handler also supports configurable model display names in the models listing endpoint and allows disabling model list cloaking via a new 'DisableCloakingModelList' configuration option. Error responses are now formatted to match the Claude API specification, ensuring consistent client-side error handling.
sdk/api/handlers/claude · high confidence
Introduce Codex Live session handling and WebRTC media relay
Added a new \live\ package in \internal/client/codex/live\ that implements a handler for forwarding Codex realtime WebRTC session bootstrap requests. The update includes a media relay system that bridges audio and data channels, supports sideband API communication, and provides a TCP proxy for WebRTC candidates. This enables the client to manage live Codex sessions with configurable media relay settings and session lifecycle management.
internal/client/codex/live · high confidence
Introduce Codex client model catalog and response builder
Added a new \internal/client/codex/models\ package that constructs the model catalog response for the Codex client. This introduces support for configurable reasoning levels (none, minimal, low, medium, high, xhigh, max, ultra) and allows overriding the \max-context-length\ for configured models. Additionally, when the \optimizeMultiAgentV2\ flag is enabled, the response now sets \multi\_agent\_version\ to \v2\ for matching models.
internal/client/codex/models · high confidence
Introduce Codex client model catalog management and static model definitions
The registry now manages a remote-updated Codex client model catalog via \codex\_client\_models.go\ and \codex\_client\_models\_updater.go\, which fetch, validate, and cache a JSON catalog of client-side model metadata (slugs, display names, context windows, reasoning levels). Static model definitions for various providers (Claude, Gemini, xAI, etc.) are now served through \model\_definitions.go\ with built-in overrides for GPT-Image and xAI video models. The \model\_registry.go\ file introduces a full \ModelRegistry\ with reference counting, caching, and hook support, while \model\updater.go\ handles periodic model catalog refreshes. Tests in \\\_test.go\ files validate these new behaviors.
internal/registry · high confidence
Introduce Codex client model support and multi-agent v2 tool handling for OpenAI-compatible APIs
The OpenAI-compatible API handlers now support Codex client models, including a new \codex\_client\_models.go\ file that builds model responses and advertises multi-agent v2 capabilities when enabled. The \openai\_responses\_handlers.go\ file implements the \/v1/responses\ endpoint with SSE framing, error forwarding, and multi-agent v2 tool preparation that strips encrypted content from tool definitions for Codex clients. Additionally, \openai\_images\_handlers.go\ adds support for image generation models (GPT-Image-1.5, GPT-Image-2, and xAI Grok models) with proper validation and request building. Tests confirm that multi-agent v2 tools are correctly prepared for both HTTP and WebSocket transports, and that image model validation rejects unsupported models while allowing configured OpenAI-compatibility image models.
sdk/api/handlers/openai · high confidence
Introduce HTML/JSON sanitization utilities and plugin host capabilities for interceptors, executors, and auth
The plugin host now supports a comprehensive plugin execution and thinking capability, including request/response/stream interceptors, executor and model registration, and usage tracking. This adds the ability for plugins to intercept and modify requests and responses, execute models with specific formats, and handle authentication callbacks. Additionally, a new \htmlsanitize\ package provides utilities to escape HTML and JSON bodies, ensuring safe handling of user-supplied data in management clients. The plugin host also registers access providers for frontend authentication and manages executor and model client registrations, enabling plugins to register their capabilities and interact with the core system securely.
internal/pluginhost · high confidence
Introduce HTTP/1.1 request header ordering with partial-write state retention
Added internal/httpwire/ordered\_conn.go and its tests to wrap net.Conn and reorder HTTP/1.1 request headers according to a configurable order, while preserving the original casing, values, and body bytes. The implementation tracks header and body state so that if a write fails partway through, the connection retains the remaining bytes for subsequent writes, allowing callers to retry or continue without losing data. This enables consistent header ordering for specific request patterns (e.g., Claude CLI requests) and ensures chunked and non-chunked bodies are handled correctly across partial write errors.
internal/httpwire · high confidence
Introduce Home client with mTLS, concurrency release, and plugin status reporting
The internal/home package now provides a fully integrated Home client that manages mTLS certificate bootstrapping via JWT, enabling secure TLS connections to the Home service. The client supports credential concurrency release tracking with configurable flush intervals and exponential backoff, allowing the system to report active request counts and release concurrency slots back to the Home service. Additionally, the client handles plugin status reporting to the Home service, pushing node-level plugin synchronization reports with timeouts. The implementation includes a global client registry for runtime integration, KV helpers for best-effort and required key-value operations, and comprehensive test coverage for the new functionality.
internal/home · high confidence
Introduce a unified translator registry and pipeline for cross-protocol request and response mapping
The SDK now includes a new translator package that provides a centralized registry and pipeline for converting chat requests and responses between different API schemas (such as OpenAI, Claude, Gemini, and Antigravity). This adds helper functions to check for and execute request, streaming, non-streaming, and token count transformations by format name, along with a middleware-based pipeline for processing envelopes. The implementation also enforces summary intent across protocols, ensuring that reasoning and thinking configurations are correctly mapped or stripped when translating between formats.
sdk/translator · high confidence
Introduce automated management asset synchronization
A new background service has been added to automatically download and maintain the remote management control panel (management.html). The updater runs on a 3-hour schedule, respects the new disable-auto-update-panel configuration flag, and supports proxy settings and custom GitHub repositories for updates. A corresponding test suite validates the skip-reason logic.
internal/managementasset · high confidence
Introduce comprehensive request and response logging middleware
Added a new request logging middleware in internal/api/middleware that captures detailed request and response data, including headers, body, and streaming chunks. The implementation supports deferred body capture for error-only logging, handles both standard and streaming responses (including WebSocket timelines), and integrates with the logging subsystem to record API request/response data. Tests verify the middleware's behavior for various request types and logging configurations.
internal/api/middleware · high confidence
Introduce core interface and model definitions for the CLI Proxy API
Added new files in internal/interfaces defining the foundational contracts and data structures for the CLI Proxy API server. This includes the APIHandler interface for identifying handler types and supported models, along with detailed Go structs for content, parts, function calls, and generation configurations. The changes also introduce backward-compatible type aliases for request and response transformation functions, aligning the internal interfaces with the SDK translator package.
internal/interfaces · high confidence
Introduce home plugin synchronization and management
Added a new home plugins synchronization system that manages plugin installation, loading, and deletion. The new sync.go file introduces a Sync function that iterates through configured plugins, resolves their manifests, downloads artifacts, and installs them to the plugin directory. The system supports direct install types, version management, and platform-specific filtering. A corresponding test file (sync\_test.go) validates the synchronization logic including authenticated downloads, manifest resolution, and status reporting.
internal/homeplugins · high confidence
Introduce internal translator wrapper for AI API format conversions
Added the internal translator package, which provides a wrapper around the SDK translator registry to handle request and response translations between different AI API formats (such as OpenAI, Claude, and Gemini). This new module exposes functions to register, check, and perform translations for both streaming and non-streaming responses, effectively bridging the gap between various provider-specific JSON structures.
internal/translator/translator · medium confidence
Introduce new TUI for management and configuration
A new terminal-based management interface is now available, providing a unified dashboard to view server status, manage API keys, and edit configuration settings. Users can now authenticate via OAuth or API keys, edit auth file fields, and monitor logs in real-time. The interface supports internationalization (i18n) for English and Chinese, and includes a standalone mode for local log polling.
internal/tui · high confidence
Introduce plugin API type definitions and test coverage
Added the \sdk/pluginapi/types.go\ file which defines the Go structs and interfaces for the host-side plugin capability schema, including metadata, capabilities, and execution interfaces. This change establishes the type system for plugin integration, supported by new test coverage in \types\_test.go\ to validate serialization and field preservation.
sdk/pluginapi · high confidence
Introduce plugin host SDK with auth and model discovery APIs
A new public SDK surface (sdk/pluginhost) is introduced, wrapping the internal plugin host to expose plugin management and authentication capabilities. Users can now manage plugin lifecycles (load, unload, shutdown) and interact with plugin-provided features, including parsing and expanding credential payloads (ParseAuth, ParseAuths), discovering models bound to specific auth providers (ModelsForAuth, ModelsForProvider), and handling OAuth login flows (StartLogin, PollLogin).
sdk/pluginhost · high confidence
Introduce plugin store with direct install support and authentication
The plugin store now supports installing plugins via direct download URLs or by fetching the latest release from a GitHub repository. Authentication is handled through configurable rules that apply to registry, metadata, and artifact requests, supporting bearer tokens, basic auth, custom headers, and GitHub tokens. The system also validates checksums for downloaded artifacts and enforces HTTPS for all plugin store requests.
internal/pluginstore · high confidence
Introduce stable session identity derivation and explicit session handling
Added identity.go and identity\_test.go to the session package, introducing a new mechanism for deriving stable session identities from protocol request roots. The implementation includes functions to normalize explicit session IDs (rejecting control characters and oversized values), extract session IDs from various headers and payloads (including Claude Code metadata, legacy patterns, and standard headers), and derive a consistent identity based on the first user prompt and system instructions. This ensures that session identities remain stable across conversation growth and are isolated by caller scope.
sdk/cliproxy/session · high confidence
Introduce structured authentication provider configuration and exclusive provider support
The SDK now supports flexible authentication configuration via \AccessConfig\ and \AccessProvider\ structs, allowing users to define providers by name, type, and inline API keys. A global registry (\sdk/access\) manages these providers, enabling the new \SetExclusiveProvider\ and \ClearExclusiveProvider\ APIs to restrict authentication to a single provider type when needed. The \Manager\ coordinates evaluation of registered providers, and specific error codes (\no\_credentials\, \invalid\_credential\, \not\_handled\) are introduced to classify authentication failures.
sdk/access · medium confidence
Introduces Claude Code session, credential, and device profile management
The \internal/runtime/executor/helps\ package now includes dedicated helpers for managing Claude Code identity and state. \claude\_code\_session.go\ extracts and scopes session and agent IDs for prompt caching and execution isolation. \claude\_credential\_identity.go\ generates stable session UUIDs and manages credential device pools, including migration of legacy device IDs to a canonical single-device format. \claude\_device\_profile.go\ defines default device fingerprints (User-Agent, package/runtime versions, OS, architecture) and manages their lifecycle. \claude\_client\_detection.go\ identifies official Claude Code clients via headers and payload signals, distinguishing native first-party clients from others. \claude\_builtin\_tools.go\ provides a registry of Anthropic-operated tools to differentiate them from custom client tools. These changes support more accurate routing, caching, and identity tracking for Claude Code requests.
internal/runtime/executor/helps · high confidence
Introduces a canonical token accounting schema (v2) with detailed breakdowns
The SDK now enforces a new, canonical token accounting contract (schema version 2) that provides a structured breakdown of input and output tokens. This includes separating uncached, cache-read, and cache-write tokens for inputs, and distinguishing between non-reasoning and reasoning tokens for outputs. The system automatically classifies token counts based on the provider (e.g., OpenAI, Anthropic, Gemini) and handles edge cases like partial or inconsistent data by marking the accounting quality as 'inconsistent' or 'unclassified' rather than guessing. This change ensures that usage reports contain a consistent, non-overlapping view of token usage across different model providers.
sdk/cliproxy/usage · high confidence
Introduces structured execution lifecycle and context tracking for WebSocket transports
The executor now supports a formal lifecycle for managing execution resources, ensuring that cleanup actions are performed exactly once even if the initial binding fails. Additionally, context keys are introduced to track whether a request originates from a downstream WebSocket connection or requires an upstream WebSocket, and a specific error type is added to signal when an upstream WebSocket must be replayed as a full HTTP request.
sdk/cliproxy/executor · high confidence
New CLI command to fetch Antigravity model list
A new \fetch\_antigravity\_models\ command has been added to the CLI, allowing users to dynamically retrieve the list of available Antigravity models from the upstream API and save the results to a JSON file for inspection or offline use.
_cmd/fetch\_antigravity\models · high confidence
New OpenAI Chat Completions translator for Gemini
The system now supports translating OpenAI Chat Completions requests to and from the Gemini API. This adds a new translator that converts OpenAI request formats (including multimodal content, reasoning content, and tool calls) into Gemini-compatible JSON, and conversely maps Gemini responses back to OpenAI Chat Completions format, including handling of streaming responses, usage metadata, and function calls.
internal/translator/gemini/openai/chat-completions · high confidence
New Redis-based usage statistics queue
Added a new internal/redisqueue package that implements a Redis-backed queue for usage statistics. The system captures detailed request metadata (model, provider, tokens, latency, headers, etc.) and publishes it to subscribers or queues it for later processing. This enables real-time usage tracking and reporting via Redis Pub/Sub or persistent queues, with configurable retention periods and toggleable statistics collection.
internal/redisqueue · high confidence
New SDK API for embedding and managing CLIProxyAPI
The SDK now exposes a public \api\ package that wraps internal management and server configuration types, allowing external projects to integrate management endpoints and configure the embedded HTTP server without importing internal packages. This includes a \ManagementTokenRequester\ interface for requesting tokens (Anthropic, Codex, Antigravity, and Kimi) and handling OAuth callbacks, as well as server options for middleware, engine configuration, and keep-alive endpoints.
sdk/api · high confidence
New backends for token and cooldown state persistence
The internal/store package introduces three new store implementations: a Git-backed token store (GitTokenStore) that persists credentials and auth metadata to a Git repository, respecting a configured branch; an S3-compatible object storage-backed token store (ObjectTokenStore) that syncs config and auth files to a remote bucket; and a PostgreSQL-backed store (PostgresStore) that persists configuration, auth records, and cooldown state to a database while mirroring to a local workspace. Tests are added for the Git and PostgreSQL cooldown state stores.
internal/store · high confidence
New example plugins for authentication, CLI, executor, and model capabilities
Added example plugins for the plugin host system, each implemented in both C and Rust. The new examples include an authentication plugin (auth), a command-line interface plugin (cli), an executor plugin (executor), a frontend authentication plugin (frontend-auth), a model provider plugin (model), and a protocol format plugin (protocol-format). These serve as reference implementations for building custom plugins that can handle authentication, execute commands, process model requests, and manage protocol formats within the CLIProxyAPI framework.
(repo-wide) · high confidence
New example plugins for host callback, management API, and simple execution
Added example plugins in C and Rust that demonstrate plugin capabilities. The 'host-callback' and 'management-api' examples show how plugins can interact with the host for logging and HTTP requests, and expose resources under the Management API. The 'simple' example demonstrates a full-featured plugin with model registration, authentication, execution, thinking, and CLI command support. These serve as reference implementations for plugin developers.
(repo-wide) · high confidence
New reasoning replay and signature caching infrastructure
The cache subsystem introduces new capabilities for preserving and replaying model reasoning across sessions. This includes dedicated caches for antigravity, codex, and kimi thinking/reasoning replay, each supporting stateful in-memory storage with TTL, size limits, and fallback to a distributed KV store. A new bounded LRU cache implementation is added to manage these structures. Additionally, a signature cache is introduced to store and retrieve thinking signatures for models like Claude, with support for model groups and text hashing. Tests are provided for all new cache components.
internal/cache · high confidence
Public SDK configuration API exposed via sdk/config
The SDK now exposes a public configuration API in the \sdk/config\ package, allowing external projects to embed CLIProxyAPI without importing internal packages. This change re-exports key configuration types (such as \SDKConfig\, \Config\, and various provider-specific configurations like \XAIKey\ and \ClaudeCodeConfig\) and provides public wrappers for loading and parsing configuration files, effectively simplifying the integration of the SDK into other Go projects.
sdk/config · high confidence
Refactored API handler architecture with new interception and metadata tracking
The API handler layer has been restructured into a modular system with dedicated files for error handling, execution, and interceptors. The new \handlers\_errors.go\ introduces a structured \BuildErrorResponseBody\ that maps HTTP status codes to OpenAI-compatible error formats and supports direct response bypasses. Execution logic in \handlers\_execution.go\ now routes through a unified \executeWithAuthManager\ path that supports image models and plugin executors. A new \handlers\_interceptors.go\ implements a request lifecycle tracker and interceptor chain, enabling plugins to intercept requests before/after authentication and responses. Context management in \handlers\_context.go\ and \handlers\_metadata.go\ now carries execution session IDs, pinned auth IDs, and request metadata (like reasoning effort and service tier) through the handler chain.
sdk/api/handlers · high confidence
Safe mode now detects example API keys and shows a warning page
The safemode package now includes example API keys ("your-api-key-1", "your-api-key-2", "your-api-key-3") and provides functions to detect if any configured API keys match these template values. When detected, a warning page is displayed to the user, explaining that proxy API endpoints are disabled and instructing them to replace the template values. The warning page also includes a link to the management interface, allowing users to navigate to the management path for configuration.
internal/safemode · high confidence
Unified thinking configuration processing for multi-provider adaptive reasoning
The \internal/thinking\ package now provides a unified entry point (\ApplyThinking\, \ApplyThinkingWithModelInfo\, etc.) to process and validate thinking configurations across multiple providers (Claude, Gemini, OpenAI, Codex, Kimi, xAI, and Antigravity). This change introduces a provider-agnostic registry system that maps provider names to specific appliers, enabling consistent handling of reasoning effort, budget, and summary visibility. The system supports cross-family level clamping, suffix-based model configuration overrides, and preserves summary intent across protocol translations. Tests verify correct behavior for each provider's specific JSON structure and error conditions.
internal/thinking · high confidence
Removals
Removed legacy internal client implementation
The legacy internal client implementation has been removed from the codebase. This change eliminates the previous client architecture, which handled API requests, user onboarding, and token management, likely as part of a broader refactoring to simplify the codebase and streamline request handling.
internal/client · high confidence
Architecture
Extracted auth synthesis logic into a dedicated synthesizer package
The internal/watcher/synthesizer package was introduced to encapsulate the logic for generating Auth entries from configuration API keys and OAuth JSON files. This refactoring separates the auth synthesis responsibilities into a dedicated package, including a ConfigSynthesizer for handling API keys (Gemini, Interactions, Claude, Codex, xAI, OpenAI-compat, and Vertex-compat) and a FileSynthesizer for processing OAuth JSON files. The change also introduces a StableIDGenerator for deterministic ID generation and helper functions for managing excluded models and custom headers, improving code organization and maintainability.
internal/watcher/synthesizer · high confidence
Behavioural changes
Add Claude client model catalog and response builder
The internal client for Claude now includes a model catalog and response builder. This introduces logic to construct model lists with sorted, cloned entries and optional ID cloaking (prefixing non-Claude model IDs with 'claude-fable-5-dd-' and reversing the original ID). A configuration option allows disabling this cloaking, which preserves original model IDs in the response. The change also adds comprehensive unit tests for the new model handling logic.
internal/client/claude · medium confidence
Add protocol multiplexing and keep-alive endpoint to prevent idle connection blocking
The internal API server now multiplexes incoming connections to support both HTTP and Redis protocols on the same port, routing each connection to the appropriate handler. This change includes a fix for idle TCP connections blocking the accept loop, ensuring that slow or idle clients do not prevent new connections from being accepted. Additionally, a keep-alive endpoint has been added to monitor server health and trigger a callback on timeout.
internal/api · high confidence
Centralized access provider reconciliation logic
The internal access module now uses a dedicated \ReconcileProviders\ function to compare old and new configurations, identifying added, updated, or removed providers. This change centralizes the logic for managing access providers, ensuring that the provider list is updated consistently based on configuration changes.
internal/access · high confidence
Centralized logging with custom format, request ID tracking, and file-backed request logging
The logging subsystem has been refactored to provide a unified, structured logging experience. A custom log format is now applied globally, adding timestamps, request IDs, and source location to every log entry. Request ID generation and propagation have been implemented for AI API endpoints, ensuring traceability across requests. Additionally, the system now supports file-backed logging for both regular and streaming requests, allowing detailed request/response data to be spooled to temporary files. A new HomeAppLogForwarder has been introduced to forward application logs to the Home app, and a log directory cleaner has been added to manage log file sizes. The Gin middleware has been updated to integrate with this new logging framework, and tests have been added to verify the behavior of the new components.
internal/logging · high confidence
Configurable error log retention in the SDK logging module
The SDK's logging module now exposes a new \NewFileRequestLoggerWithOptions\ constructor that accepts an \errorLogsMaxFiles\ parameter, allowing users to control how many error log files are retained. Previously, the number of retained error log files was hardcoded to 10; this change enables customization of that limit.
sdk/logging · medium confidence
Empty placeholder added to auths directory
A .gitkeep file was added to the auths directory, ensuring the directory is tracked by version control even when empty.
auths · high confidence
Improved config change detection and logging
The system now provides more detailed and accurate change detection for configuration updates. This includes tracking model prefix changes across all API types, supporting configurable model display names, and detecting changes in OAuth model aliases and excluded models. The diff logic has been refactored to improve security by redacting sensitive data (like API keys and proxy URLs) in change logs, and to handle edge cases like duplicate provider names and empty model lists more robustly. These changes ensure that hot-reloads and configuration updates are logged with greater precision and safety.
internal/watcher/diff · high confidence
Improved handling of cross-provider signature compatibility in conversation history
The signature validation and sanitization logic for Claude and Gemini models has been significantly expanded to better handle mixed-provider conversation history. For Claude, the system now validates CAIS envelopes and strips invalid or encrypted thinking blocks (such as GPT-encrypted content) while preserving valid signatures. For Gemini, the system now normalizes compatible signatures, replaces incompatible or synthetic ones with a bypass sentinel, and removes polluted or malformed signatures from function calls. These changes ensure that switching between Claude, GPT/Codex, and Gemini models in a single conversation does not break the chat history, as incompatible signatures are either normalized, dropped, or replaced with safe placeholders.
internal/signature · high confidence
Introduce Codex multi-agent v2 optimization and translation support
Added new logic in the \internal/client/codex/optimize-multi-agent-v2\ package to handle Codex multi-agent v2 requests. This includes rewriting spawn\_agent tool descriptions with model metadata, stripping encrypted collaboration message fields, and normalizing input for translation via a new \TranslateRequestWithCodexMultiAgentV2\ function that replaces the previous \sdktranslator.TranslateRequest\ path for Codex clients. Tests were added to verify client identification and model metadata rewriting.
internal/client/codex/optimize-multi-agent-v2 · medium confidence
Introduce provider and format constants for AI services
A new \internal/constant/constant.go\ file was added, defining string constants for various AI service providers and response formats. The file introduces identifiers for Google Gemini, OpenAI (including Codex and response formats), Anthropic Claude, and a new 'Antigravity' format. This change standardizes how these providers and formats are referenced throughout the application.
internal/constant · high confidence
Migrate config-api-key provider to internal package
The \config-api-key\ access provider has been moved into the \internal/access/config\_access\ package. This change consolidates the provider's implementation, making it an internal component rather than a public or external one. Users will see no functional change in behavior, but the internal structure of the access layer has been refactored to improve encapsulation.
_internal/access/config\access · high confidence
Refactored authentication logic and extracted token storage interface
The internal/auth package was restructured to separate concerns: the previous monolithic auth.go file, which contained the OAuth2 flow, HTTP server setup, and token persistence logic, has been removed. In its place, a new models.go file introduces a TokenStorage interface, allowing for more flexible token management implementations. This change simplifies the authentication flow by decoupling the HTTP server and OAuth2 client initialization from the core auth logic, making the codebase easier to maintain and test.
internal/auth · medium confidence
Refactored file watcher into modular components with optimized change detection
The internal/watcher package has been restructured into focused modules: clients.go handles client lifecycle and incremental auth file updates; config\_reload.go implements debounced configuration hot-reload with SHA256 hash-based change detection; dispatcher.go manages an asynchronous auth update queue with deduplication and batching; events.go filters and debounces filesystem events; and watcher.go defines the core Watcher struct and entry points. This refactoring improves reliability by preventing redundant reloads, avoiding infinite loops on rapid changes, and ensuring the reload callback triggers before auth refresh.
internal/watcher · high confidence
Test coverage
Add comprehensive test coverage for thinking, summary intent, and usage logging
Added new test files to validate the behavior of the thinking and summary translation pipeline. \thinking\_conversion\_test.go\ covers the end-to-end transformation of thinking configurations across all provider families (Antigravity, Claude, Codex, Gemini, Interactions, Kimi, OpenAI, XAI) using both suffix and body parameters. \summary\_intent\_translation\_test.go\ verifies that summary intent is correctly propagated and clamped across OpenAI, Claude, Gemini, and Interactions formats, ensuring that disabled or absent summary requests do not incorrectly enable them in the target format. \claude\_code\_compatibility\_sentinel\_test.go\ validates the structure of Claude Code sentinel payloads (tool progress, session state, tool use summary, and control requests). \codex\_claude\_parallel\_function\_calls\_test.go\ ensures parallel function calls are correctly translated from Codex to Claude with valid lifecycle events. \builtin\_tools\_translation\_test.go\ checks that built-in tools are preserved in OpenAI-to-Codex translations and ignored in OpenAI Responses-to-OpenAI translations. \usage\_logging\_test.go\ confirms that zero-token usage is correctly recorded in the Redis queue for Gemini executor calls.
test · high confidence
Dependencies
Upgrade CLIProxyAPI to v7 and add plugin examples
The project has been upgraded to CLIProxyAPI v7, updating the Go module path and Go version to 1.26/1.26.0. This includes significant dependency updates such as github.com/jackc/pgx/v5 to v5.9.2, golang.org/x/sys to v0.47.0, and golang.org/x/crypto to v0.54.0. Additionally, example plugin implementations for authentication, CLI, executor, and other functionalities have been added in both Go and Rust.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 49.
Lenses
- Code Health 52
- Architecture 99
- Maturity 64
- Readiness 57
- Security 38
Changes since last survey
- 300 commits — 166 feature/other, 134 fixes
By area
- internal/runtime — 81 commits
- internal/translator — 47 commits
- (repo) — 45 commits
- sdk/cliproxy — 26 commits
- (root) — 21 commits
- internal/registry — 12 commits
- internal/api — 10 commits
- internal/client — 10 commits
- internal/home — 7 commits
- sdk/api — 7 commits
- internal/thinking — 6 commits
- internal/auth — 4 commits
- internal/pluginhost — 4 commits
- internal/config — 3 commits
- internal/redisqueue — 2 commits
- internal/store — 2 commits
- internal/util — 2 commits
- .github/workflows — 1 commit
- assets/logo — 1 commit
- cmd/server — 1 commit
Notable commits
- fix: Merge pull request #4083 from seakee/fix/auth-files-filter-by-index
- fix: Merge pull request #4366 from Johnnybyzhang/fix/claude-codex-allocation-fix
- fix: Merge pull request #4419 from mikewong23571/fix/kimi-upstream-model-normalization
- fix: Merge pull request #4481 from KorenKrita/agent/fix-plugin-stream-bridge-close-race
- fix: Merge pull request #4522 from sususu98/fix/responses-ws-continuity
- fix: Merge pull request #4528 from router-for-me/fix/issue-81-normalized-token-accounting
- fix: Merge pull request #4538 from yueziji/fix/windows-plugin-response-buffer-upstream
- fix: Merge pull request #4554 from yinkev/fix/session-affinity-native-signals
- fix: Merge pull request #4588 from adityavkk/fix/preserve-sdk-executors
- fix: Merge pull request #4591 from cyclopentadiene/fix/claude-oauth-sse-tool-names
- fix: Merge pull request #4626 from sususu98/fix/4599-tool-provenance-degradation
- fix: Merge pull request #4645 from router-for-me/fix/home-cas-command
- fix: Merge pull request #4659 from router-for-me/fix/codex-api-configured-models-only
- fix: Merge pull request #4668 from oscarbrey/fix/grok-imagine-video-1.5-ga
- fix: Merge pull request #4684 from sususu98/fix/thinking-summary-visibility
- fix: Merge pull request #4687 from router-for-me/fix/home-401-refresh-recovery
- fix: Merge pull request #4698 from router-for-me/fix/home-401-refresh-recovery
- fix: Merge pull request #4707 from sususu98/fix/codex-websocket-cloaking
- fix: Merge pull request #4748 from patrick-fu/p/patrick/fix-codex-collaboration-message-encryption
- fix: Merge pull request #4752 from sususu98/fix/claude-fingerprint-2.1.220
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
router-for-me/CLIProxyAPI was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit ea37d13a9eced4af835cad10bcb030d770a5ba88 — the exact code this score is about.
- Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer latest.