refactor: rename to llm-account-rotator and introduce Provider protocols#2
Closed
joachimBrindeau wants to merge 4 commits intomainfrom
Closed
refactor: rename to llm-account-rotator and introduce Provider protocols#2joachimBrindeau wants to merge 4 commits intomainfrom
joachimBrindeau wants to merge 4 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mechanical rename across 300+ files with zero logic changes: - Package: claude_code_proxy -> llm_account_rotator - CLI: claude-code-proxy -> llm-account-rotator - Env prefix: CCPROXY_ -> LLM_ROTATOR_ - Brand: CCProxy -> LLMRotator - Docker: ccproxy -> llm-rotator Security mitigations added: - Startup detection of legacy CCPROXY_* env vars (fatal error) - Auth-None warning when proxy runs without authentication Allowlist preserved (NOT renamed): - JWT issuer "claude-code-proxy" (existing tokens) - API key prefix "ccpk_" (existing keys) - Keyring service "claude-code-proxy" (stored credentials) - claude_code_sdk (third-party package) All 567 tests pass. mypy, ruff clean. BREAKING CHANGE: All env vars, CLI command, package imports renamed. Run `llm-account-rotator migrate --from-ccproxy` after upgrading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pic code Move all Anthropic-specific code into providers/anthropic/, define Provider and ProxyTransport protocols in providers/base.py, implement AnthropicProvider facade, rename Settings.claude → Settings.anthropic, add import-linter boundary rules, and inject resolve_model callable to maintain adapter isolation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude_code_proxytollm_account_rotator— all imports, pyproject.toml entry points, Docker config, CI, and documentation updatedProviderandProxyTransportprotocols inproviders/base.py, move all Anthropic-specific code intoproviders/anthropic/, implementAnthropicProviderfacade, renameSettings.claude→Settings.anthropic, add import-linter boundary rules, and injectresolve_modelcallable to maintain adapter isolationKey Changes
Package Rename (Phase 1)
claude_code_proxy→llm_account_rotatoracross all source, tests, config, Docker, CIProvider Abstraction (Phase 2)
providers/base.py:Providerprotocol (messaging, models, auth, lifecycle) +ProxyTransportprotocol (HTTP forwarding)providers/anthropic/provider.py:AnthropicProvider— thin facade implementing both protocolsconfig/settings.py:Settings.claude→Settings.anthropic, addedactive_providerfieldapi/dependencies.py:ProviderDepandProxyTransportDepfor FastAPI DIapi/lifespan.py: Provider lifecycle management (start/stop)adapters/openai/adapter.py:resolve_modelcallable injection (no cross-boundary imports)pyproject.toml: import-linter forbidden contracts enforcing adapter↔provider boundaryTest plan
isinstancechecks)Post-Deploy Monitoring & Validation
No additional operational monitoring required: pure refactoring with no behavioral changes — all existing functionality preserved behind new abstractions.