Commit Graph
1792 Commits
Author SHA1 Message Date
kaitranntt d238a5d43a fix(cliproxy): update Claude model catalog to latest CLIProxy models
- Updated claude-opus-4-5-20250220 → claude-opus-4-5-20251101
- Updated claude-sonnet-4-5-20250514 → claude-sonnet-4-5-20250929
- Updated claude-haiku-4-5-20250514 → claude-haiku-4-5-20251001
- Updated default model to claude-sonnet-4-5-20250929
- Updated all preset mappings to use new model IDs

Closes #392
2026-01-29 00:37:31 -05:00
semantic-release-bot a46ac1115e chore(release): 7.30.0 [skip ci]
## [7.30.0](https://github.com/kaitranntt/ccs/compare/v7.29.0...v7.30.0) (2026-01-28)

### Features

* **cliproxy:** add auto_sync config option ([fc23afd](https://github.com/kaitranntt/ccs/commit/fc23afdfc78a955fc0a1ce7f55d2e2bd098fc6c4))
* **cliproxy:** add granular account tier prioritization (ultra/pro/free) ([aeb9abc](https://github.com/kaitranntt/ccs/commit/aeb9abc998a5114007e34c478cf5c79213ea1fe7)), closes [#387](https://github.com/kaitranntt/ccs/issues/387)
* **cliproxy:** add local config sync module ([9de2682](https://github.com/kaitranntt/ccs/commit/9de26820629f5e95a487028a64c1a8a782674448))
* **cliproxy:** add Management API client for CLIProxy ([4cc89ea](https://github.com/kaitranntt/ccs/commit/4cc89eaf8745d67548f032408cd284fd23c3bd5e))
* **cliproxy:** add sync and alias CLI commands ([cb6c212](https://github.com/kaitranntt/ccs/commit/cb6c21216dcaf0536530f110af75dc20ee7c7738))
* **cliproxy:** add sync API routes ([56500fe](https://github.com/kaitranntt/ccs/commit/56500fee98042fb333bd723818d2a3881cd28481))
* **cliproxy:** auto-sync on profile create ([b2ba402](https://github.com/kaitranntt/ccs/commit/b2ba402d0fb4204457ae1f09016cb21bd9b5a6e2))
* **cliproxy:** enable auto_sync by default ([28b0e89](https://github.com/kaitranntt/ccs/commit/28b0e89b34787f42d63e2dd1a036b75a761bcf6b))
* **ui:** add CLIProxy sync components ([75a4e68](https://github.com/kaitranntt/ccs/commit/75a4e68f95ba5f8c7c8b647b8d5cf0d013dc425a))
* **ui:** add granular account tier types (pro/ultra/free) ([890fd14](https://github.com/kaitranntt/ccs/commit/890fd140f2ede728f212ed0bfc77bc8609b3a09b))
* **ui:** add tier badges to account cards ([31a91f6](https://github.com/kaitranntt/ccs/commit/31a91f609fad4af17f0e4bd3b0f0dbabe8bf2b77))
* **ui:** add toast feedback for sync actions ([f972a4e](https://github.com/kaitranntt/ccs/commit/f972a4ee80ebdec7b0a645d29eba4d65ca847caf))
* **ui:** allow custom model names in Quick Setup wizard ([ab9bbed](https://github.com/kaitranntt/ccs/commit/ab9bbedfa92555d0502b064145c0cfd5bf24065c))
* **ui:** mount SyncStatusCard to CLIProxy page ([afa3bda](https://github.com/kaitranntt/ccs/commit/afa3bdafceb1829e0fef2994bcb51c731797657f))

### Bug Fixes

* **cliproxy:** address edge cases in sync module ([9924b2f](https://github.com/kaitranntt/ccs/commit/9924b2fb25650803c34d26eae151c53a007fa0bb))
* **cliproxy:** address PR review feedback ([4967693](https://github.com/kaitranntt/ccs/commit/496769383979fb0b08bb03a57acd4ad2c10221c6))
* **cliproxy:** address sync review feedback ([e80d2d2](https://github.com/kaitranntt/ccs/commit/e80d2d2d05c00522cdaac03e6f55ecf10a938fc7))
* **cliproxy:** correct sync terminology and add unit tests ([c3f85bc](https://github.com/kaitranntt/ccs/commit/c3f85bc4a8c1351b09d463bd1687e17fa8a989d5))
* **cliproxy:** harden sync against edge cases ([bbad73b](https://github.com/kaitranntt/ccs/commit/bbad73b55450d04902b90a4fc4c006a8c7a3c5c1))
* **cliproxy:** improve sync robustness and consistency ([4124780](https://github.com/kaitranntt/ccs/commit/4124780ce07201f166971216fd48e5b072ec9dd5))
* **cliproxy:** preserve config comments during sync ([68a63a7](https://github.com/kaitranntt/ccs/commit/68a63a776812c7026a38f7dc7d5bb6996bc30190))
* **cliproxy:** use paidTier for account tier detection instead of allowedTiers ([de23029](https://github.com/kaitranntt/ccs/commit/de23029b572c9e1db1c8a004ec214ce5a465570a))
* **ui:** add scroll boundary for account list in Quick Setup ([85aa747](https://github.com/kaitranntt/ccs/commit/85aa747aebccbde21111730f6eb63e047ac0b91d))
* **ui:** fix account card layout overflow ([87cced8](https://github.com/kaitranntt/ccs/commit/87cced81952c168eaa4c6fd98059f089d765bcb3))
* **ui:** update sync card for local sync design ([e2b9c46](https://github.com/kaitranntt/ccs/commit/e2b9c465e4485c13086b82d282d9c67ae640dc77))

### Code Refactoring

* **cliproxy:** remove model alias functionality ([32dbd5e](https://github.com/kaitranntt/ccs/commit/32dbd5e174338d7627637667c63162ea4b9ffe7f))
* **ui:** merge sync into ProxyStatusWidget ([3761634](https://github.com/kaitranntt/ccs/commit/37616348f8e0edf934e68854faf6c783d4ff7aca))

### Tests

* **cliproxy:** add management-api-client unit tests ([6611142](https://github.com/kaitranntt/ccs/commit/6611142dcc60180dbaa4b987c3fb801ce753ffb1))
2026-01-28 22:01:02 +00:00
Kai (Tam Nhu) TranandGitHub 8a81e4ce15 Merge pull request #391 from kaitranntt/dev
feat(release): v7.29.0 - account tier prioritization & local sync
2026-01-28 16:59:56 -05:00
github-actions[bot] 2c649275d6 chore(release): 7.29.0-dev.2 [skip ci] 2026-01-28 21:54:57 +00:00
Kai (Tam Nhu) TranandGitHub c70014a5ba Merge pull request #390 from kaitranntt/feat/account-tier-prioritization
feat(cliproxy): account tier prioritization (ultra/pro/free)
2026-01-28 16:53:56 -05:00
kaitranntt 4967693839 fix(cliproxy): address PR review feedback
- align tier fallback to 'unknown' instead of 'pro' in quota-manager

- update stale comment referencing old allowedTiers approach
2026-01-28 16:41:27 -05:00
kaitranntt 31a91f609f feat(ui): add tier badges to account cards
- flow-viz: inline tier badge (ULTRA/PRO) with violet/yellow colors

- provider-editor: tier badge on avatar corner (U/P)

- subtle design with low opacity backgrounds
2026-01-28 16:31:16 -05:00
kaitranntt 890fd140f2 feat(ui): add granular account tier types (pro/ultra/free)
- update AccountTier from binary to granular

- add tier field to AccountRow and AccountData types

- pass tier through hooks data flow
2026-01-28 16:30:41 -05:00
kaitranntt de23029b57 fix(cliproxy): use paidTier for account tier detection instead of allowedTiers
- paidTier.id contains actual subscription: g1-ultra-tier or g1-pro-tier

- allowedTiers[isDefault] returns standard-tier for all accounts (not useful)

- mapTierString now correctly parses g1-ultra-tier and g1-pro-tier formats
2026-01-28 15:17:23 -05:00
kaitranntt 87cced8195 fix(ui): fix account card layout overflow
- add min-w-0 flex-1 to left content container for proper shrinking

- add gap-2 between content and dropdown menu

- add shrink-0 to dropdown button to prevent overflow
2026-01-28 15:11:17 -05:00
kaitranntt aeb9abc998 feat(cliproxy): add granular account tier prioritization (ultra/pro/free)
- change AccountTier from binary (free/paid) to granular (ultra/pro/free/unknown)

- update mapTierString() to parse API tier strings correctly

- remove faulty inferTierFromModels() fallback - tier comes only from API

- update default tier_priority config to ['ultra', 'pro', 'free']

- update model catalog tier types and display logic

Closes #387
2026-01-28 15:11:00 -05:00
github-actions[bot] e01a622c97 chore(release): 7.29.0-dev.1 [skip ci] 2026-01-28 19:30:53 +00:00
Kai (Tam Nhu) TranandGitHub 9ca73b93a3 Merge pull request #389 from kaitranntt/kai/feat/cliproxy-local-sync
feat(cliproxy): add local config sync with auto-sync watcher
2026-01-28 14:29:51 -05:00
kaitranntt 6611142dcc test(cliproxy): add management-api-client unit tests
- Add 31 unit tests for fetchLocalSyncStatus, fetchProfiles, and performLocalSync
- Cover success, error, timeout, and network failure scenarios
- Remove unused --force flag from sync handler (YAGNI)
2026-01-28 14:12:42 -05:00
kaitranntt bbad73b554 fix(cliproxy): harden sync against edge cases
Backend:
- Handle config file deletion race condition with try-catch
- Add null check for empty config files in yaml.load()
- Limit profile names to 64 chars, require alphanumeric content
- Add 5s timeout for watcher close() to prevent hangs

Frontend:
- Add 30s fetch timeout with AbortController for sync requests
2026-01-28 13:58:16 -05:00
kaitranntt 4124780ce0 fix(cliproxy): improve sync robustness and consistency
- Add timeout warning in restartAutoSyncWatcher when sync exceeds 10s
- Improve YAML key detection with regex pattern for safer parsing
- Replace --force help with --verbose (no confirmation prompt exists)
- Add force flag parsing for future use
2026-01-28 13:49:46 -05:00
kaitranntt e80d2d2d05 fix(cliproxy): address sync review feedback
- Fix auto_sync JSDoc to say (default: true) matching actual default
- Add unlink event handler for profile deletion sync
- Add debug logging for sync failures in api-command
2026-01-28 13:44:00 -05:00
kaitranntt c3f85bc4a8 fix(cliproxy): correct sync terminology and add unit tests
- Fix "Remote" → "Local" in sync-dialog.tsx and CLI help text
- Add resetWatcherState() export for test cleanup
- Add unit tests for profile-mapper, local-config-sync, auto-sync-watcher
- Remove unused ModelAlias and AliasesResponse types from hooks
2026-01-28 13:26:40 -05:00
kaitranntt ab9bbedfa9 feat(ui): allow custom model names in Quick Setup wizard
- Add "Custom model name..." option to model dropdown
- Show text input when custom selected
- Allow any CLIProxy-supported model name
- Toggle back to presets with link
2026-01-28 11:57:22 -05:00
kaitranntt 85aa747aeb fix(ui): add scroll boundary for account list in Quick Setup
- Add max-h-[320px] and overflow-y-auto to account grid
- Prevents overflow when many accounts exist
2026-01-28 11:57:22 -05:00
kaitranntt f972a4ee80 feat(ui): add toast feedback for sync actions
- Show success toast with synced profile count
- Show info toast when no profiles to sync
- Show error toast on sync failure
2026-01-28 11:57:22 -05:00
kaitranntt 68a63a7768 fix(cliproxy): preserve config comments during sync
- Use section-based replacement instead of full yaml.dump()
- Only update claude-api-key section, keep rest of file intact
- Preserves comments, formatting, and key ordering
2026-01-28 11:57:22 -05:00
kaitranntt 37616348f8 refactor(ui): merge sync into ProxyStatusWidget
- add sync icon button to widget header

- show inline sync status (Ready/No Config)

- remove separate SyncStatusCard from cliproxy page

- reduces vertical space, better UX
2026-01-28 11:57:22 -05:00
kaitranntt 32dbd5e174 refactor(cliproxy): remove model alias functionality
- delete model-alias-config.ts and cliproxy-alias-handler.ts

- simplify sync to use ANTHROPIC_MODEL directly

- remove alias routes, hooks, and UI components
2026-01-28 11:57:22 -05:00
kaitranntt afa3bdafce feat(ui): mount SyncStatusCard to CLIProxy page 2026-01-28 11:57:22 -05:00
kaitranntt e2b9c465e4 fix(ui): update sync card for local sync design
- rename Remote Sync to Profile Sync

- change status from Connected/Disconnected to Ready/No Config

- update icons and messaging for local config sync
2026-01-28 11:57:22 -05:00
kaitranntt b2ba402d0f feat(cliproxy): auto-sync on profile create 2026-01-28 11:57:22 -05:00
kaitranntt 28b0e89b34 feat(cliproxy): enable auto_sync by default 2026-01-28 11:57:22 -05:00
kaitranntt 9924b2fb25 fix(cliproxy): address edge cases in sync module
- Reset isSyncing flag in stopAutoSyncWatcher (prevents stale state)
- Validate empty profile names in mapProfileToClaudeKey
- Add whitespace validation in API routes (POST/DELETE /aliases)
- Add Number.isInteger check for port validation
- Wrap response.json() in try-catch for React hooks (handles non-JSON 502)
2026-01-28 11:57:22 -05:00
kaitranntt 75a4e68f95 feat(ui): add CLIProxy sync components
- add SyncStatusCard for sync status display
- add SyncDialog for sync preview and execution
- add useCliproxySync hook for API integration
2026-01-28 11:57:22 -05:00
kaitranntt fc23afdfc7 feat(cliproxy): add auto_sync config option
- export sync module from cliproxy barrel
- add auto_sync field to CLIProxyConfig interface
2026-01-28 11:57:22 -05:00
kaitranntt 56500fee98 feat(cliproxy): add sync API routes
- add /api/cliproxy/sync endpoints for local sync
- add /api/cliproxy/sync/aliases for model alias management
- add /api/cliproxy/sync/auto-sync for watcher toggle
- separate try-catch for config save vs watcher restart
2026-01-28 11:57:22 -05:00
kaitranntt cb6c21216d feat(cliproxy): add sync and alias CLI commands
- add `ccs cliproxy sync` command for manual sync
- add `ccs cliproxy alias` command for model alias management
- support --dry-run and --verbose flags
- integrate with cliproxy subcommand router
2026-01-28 11:57:22 -05:00
kaitranntt 9de2682062 feat(cliproxy): add local config sync module
- add profile mapper to transform CCS profiles to ClaudeKey format
- add model alias configuration with defaults for glm/kimi/qwen
- add local config sync to write claude-api-key section
- add auto-sync watcher with debouncing for profile changes
- include null config handling and temp file cleanup
2026-01-28 11:57:22 -05:00
kaitranntt 4cc89eaf87 feat(cliproxy): add Management API client for CLIProxy
- add types for ClaudeKey, ClaudeModel, HealthStatus
- add HTTP client for Management API endpoints
- support GET/PUT/PATCH/DELETE operations
2026-01-28 11:57:22 -05:00
semantic-release-bot ae11603de7 chore(release): 7.29.0 [skip ci]
## [7.29.0](https://github.com/kaitranntt/ccs/compare/v7.28.2...v7.29.0) (2026-01-28)

### Features

* **cliproxy:** add Claude (Anthropic) OAuth provider support ([28d8bd8](https://github.com/kaitranntt/ccs/commit/28d8bd84a5ac912b79416aeced95f74fd71876bb)), closes [#380](https://github.com/kaitranntt/ccs/issues/380)
* skip local OAuth when using remote proxy with auth token ([1f5d119](https://github.com/kaitranntt/ccs/commit/1f5d11930ee19c0f00b46d7994ea99c7be8e55c6))

### Bug Fixes

* add claude provider to statsProviderMap, UI types, and provider arrays ([4a2abc7](https://github.com/kaitranntt/ccs/commit/4a2abc74cac93e17ee12fab3fcf8fc0693552347))
* **cliproxy:** add Claude to all provider lists for sidebar display ([d212995](https://github.com/kaitranntt/ccs/commit/d2129957d7e954701be973725545f475711d0468))
* **cliproxy:** address PR review feedback ([2091a90](https://github.com/kaitranntt/ccs/commit/2091a90b7710e7cb0b565577a5e659473126a541)), closes [#D97757](https://github.com/kaitranntt/ccs/issues/D97757)
* **cliproxy:** improve skip-local-auth edge case handling ([21e819b](https://github.com/kaitranntt/ccs/commit/21e819b59062b77c2686ecc5f24e9c3436e42f84))
* **cliproxy:** use correct --claude-login flag for Claude OAuth ([8017ce8](https://github.com/kaitranntt/ccs/commit/8017ce8f8639ffc282203d6809091df83e0c8f18)), closes [#382](https://github.com/kaitranntt/ccs/issues/382)
* replace hardcoded provider validation arrays with CLIPROXY_PROFILES import ([9cd9c42](https://github.com/kaitranntt/ccs/commit/9cd9c423e929579c86da3f409d74927c3c7dedc1)), closes [#382](https://github.com/kaitranntt/ccs/issues/382)
* **test:** use correct provider name 'ghcp' instead of 'copilot' ([838cd1d](https://github.com/kaitranntt/ccs/commit/838cd1d460de68acb571bb44bc12f91bd0636ff7))
* **ui:** add iFlow to PROVIDER_ASSETS + sync validation test ([5c62e06](https://github.com/kaitranntt/ccs/commit/5c62e06d0236b5080ccfb3ca2ff55407cbb414e1)), closes [#384](https://github.com/kaitranntt/ccs/issues/384)
* **ui:** truncate long account emails in provider editor ([a9c5520](https://github.com/kaitranntt/ccs/commit/a9c5520b8b4b7d49d1afe0e63b4facab3142db1b))

### Code Refactoring

* **cliproxy:** reorder providers - Antigravity first, then Claude ([b385ab1](https://github.com/kaitranntt/ccs/commit/b385ab131d2b179c7b7bd014859f9118afd6ce5c))
* **cliproxy:** use CLIPROXY_PROFILES for provider arrays (DRY) ([9fd9395](https://github.com/kaitranntt/ccs/commit/9fd93955880fd1b90d15f45d9738d413d04769ca)), closes [#384](https://github.com/kaitranntt/ccs/issues/384)
* **oauth:** derive auth-code providers from OAUTH_FLOW_TYPES (DRY) ([c713d48](https://github.com/kaitranntt/ccs/commit/c713d48d08af5044cb0fab4505365fd98e31b9d6)), closes [#384](https://github.com/kaitranntt/ccs/issues/384)
* **ui:** centralize provider list in provider-config.ts (DRY) ([5a4c8e0](https://github.com/kaitranntt/ccs/commit/5a4c8e009ce1cc355d6fa2f05001cab6c9b684c4))
2026-01-28 03:28:46 +00:00
Kai (Tam Nhu) TranandGitHub 110e82756c Merge pull request #384 from kaitranntt/dev
feat(cliproxy): Claude OAuth provider + skip-local-auth improvements
2026-01-27 22:27:46 -05:00
github-actions[bot] 6e560b78c4 chore(release): 7.28.2-dev.5 [skip ci] 2026-01-28 03:26:46 +00:00
kaitranntt c713d48d08 refactor(oauth): derive auth-code providers from OAUTH_FLOW_TYPES (DRY)
- Update checkAuthCodePorts() to filter from CLIPROXY_PROFILES

- Update header comment to list all OAuth ports including Claude

- Addresses PR #384 review round 3
2026-01-27 22:25:31 -05:00
kaitranntt 5c62e06d02 fix(ui): add iFlow to PROVIDER_ASSETS + sync validation test
- Add iflow.png to PROVIDER_ASSETS map

- Add backend-ui-provider-arrays-sync.test.ts to catch mismatches

- Addresses PR #384 review: dual source of truth + missing iFlow
2026-01-27 22:20:15 -05:00
github-actions[bot] ebc42c9457 chore(release): 7.28.2-dev.4 [skip ci] 2026-01-28 03:06:09 +00:00
kaitranntt 9fd9395588 refactor(cliproxy): use CLIPROXY_PROFILES for provider arrays (DRY)
- Replace hardcoded arrays in token-manager.ts, token-expiry-checker.ts

- Replace hardcoded arrays in account-manager.ts, oauth-port-diagnostics.ts

- Addresses PR #384 code review feedback
2026-01-27 22:04:46 -05:00
github-actions[bot] b3cde80d0e chore(release): 7.28.2-dev.3 [skip ci] 2026-01-28 02:43:55 +00:00
kaitranntt a9c5520b8b fix(ui): truncate long account emails in provider editor
- Add min-w-0 flex-1 for proper text overflow

- Add truncate class to prevent layout break
2026-01-27 21:40:29 -05:00
kaitranntt 8017ce8f86 fix(cliproxy): use correct --claude-login flag for Claude OAuth
- CLIProxyAPI expects --claude-login, not --anthropic-login

- Fixes 'CLIProxy auth exited with code 2' error

Closes #382
2026-01-27 21:39:19 -05:00
github-actions[bot] 409ad67afb chore(release): 7.28.2-dev.2 [skip ci] 2026-01-28 02:27:20 +00:00
Kai (Tam Nhu) TranandGitHub eba0ed277b Merge pull request #383 from kaitranntt/fix/claude-provider-validation
fix(cliproxy): add claude provider to all validation arrays and UI types
2026-01-27 21:26:22 -05:00
kaitranntt 5a4c8e009c refactor(ui): centralize provider list in provider-config.ts (DRY)
- Add CLIPROXY_PROVIDERS array as single source of truth for UI
- Add CLIProxyProvider type and isValidProvider() helper
- Update api-client.ts to use CLIProxyProvider type
- Update cliproxy-dialog.tsx to import from provider-config
- Update cliproxy-header.tsx to use CLIPROXY_PROVIDERS
- Update use-cliproxy-auth-flow.ts to use isValidProvider()
- Update wizard constants to use typed provider info

Adding a new provider now only requires updating:
- Backend: src/auth/profile-detector.ts (CLIPROXY_PROFILES)
- UI: ui/src/lib/provider-config.ts (CLIPROXY_PROVIDERS)
- UI wizard: ui/src/components/setup/wizard/constants.ts (PROVIDER_INFO)
2026-01-27 21:07:26 -05:00
kaitranntt 4a2abc74ca fix: add claude provider to statsProviderMap, UI types, and provider arrays
Fixes remaining edge cases from #382:
- Add anthropic/claude mapping to statsProviderMap in cliproxy-auth-routes
- Add 'claude' case to provider-refreshers switch statement
- Add 'claude' to 4 UI type definitions in api-client.ts
- Add 'claude' to cliproxy-dialog providers array and options
- Add 'claude' to use-cliproxy-auth-flow VALID_PROVIDERS
- Fix wizard index.tsx type cast to include all 8 providers
2026-01-27 21:02:34 -05:00
kaitranntt 9cd9c423e9 fix: replace hardcoded provider validation arrays with CLIPROXY_PROFILES import
Closes #382

Replace duplicate hardcoded provider validation arrays across three route files
with a single import from CLIPROXY_PROFILES constant. This DRY fix eliminates
code duplication and ensures provider validation is consistent across all routes.

Files updated:
- account-routes.ts
- cliproxy-auth-routes.ts
- cliproxy-stats-routes.ts

Reduces code by 21 lines while improving maintainability.
2026-01-27 20:50:24 -05:00