Commit Graph
682 Commits
Author SHA1 Message Date
Tam Nhu Tran 4fc19c4390 feat(cliproxy): expose codex weekly reset schedule in quota views 2026-02-15 09:48:39 +07:00
Tam Nhu Tran b40fe866ec fix(cursor-ui): label cursor dashboard as beta
- add visible Beta badge in Cursor page header

- clarifies feature is not production-tested yet
2026-02-15 05:39:46 +07:00
Kai (Tam Nhu) TranandGitHub 16aeddfb11 Merge pull request #568 from kaitranntt/fix/555-cursor-e2e-recovery
feat(cursor): recover lost Cursor dashboard and model-mapping work
2026-02-14 17:50:57 +07:00
Tam Nhu Tran decdffea61 fix(cursor-ui): restore info card order and list scrolling
- move Cursor info metadata card above available models

- add min-h-0/flex containment to preserve scroll behavior

- fix clipped content in cursor config dashboard layout
2026-02-14 17:48:18 +07:00
Tam Nhu Tran 7ab7a156eb feat(cursor-ui): restore Cursor dashboard UX and icon assets
- rebuild /cursor page with model tiers, presets, and save-all flow

- validate raw JSON edits via RawEditorSection before save operations

- add sidebar image icon rendering and restore cursor.svg asset

- include risk warning copy and OpenAI-first GPT-5.3 Codex preset

Refs #555
2026-02-14 16:57:27 +07:00
Kai (Tam Nhu) TranandGitHub c9b4a9ccba Merge pull request #561 from kaitranntt/fix/552-review-followups
fix(cliproxy): harden Kiro device-code auth flow consistency
2026-02-14 13:38:00 +07:00
Tam Nhu Tran e3f0860750 fix(ui): use type-only import for KiroAuthMethod
- satisfy verbatimModuleSyntax during ui build in CI
2026-02-14 13:36:13 +07:00
Tam Nhu Tran 6a21f3921b fix(ui): add method-aware kiro auth flow parity
- add Kiro auth-method selector with AWS device-code default

- route start requests by method-specific flow and endpoint

- support auth_url status polling and delayed URL UX state

Refs #552

Refs #233
2026-02-14 13:33:57 +07:00
Tam Nhu Tran 945db1d690 feat(cliproxy): clarify codex effort mapping and preset UX 2026-02-14 11:31:18 +07:00
Tam Nhu Tran 826a42d8d6 fix(cliproxy): harden kiro device-code auth flow consistency 2026-02-14 10:55:14 +07:00
Kai (Tam Nhu) TranandGitHub 9796a21612 Merge pull request #559 from kaitranntt/fix/codex-reasoning-ux
fix: codex reasoning effort UX across cliproxy and -p
2026-02-14 09:08:20 +07:00
Kai (Tam Nhu) TranandGitHub 174a4c2777 Merge pull request #558 from kaitranntt/kai/fix/555-cursor-e2e
feat(cursor): complete end-to-end integration and dedicated dashboard UX
2026-02-14 09:03:09 +07:00
Tam Nhu Tran 0db2fd2040 Revert "feat(codex): use spark as haiku in 5.3 preset"
This reverts commit aaaceb43e0.
2026-02-14 08:20:32 +07:00
Tam Nhu Tran f9df3cfa7a fix(cliproxy): unify codex reasoning flags and thinking flow 2026-02-14 07:44:59 +07:00
Tam Nhu Tran 9a76f866b0 fix(cursor): guard raw-settings save race and enforce daemon preconditions 2026-02-14 07:11:02 +07:00
Kai (Tam Nhu) TranandGitHub 8097441d53 Merge pull request #557 from kaitranntt/feat/556-codex-53-preset-default
feat: add Codex 5.3 preset and default base-codex model
2026-02-14 06:51:43 +07:00
Tam Nhu Tran aaaceb43e0 feat(codex): use spark as haiku in 5.3 preset 2026-02-14 06:48:23 +07:00
Tam Nhu Tran 0e55db88a5 fix(cursor): address CI gate and review regressions 2026-02-14 06:41:57 +07:00
Tam Nhu Tran 40512fe338 fix(codex): stabilize code review window labeling 2026-02-14 06:28:48 +07:00
Tam Nhu Tran be9d7cf73e feat(cursor): complete daemon wiring and add dedicated dashboard page 2026-02-14 06:22:28 +07:00
Tam Nhu Tran 164d195367 fix(codex): preserve xhigh default effort for gpt-5.3 2026-02-14 06:21:56 +07:00
Tam Nhu Tran d6aa1d90a6 feat(codex): keep gpt-5.2 catalog entry 2026-02-14 06:15:31 +07:00
Tam Nhu Tran 7fddb63ab9 feat(codex): add gpt-5.3 preset defaults 2026-02-14 06:14:19 +07:00
Tam Nhu Tran 1d2ee827fe fix(codex): infer code review cadence from reset window 2026-02-14 06:09:36 +07:00
Tam Nhu Tran f8af5a8c3c fix(codex): align quota display to 5h and weekly windows 2026-02-14 05:57:06 +07:00
Tam Nhu Tran 6c2083949f fix(cliproxy): mark Kiro as device_code flow for dashboard auth
CLIProxyAPIPlus uses device code flow for Kiro authentication, returning
{method: "device_code", state, status} without an immediate URL. The URL
is provided via polling the /get-auth-status endpoint.

