Commit Graph
108 Commits
Author SHA1 Message Date
RCD a2a4fba626 chore: merge upstream CLIProxyAPI v6.9.1 2026-03-24 09:41:49 +07:00
sususu98 9738a53f49 feat: add -local-model flag to skip remote model catalog fetching
When enabled, the server uses only the embedded models.json loaded at
init() and skips registry.StartModelsUpdater(), disabling the initial
remote fetch and 3-hour periodic refresh. The management panel
auto-updater (managementasset.StartAutoUpdater) is unaffected.
2026-03-18 10:48:03 +08:00
RCD 64e2a43259 chore: merge upstream CLIProxyAPI v6.8.51 2026-03-12 10:58:52 +07:00
hkfires 30d5c95b26 feat(registry): refresh model catalog from network 2026-03-10 14:02:54 +08:00
FSOS a0b068756c fix: remove duplicate 'tui' flag definition causing startup panic
Fixes #5 - The 'tui' flag was registered twice via flag.BoolVar(),
causing a 'panic: flag redefined: tui' crash on startup.
Removed the duplicate at line 208, keeping the original at line 181.
2026-03-05 05:03:16 +07:00
RCD 0af0ad14e5 Merge upstream CLIProxyAPI v6.8.28–v6.8.32
Upstream changes:
- Codex responses compaction payload compatibility
- Codex usage_limit_reached retry-after, deterministic parsing
- Codex refresh_token_reused non-retryable fix
- Qwen rate limiting and quota error handling
- Context management compatibility simplification
- Antigravity tool_result image fix, model list backfill, deep copy cache
- Auth auto-refresh interval/concurrency limiting
- Auth hook OnResult refactor (replaces MarkResult)
- Gemini-3.1-flash-image support
- Registry cleanup of outdated model definitions

Fork resolution:
- Accept upstream's consolidated conductor.go (auto-refresh, round-tripper)
- Delete stale conductor_oauth.go, conductor_token.go (upstream reversed split)
- Delete stale provider_rotation_test.go (references removed method)
2026-02-27 20:58:16 +07:00
RCD 6ffc26271c Merge upstream CLIProxyAPI v6.8.27
Upstream changes:
- Post-auth hook system (RequestInfo refactor + hook chain)
- Credential-based round-robin for gemini-cli virtual auths
- Codex additive device-code login flow
- File input passthrough for /chat/completions and /responses
- Gemini → OpenAI usage conversion fix
- Responses stream: model/usage in translated streams, valid SSE error chunks
- Revert reasoning effort clamping

Fork resolution:
- Keep both integrationManager (fork) and postAuthHook (upstream) in handler struct
2026-02-25 14:49:42 +07:00
test 492b9c46f0 Add additive Codex device-code login flow 2026-02-23 06:30:04 -05:00
RCD cf558dd166 Merge upstream CLIProxyAPI v6.8.18–v6.8.26
Upstream changes:
- Codex WebSocket executor and Codex response handlers
- Header passthrough (upstream response headers forwarded to clients)
- ExecuteStream returns *StreamResult (wraps channel + headers)
- Embeddings handler with synthetic fallback
- User ID cache for executors
- Gemini schema/request fixes
- New test coverage for bootstrap retries, error responses

Fork resolution:
- Delete upstream's modular TUI files (app.go, styles.go, dashboard.go,
  auth_tab.go, config_tab.go, keys_tab.go, logs_tab.go, oauth_tab.go,
  usage_tab.go, i18n.go, loghook.go) — keep fork's Flight Deck tui.go
- Add PassthroughHeaders field to SDKConfig
- Fix embeddings handler to capture 3-value ExecuteWithAuthManager return
- Update test mocks (conductor_test, auth_flow_test, multi_provider_test,
  gemini_executor_test) for new ExecuteStream signature
