- make iframe auto-login/reload flow race-safe and lint-compliant
- normalize API base joins and replace conflict sentinels with typed errors
- tighten proxy port validation and defer cursor preset apply until models load
- add ui api-client unit coverage for path and conflict helpers
* fix(ui): validate BASE_URL and AUTH_TOKEN before save
- Add validation in use-provider-editor to block save when required
env vars (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN) are missing
- Show warning banner in raw editor when required fields are absent
- Always apply default preset on account add (not just first account)
This implements defense-in-depth: validation UI prevents confusion,
save-time validation prevents broken configs, auto-preset ensures
new providers start with working configuration.
Fixes#224
* fix: add validation to remaining settings routes and UI hooks
Backend:
- settings-routes.ts: Validate ANTHROPIC_BASE_URL and AUTH_TOKEN on PUT
- profile-routes.ts: Validate baseUrl/apiKey not empty on update
- variant-routes.ts: Require model field for variant creation
Frontend:
- use-profile-editor.ts: Add required field validation + error handling
- use-copilot-config-form.ts: Add required field validation + error handling
Both hooks now expose missingRequiredFields for UI warnings.
Ref #224
* feat(ux): auto-fill missing BASE_URL/AUTH_TOKEN from defaults at runtime
Instead of blocking saves when required env vars are missing, the system now:
- Runtime fills missing values from getClaudeEnvVars() defaults
- Backend returns warning in response (not 400 error)
- UI shows informational toast instead of blocking error
- Yellow warning banner still shown for user awareness
This provides better UX for CLIProxy users - saves always work, and
missing fields automatically use sensible defaults (local proxy URL
and global API key).
* fix(api): validate settings object before write to prevent undefined file content
Add validation to PUT /api/settings/:profile to return 400 if settings
object is undefined/null. Previously JSON.stringify(undefined) would
write literal "undefined" string to settings file.
* fix: add port validation and pre-save warning UI
- Add validatePort() helper (1-65535 range) to config-generator.ts
- Add missing field warning banner to copilot/config-form UI
- Add missing field warning banner to profiles/editor UI
- Wire missingRequiredFields prop through components
- add global_env config section to unified config types and loader
- inject global env vars at runtime for cliproxy and copilot profiles
- add GET/PUT /api/global-env endpoints for UI management
- add Global Env tab to Settings page with enable toggle and var management
- add GlobalEnvIndicator component showing injected vars in profile editors
- support ?tab=globalenv query param for direct navigation from indicators
Key changes:
- Changed default model from claude-sonnet-4.5 to gpt-4.1 (free tier compatible)
- Updated all Claude models to minPlan: 'pro' (requires paid Copilot subscription)
- Replaced 'localhost' with '127.0.0.1' for more reliable local connections
(bypasses DNS resolution and potential IPv6 issues)
- Updated UI presets: replaced Claude Haiku with Raptor Mini in free tier
- Fixed FREE_PRESETS to only include actually free models
This fixes the "model_not_supported" error when using free tier GitHub Copilot
subscription, which doesn't have access to Claude models.
- Add CopilotPlanTier type and extend CopilotModel with minPlan,
multiplier, preview fields
- Show plan tier badges (free/pro/pro+/business/enterprise) with
color-coded styling in model dropdown
- Display multiplier info (0x=free, 1x=standard, 3x-10x=premium)
- Add Preview badge for non-GA models
- Create 3 free tier presets: GPT-4.1, GPT-5 Mini, Claude Haiku 4.5
- Create 5 paid presets: Claude Opus/Sonnet 4.5, GPT-5.2,
GPT-5.1 Codex Max, Gemini 2.5 Pro
- Separate presets into Free Tier and Pro+ Required sections
- add CopilotInfo type and install mutation to useCopilot hook
- show version in status card when installed
- add Install button with loading state when not installed
- Split-view layout (40% left / 60% right) matching CLIProxy design
- Left panel: Model Config tab with FlexibleModelSelector components,
Settings tab, and Info tab
- Right panel: Raw JSON editor for copilot.settings.json
- Add preset buttons for quick model tier mapping
- Bidirectional sync between UI and raw JSON
- Simplify copilot.tsx page layout with narrower sidebar
- use-copilot.ts: React hook for copilot state management
- copilot-status-card.tsx: status display with auth/daemon controls
- copilot-config-form.tsx: configuration form with model selector
- copilot.tsx: main page combining status and config
- add /copilot route and sidebar navigation