Previously, Kiro was configured as authorization_code flow, causing
dashboard auth to fail with "No authorization URL received from CLIProxyAPI"
because the web-server routes expected synchronous URL response.

Changes:
- provider-capabilities.ts: kiro.oauthFlow = 'device_code', callbackPort = null
- provider-config.ts: Add 'kiro' to DEVICE_CODE_PROVIDERS array
- provider-capabilities.test.ts: Update test expectations

This routes Kiro through /start endpoint which properly handles device code
flow via WebSocket events (deviceCodeReceived, deviceCodeCompleted, etc).

Closes #552
2026-02-13 19:33:33 +07:00
Tam Nhu Tran bdec15f2fd chore(merge): resolve dev conflicts for pr 537
- merge latest origin/dev into feat/506-composite-provider-variant

- keep path-stable test assertions for update-checker and GLMT debug logs
2026-02-13 08:36:10 +07:00
Tam Nhu Tran 0cc1f111f7 fix(analytics): stabilize responsive row alignment 2026-02-13 06:28:46 +07:00
Tam Nhu Tran 8e6b67bf99 fix(cliproxy): fix edit dialog empty model and composite guidance
- P2: Edit dialog no longer seeds empty model string
  Changed `variant.model || ''` to `variant.model ?? undefined`
  Added payload filtering to exclude undefined/empty values before API call
  Prevents unintended model overwrites when user only changes other fields

- P3: Composite --config guidance now uses variant name
  Added profileName to ExecutorConfig interface
  Error message now shows correct variant name instead of default tier provider
  e.g., "ccs cliproxy edit my-mix" instead of "ccs cliproxy edit gemini"
2026-02-12 12:56:57 +07:00
Tam Nhu Tran b6e1d0c481 fix(ui): add trim validation for composite tier model fields
- Use z.string().trim().min(1) to reject whitespace-only models
- Apply to all 3 tiers (opus, sonnet, haiku) in both dialogs
2026-02-12 11:03:27 +07:00
Tam Nhu Tran f3618c51d7 fix(ui): use default tier provider instead of hardcoded 'gemini'
Derive provider from default_tier's provider in composite form
submission instead of using a dummy hardcoded value.
2026-02-12 08:53:08 +07:00
Tam Nhu Tran 240dfe29cf fix(ui): fix TypeScript error in composite edit dialog tier mapping
Map variant tiers to form data type, stripping thinking field and
casting provider to CLIProxyProvider enum type.
2026-02-12 08:29:15 +07:00
Tam Nhu Tran 854b198b64 fix(cliproxy): address code review feedback (attempt 1/5)
- Add composite fields to UpdateVariant type (default_tier, tiers)
- Handle forceAuth (--auth) for composite multi-provider variants
2026-02-12 08:15:27 +07:00
Tam Nhu Tran 1ebd9f43d6 feat(cliproxy): add dashboard CRUD for composite variants
- Extend create dialog with composite mode toggle and per-tier config tabs
- Add cliproxy-edit-dialog for modifying existing single and composite variants
- Add Edit action and composite type badge to variant table
- Extend API types with composite variant fields
- Update variant routes: GET (composite fields), POST (composite create), PUT (composite update)
2026-02-12 04:25:12 +07:00
Tam Nhu Tran 3e26dee013 feat(glm): update default model to GLM-5 and fix all GLM pricing
- Update default GLM model from glm-4.7 to glm-5 across configs, presets, help text, and fallbacks
- Add glm-5 pricing entry ($1.00/$3.20 per M tokens, OpenRouter verified)
- Fix incorrect glm-4.7 pricing: $0.60/$2.20 -> $0.40/$1.50 (OpenRouter verified)
- Fix incorrect glm-4.6 pricing: $0.60/$2.20 -> $0.35/$1.50 (OpenRouter verified)
- Fix incorrect glm-4.5 pricing: $0.60/$2.20 -> $0.35/$1.55 (OpenRouter verified)
- Keep all previous GLM model entries for backward compatibility