- Fix tuiMode → launchTUI flag variable reference
- Remove unused "io" import from main.go
2026-02-23 11:58:54 +07:00
Luis Pater 93fe58e31e feat(tui): add standalone mode and API-based log polling
- Implemented `--standalone` mode to launch an embedded server for TUI.
- Enhanced TUI client to support API-based log polling when log hooks are unavailable.
- Added authentication gate for password input and connection handling.
- Improved localization and UX for logs, authentication, and status bar rendering.
2026-02-19 03:18:08 +08:00
RCD 4cf25c05ce Merge upstream CLIProxyAPI v6.8.15–v6.8.17
Upstream changes:
- feat: add Google One login and improve Gemini CLI auto-discovery
- feat: add gpt-5.3-codex-spark model definition
- feat: add 'kimi' channel support in model definitions
- feat: pass cache usage from codex to openai chat completions
- fix: normalize Gemini credential file prefix for consistency
- refactor: replace manual pointer assignments with new()
- chore: update Go to 1.26, update Codex client version

Fork fixes:
- Bump mise Go pin to 1.26.0
- Remove stale .syso resource files (incompatible with Go 1.26 linker)
2026-02-16 08:01:38 +07:00
lhpqaq 2c8821891c fix(tui): update with review 2026-02-16 00:24:25 +08:00
lhpqaq 54ad7c1b6b feat(tui): add manager tui 2026-02-15 14:52:40 +08:00
RCD a987b9fb83 Merge upstream CLIProxyAPI v6.8.11 into ProxyPilot
Upstream changes (v6.8.0–v6.8.11):
- feat: add Kimi (Moonshot AI) provider support with OAuth
- feat: add iFlow provider with OAuth and cookie auth
- feat: support Claude thinking type adaptive
- feat: capture cached token count in usage metadata
- fix: correct max completion tokens for opus 4.6 thinking
- fix: improve content handling for system and user messages
- fix: rewrite model name in response.model for Responses API SSE
- refactor: simplify provider lifecycle and registration logic
- refactor: migrate config-access to internal package

Fork integration:
- Migrate configaccess from sdk/access/config to internal/access/config_access
- Update reconcile.go to use internalconfig types directly
- Add Kimi and iFlow login flags to ProxyPilot CLI
- Integrate managementasset auto-updater
- Keep all ProxyPilot fork features (TUI, agent setup, service, etc.)
2026-02-11 19:03:07 +07:00
Luis Pater 0040d78496 refactor(sdk): simplify provider lifecycle and registration logic 2026-02-10 15:39:26 +08:00
RCD 346d8d3fb6 remove(cli): drop --amazonq-import flag and import command
Remove the CLI flag, variable, and DoAmazonQImport function.
2026-02-08 17:57:55 +07:00
testandClaude Opus 4.6 f5f26f0cbe Add Kimi (Moonshot AI) provider support
- OAuth2 device authorization grant flow (RFC 8628) for authentication
- Streaming and non-streaming chat completions via OpenAI-compatible API
- Models: kimi-k2, kimi-k2-thinking, kimi-k2.5
- CLI `--kimi-login` command for device flow auth
- Token management with automatic refresh
- Thinking/reasoning effort support for thinking-enabled models

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 19:24:46 -05:00
RCD 7e3df456a5 Merge upstream CLIProxyAPI v6.7.42 into ProxyPilot
This merge brings in upstream changes from CLIProxyAPI v6.7.42 while
preserving ProxyPilot-specific customizations:

- Updated API server and executor modules
- New OAuth model alias functionality
- Enhanced thinking provider for iflow
- Updated model definitions and registry
- Improved docker build scripts

Conflicts were resolved by keeping ProxyPilot branding and merging
upstream improvements for translator and runtime components.
2026-02-03 11:08:58 +07:00
RCDandClaude 861c4c29d9 chore: sync version strings to 0.3.0
Update FileVersion and ProductVersion in versioninfo.json files
from 0.1.6 to 0.3.0 for both proxypilot-tray and server commands.

Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
2026-02-01 11:53:41 +07:00
RCD ed136fef5d refactor(logging): centralize log directory resolution logic
- Add ResolveLogDirectory() for consistent log path resolution
- Add SetLogLevel() for string-based log level configuration
- Update ConfigureLogOutput() to take *config.Config parameter
- Update all callers to use simplified API

Cherry-picked from CLIProxyAPI with adaptations.
2026-01-19 06:07:51 +07:00
Luis Pater a1da6ff5ac Fixed: #499 #985
feat(oauth): add support for customizable OAuth callback ports