Closes #532
2026-02-12 01:43:59 +07:00
Kai (Tam Nhu) TranandGitHub 6afbb72b47 fix(cliproxy): migrate deprecated gemini-claude-* model names to upstream claude-* names (#515)
* fix(cliproxy): migrate deprecated gemini-claude-* model names to upstream claude-* names

CLIProxyAPI registry no longer recognizes the gemini-claude-* prefix convention.
Model names in catalog, base config, and user settings are migrated to upstream
claude-* names. Auto-migration in env-builder rewrites existing user settings on
load and persists the change.

Closes #513

* fix: address code review feedback — sync UI layer and add migration tests

- Sync UI isNativeGeminiModel() with backend (remove gemini-claude- exclusion)
- Update UI model catalog agy entries from gemini-claude-* to claude-*
- Update CI/CD workflow and code-reviewer default model names
- Add unit tests for migrateDeprecatedModelNames() logic
2026-02-11 17:47:37 +07:00
Tam Nhu Tran 041e1c6cc2 chore: update lockfiles 2026-02-11 06:41:33 +07:00
Kai (Tam Nhu) TranandGitHub 43cd19a52b fix(cliproxy): disable 1M extended context for opus 4.6 (256k limit) (#492)
* fix(cliproxy): disable 1M extended context for gemini-claude-opus-4-6-thinking

Antigravity backend only supports 256k context window for this model,
not 1M as previously declared. Set extendedContext: false with TODO
comment for easy re-enable when backend adds support.

Closes #490

* fix(cliproxy): strip [1m] suffix at runtime for models without extended context

Users with existing [1m] in saved agy.settings.json will now have it
automatically stripped at runtime when the model no longer supports
extended context. Prevents misleading context window claims.
2026-02-07 04:19:44 -05:00
Kai (Tam Nhu) TranGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b454834175 feat(release): v7.38.0 - Extended Context, Qwen Models, Bug Fixes (#480)
* fix(version): show active config path instead of deprecated config.json

The version command was using deprecated getConfigPath() which always
returned config.json path. Now uses getActiveConfigPath() which shows
config.yaml in unified mode or config.json in legacy mode.

* chore(release): 7.37.1-dev.1 [skip ci]

* fix(ui): use native dynamic import to fix Node 24 ESM/CJS interop

TypeScript compiles import() to require() when targeting CommonJS,
which breaks ESM packages like ora on Node 24. Use new Function()
to create native dynamic import at runtime, bypassing TS transform.

Closes #472

* chore(release): 7.37.1-dev.2 [skip ci]

* fix(env): strip ANTHROPIC_* from account/default profiles

Account and default profiles inherit process.env which may contain
stale ANTHROPIC_BASE_URL from prior CLIProxy sessions. This causes
ConnectionRefused errors when Claude tries to hit an unavailable proxy.

Settings-based profiles already handle this by explicitly injecting
their own ANTHROPIC_* values. This fix applies the same protection
to account/default profiles by stripping ANTHROPIC_* before spawn.

Closes #474

* test(env): add unit tests for stripAnthropicEnv

Address code review feedback from PR #475. Tests cover:
- Removing all ANTHROPIC_* keys
- Preserving non-ANTHROPIC keys
- Empty object handling
- Undefined value preservation
- Case sensitivity (only uppercase ANTHROPIC_)
- All ANTHROPIC_ prefixed variants stripped

* chore(release): 7.37.1-dev.3 [skip ci]

* feat(cliproxy): add extended context support for 1M token window

Add --1m and --no-1m flags to enable/disable 1M token context window.
Uses Claude Code's [1m] suffix mechanism.

Behavior:
- Gemini models: auto-enabled by default
- Claude models: opt-in with --1m flag
- New extendedContext field in model catalog

Also adds Claude Opus 4.6 to model catalog with extended context support.

Closes #103

* feat(ui): add extended context toggle in dashboard model config

- Add ExtendedContextToggle component for 1M token context window
- Add Claude Opus 4.6 (claude-opus-4-6-20260203) to model catalogs
- Mark Gemini and Claude models with extendedContext: true
- Toggle only appears when selected model supports extended context
- Auto-enabled info for native Gemini, opt-in info for Claude

Part of extended context feature implementation for issue #103.

* fix: address code review findings and CI failure

- Fix CI error: add missing 'provider' prop to ModelConfigSection
- Fix case sensitivity in applyExtendedContextSuffix
- Fix whitespace handling in stripModelSuffixes
- Handle --1m=value and --no-1m=value CLI patterns
- Add warning when --1m used on unsupported model
- Sync agy catalog: add extendedContext to gemini-3-pro-preview
- Extract isNativeGeminiModel to shared utility (DRY)
- Add 21 unit tests for extended-context-config

* fix(catalog): rename claude-opus-4-6-20260203 to claude-opus-4-6

* fix(ui): wire extended context toggle through component tree

- Add extendedContextEnabled and toggleExtendedContext to useProviderEditor hook
- Store setting as CCS_EXTENDED_CONTEXT env var in provider settings
- Pass props through provider-editor → model-config-tab → model-config-section
- Update UseProviderEditorReturn type with new properties

* fix(ui): apply [1m] suffix directly to model strings in settings

- Toggle now applies/strips [1m] suffix to all ANTHROPIC_*MODEL env vars
- Extended context detected by checking if any model has [1m] suffix
- Remove legacy CCS_EXTENDED_CONTEXT flag approach
- Add suffix utilities: applyExtendedContextSuffix, stripExtendedContextSuffix
- Raw Configuration now shows actual model values with [1m] suffix

* fix(qwen): update model catalog with correct context windows and tier mappings

- Update context window specs from official Alibaba docs:
  - Qwen3 Coder Plus: 1M context (was 32K)
  - Qwen3 Max: 256K context (flagship)
  - Qwen3 Coder Flash: fast code generation
- Fix preset mappings for Claude tier equivalence:
  - Opus → qwen3-max (flagship 256K)
  - Sonnet → qwen3-coder-plus (balanced 1M)
  - Haiku → qwen3-coder-flash (fast)
- Update provider descriptions to reflect 256K-1M context range
- Add all 7 Qwen models from CLIProxyAPI: qwen3-coder-plus, qwen3-max,
  qwen3-max-preview, qwen3-235b, qwen3-vl-plus, qwen3-coder-flash, qwen3-32b

Closes #478

* fix(ui): only apply [1m] suffix to ANTHROPIC_MODEL, fix toggle refresh

- Only ANTHROPIC_MODEL gets [1m] suffix, not tier mappings
- Strip [1m] when looking up model in catalog to prevent toggle disappearing
- Fix odd page refresh when toggling extended context

* chore(release): 7.37.1-dev.4 [skip ci]

* fix(ui): remove duplicate import in use-provider-editor

* chore: address PR review feedback - sync comment and unused import

* chore(release): 7.37.1-dev.5 [skip ci]

* feat(cliproxy): add Opus 4.6 to Antigravity model catalog (#482)

* feat(cliproxy): add Opus 4.6 to Antigravity model catalog

- Add gemini-claude-opus-4-6-thinking as new default agy model
- Update preset mappings to route opus tier to Opus 4.6
- Bump CLIProxy fallback versions to v6.8.2
- Keep Opus 4.5 as previous flagship option

* fix(cliproxy): include oauth-model-alias in config generation

Root cause: CLIProxy config.yaml was missing Opus 4.6 alias because:
1. CLIProxyPlus startup migration is disabled (intentional)
2. CCS config generator never wrote oauth-model-alias section
3. Existing users with outdated aliases got 502 on Opus 4.6

Fix:
- Add DEFAULT_ANTIGRAVITY_ALIASES to config generator
- Generate oauth-model-alias section in config.yaml template
- Preserve claude-api-key and custom aliases during regeneration
- Bump config version to v6 to trigger auto-regeneration
- Update model catalog tests for new model count

* fix(cliproxy): preserve YAML indentation in extractYamlSection

- Replace .trim() with regex to strip only leading/trailing newlines,
  preserving 2-space indent on claude-api-key children
- Skip standalone comments at col 0 in section boundary detection
- Update stale test description (4 → 5 models)

* chore(release): 7.37.1-dev.6 [skip ci]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-06 20:28:58 -05:00
kaitranntt a08d0cfece refactor(ui): address PR review feedback for device code auth
- Extract INITIAL_STATE constant to reduce code repetition (DRY)
- Remove duplicate success toast for device code flow
  (useDeviceCode already shows toast via deviceCodeCompleted WebSocket event)
- Replace 7 inline state reset objects with INITIAL_STATE reference
2026-02-05 15:37:18 -05:00
kaitranntt 13f6c3f14b fix(ui): display device code for GitHub Copilot OAuth in Dashboard
For Device Code OAuth providers (ghcp, qwen), switch from /start-url
to /start endpoint which spawns CLIProxyAPI binary and emits WebSocket
events with userCode. DeviceCodeDialog then displays the code properly.

Closes #460
2026-02-05 15:27:30 -05:00
kaitranntt 28e776d58e fix(ui): allow backend switching in remote mode
When in Remote mode, local proxy running status no longer blocks
backend switching. Introduced `isBackendSwitchBlocked` computed
variable that only evaluates true in Local mode with running proxy.

Closes #463
2026-02-04 21:36:20 -05:00
kaitranntt bfb2a06268 fix(ui): prevent settings tab truncation with grid layout
- Use CSS grid (grid-cols-6) for even tab distribution
- Shorten tab labels to fit narrow panels
- Add scrollbar-thin utility for overflow scenarios
2026-02-04 11:19:39 -05:00
Kai (Tam Nhu) TranandGitHub 1ad1372068 Merge pull request #441 from kaitranntt/kai/feat/426-block-image-read
feat(hooks): image analysis via CLIProxy with UX improvements
2026-02-04 00:01:25 -05:00
kaitranntt 57f7a70d67 fix(ui): add missing animate property to connection indicator
- Add animate: false to connected state config to fix TypeScript error
- Integrate fixImageAnalysisConfig() into auto-repair for Fix 5
2026-02-03 23:54:29 -05:00
kaitranntt 4d87a649de feat(ui): improve settings page UX and responsiveness
- Add mobile-responsive layout for settings panels

- Add empty state UI for websearch providers

- Improve connection indicator with WebSocket status
2026-02-03 22:33:31 -05:00
kaitranntt 441870d38e fix(dashboard): detect popup blocked during OAuth flow
Show toast warning with manual URL copy instructions when
browser blocks OAuth popup window.
2026-02-02 23:40:48 -05:00
Kai (Tam Nhu) TranandGitHub 24b03121fd fix(dashboard): cross-browser OAuth with manual callback fallback (#417) (#423)
- Remove destructive /start endpoint call from Dashboard OAuth dialog
  (was killing running CLIProxy Docker instances via killProcessOnPort)
- Use /start-url + polling only (management API, non-destructive)
- Auto-open browser tab via window.open() with manual fallback URL display
- Add paste-callback CLI mode (--paste-callback flag) for headless/SSH
- Use dynamic proxy target with management headers instead of hardcoded localhost
- Extract timeout constants, restore invariant comment
- Move hook-utils tests from src/__tests__/ to tests/unit/ (fixes tsc)
- Add try-catch for preset apply, remove auth URL console.log
2026-02-02 16:11:36 -05:00
kaitranntt 5a308db409 fix(quota): improve 403 error messaging for forbidden accounts
Instead of showing "Quota access forbidden" generic error, now shows:
- Antigravity: "403 Forbidden - No Gemini Code Assist access"
- Codex: "403 Forbidden - No quota API access"

Keeps success=false with isForbidden flag so UI can show distinct
"403" badge (similar to Antigravity-Manager) rather than conflating
with 0% exhausted state.

403 ≠ 0% exhausted - they are semantically different:
- 403: Account lacks API access entirely
- 0%: Account has access but quota is used up (shows reset time)
2026-02-02 11:52:23 -05:00
kaitranntt 3df2619023 test(quota): add extensive test suite for quota caching system
- Add quota-response-cache.test.ts (22 tests):
  - Cache set/get operations
  - TTL expiration handling
  - Provider and account isolation
  - Cache invalidation patterns
  - High-volume concurrent access

- Add quota-caching-integration.test.ts (15 tests):
  - GeminiCliQuotaResult caching with bucket preservation
  - CodexQuotaResult caching with window preservation
  - Cross-provider isolation verification
  - Error state caching for visibility
  - needsReauth flag handling

Total: 37 new tests for quota caching behavior
2026-01-29 23:22:53 -05:00