- Introduced `oauth-callback-port` flag to override default callback ports.
- Updated SDK and login flows for `iflow`, `gemini`, `antigravity`, `codex`, `claude`, and `openai` to respect configurable callback ports.
- Refactored internal OAuth servers to dynamically assign ports based on the provided options.
- Revised tests and documentation to reflect the new flag and behavior.
2026-01-14 04:29:15 +08:00
Finessse 522f0e5c89 feat(windows): add single-instance mutex and Windows service support
- winutil package with mutex-based single instance lock
- Toast notification helper for Windows
- Service stubs for future Windows service mode
2026-01-12 07:36:43 +07:00
Finessse d6dd24e2b7 feat(tui): add polished Flight Deck terminal dashboard
- Bubbletea-based TUI with 5 tabs: Status, Accounts, Rate Limits, Usage, Logs
- Industrial control room aesthetic with orange/green color scheme
- Double-line borders (╔═╗), active tab indicator 【】
- 3-column stat boxes on Status, 4-column on Usage
- Visual gauge bar for rate limit availability
- Config-optional mode allows TUI to run without config.yaml
- Full-width frame with properly aligned borders
2026-01-12 07:33:04 +07:00
Finessse 33fbfa7b53 feat(cli): add advanced account management commands
- Add -usage flag (token usage stats per provider)
- Add -logs flag (view recent logs, -n for line count)
- Add -refresh flag (force token refresh)
- Add -list-models flag (show available models)
- Add -export-accounts/-import-accounts (backup/restore)
- Add --include-tokens and --force flags for export/import
2026-01-12 04:30:45 +07:00
Finessse a09a23380e feat(cli): wire -quiet/-verbose flags to logging
- Add SetLogLevel() to logging package
- CLI flags override config-based log level
- Add tests for account.go (6 tests)
2026-01-12 02:26:06 +07:00
Finessse 5f8941b407 feat(cli): add account management commands
- Add -version, -status, -list-accounts flags
- Add -cleanup-expired, -remove-account for token management
- Add -json output mode for scripting
- Add -quiet/-verbose flags
- Colored terminal output with table formatting
2026-01-12 02:18:32 +07:00
Finessse f0568a5c20 docs(cli): update --antigravity-import flag description 2026-01-11 05:11:20 +07:00
Finessse 9679f69b81 feat(auth): add Gemini CLI token import for Antigravity
- Add internal/auth/antigravity package with token loading from ~/.gemini/oauth_creds.json
- Add ImportFromGeminiCLI method to AntigravityAuthenticator
- Add DoAntigravityImport CLI command
- Add --antigravity-import flag to server binary

Usage: proxypilot --antigravity-import
2026-01-11 04:10:54 +07:00
Finessse 0551a8bd18 chore: remove managementasset references from server 2026-01-06 06:24:20 +07:00
Finessse fecc80de5f refactor: remove TUI flags from CLI 2026-01-04 19:51:07 +07:00
Luis Pater bc866bac49 fix(logging): refactor ConfigureLogOutput to accept config object and adjust log directory handling 2025-12-30 10:28:25 +08:00
Finessse 6e53bdade9 feat: add --tui flag for interactive mode 2025-12-30 01:28:38 +07:00
Finessse 7afc014c0e feat(cmd): integrate switch command into main binary
Add --switch and --mode flags plus subcommand-style 'proxypilot switch'
syntax for quick agent configuration switching. Supports both flag style
(--switch claude --mode proxy) and subcommand style (proxypilot switch
claude proxy).
2025-12-29 21:19:25 +07:00
Finessse 551c664564 feat(cmd): add provider login CLI flags to server
- Add --minimax-login, --zhipu-login for API key providers
- Add --amazonq-import for Amazon Q CLI token import
- Add --kiro-import for Kiro IDE token import
- Add --kiro-aws-login for AWS Builder ID flow
2025-12-29 19:00:17 +07:00
Finessse a1ca0ddcb8 chore: bump version to 0.1.6 2025-12-28 20:55:46 +07:00
Finessse 7457183dd1 refactor(cli): remove iFlow login flags
Remove --iflow-login and --iflow-cookie CLI flags.
2025-12-28 20:49:04 +07:00
Finessse 9a2363d6bd chore: bump version to 0.1.5
Includes:
- Vision base64 parsing fix for OpenAI-to-Claude translation
- Memory API localhost authentication with API keys
- Global model mapping SDK hook for cross-provider aliases
- Comprehensive unit tests for auth, config, memory, and runtime
2025-12-28 10:49:06 +07:00
Finessse b127b674e9 sync: squash merge upstream CLIProxyAPI v6.6.62
Synced with upstream v6.6.61-v6.6.62 changes:
- Added usage export/import endpoints
- Added normalizeCodexKey function
- Updated BootstrapRetries type
- Enhanced model definitions and antigravity config

Preserved ProxyPilot customizations:
- Kept CompressionConfig for long-context sessions
- Kept Kiro, GitHub Copilot, Amazon Q model definitions
- Kept shouldKeepProviderOrder for Gemini-3 provider stability
- Kept advanceProviderCursor pattern (separate cursor advancement)
- Removed AmpCode integration (not used)

Version: 0.1.4
2025-12-28 08:32:11 +07:00
Finessse 0b12eafe6c chore: bump version to 0.1.3 2025-12-28 07:17:57 +07:00
Finessse bbcf06f163 chore: bump version to 0.1.1
Prepare release v0.1.1 with new features:
- Model-specific pricing for cost estimation
- Auto-update with download, verify, and install flow
- Cost savings display in Analytics
- Logo branding assets
2025-12-28 03:42:33 +07:00
Finessse 660c0f7656 fix: use multi-resolution icon (16-256px) for proper Windows display 2025-12-27 07:13:13 +07:00
Finessse c10abab37c feat: embed ProxyPilot logo in all executables
- Add versioninfo.json for goversioninfo in tray and server
- Generate resource.syso files with embedded icon
- Update ico.go to embed actual icon.ico for tray
- All exes now show ProxyPilot logo in File Explorer
2025-12-27 07:05:13 +07:00
FinessseandClaude Opus 4.5 572792f2c6 feat(cmd): add --detect-agents and --setup-* flags
Add CLI flags for agent detection and configuration:
- --detect-agents: List installed CLI agents
- --setup-claude: Configure Claude Code
- --setup-codex: Configure Codex CLI
- --setup-droid: Configure Factory Droid

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 05:09:45 +07:00
FinessseandClaude Opus 4.5 221a386040 feat: sync with CLIProxyAPIPlus (excludes Amp, GitHub Copilot)
Synced all changes from router-for-me/CLIProxyAPIPlus including:

Executor updates:
- claude_executor: response decompression, beta extraction, model resolution
- gemini_executor/codex_executor: usage reporting
- antigravity_executor: fallback URLs, thinking metadata, token refresh
- kiro_executor: token refresh, profile ARN handling, quota fallback

Translator updates:
- Updated all translators for improved request/response handling
- Enhanced tool result formatting and streaming support

Configuration:
- Added IncognitoBrowser option for OAuth
- Updated KiroKey configuration
- Enhanced PayloadConfig options

SDK updates:
- Auth refresh registry improvements
- Cliproxy service enhancements
- Added ErrNotImplemented for executor interface

Excluded features (not synced):
- Amp CLI Integration module
- GitHub Copilot executor

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 02:10:20 +07:00
Finessse 7c8e9f39c9 refactor(access): migrate core access logic to SDK 2025-12-25 05:45:35 +07:00
Luis Pater 8fac6b147a Merge branch 'router-for-me:main' into main 2025-12-20 17:13:30 +08:00
Luis Pater 3e4858a624 feat(config): add log file size limit configuration #535
This commit introduces a new configuration option `logs-max-total-size-mb` that allows users to set a maximum total size (in MB) for log files in the logs directory. When this limit is exceeded, the oldest log files will be automatically deleted to stay within the specified size. Setting this value to 0 (the default) disables this feature. This change enhances log management by preventing excessive disk space usage.
2025-12-20 15:52:59 +08:00
Finessse a782c70d47 feat(tray): update cliproxytray window and command handlers 2025-12-19 18:17:00 +07:00
Finessse 3e0aac0a9c proxypilot: polish helper UI strings 2025-12-18 17:55:20 +07:00
Finessse 60c270bd56 proxypilot: rename engine binary to proxypilot-engine 2025-12-18 17:26:54 +07:00