Commit Graph
27 Commits
Author SHA1 Message Date
Tam Nhu Tran 343ec959fc fix(core): resolve edge cases and hardcoded drift 2026-02-21 10:32:19 +07:00
Tam Nhu Tran 8d2ec86155 refactor(core): centralize claude paths and command parsing 2026-02-21 01:31:16 +07:00
Tam Nhu Tran 5b12ce7f00 fix(api): sanitize preset help text rendering
- strip control characters from dynamic preset output

- render preset help from shared registry data

- include normalized alias hints without hardcoded lines
2026-02-20 23:24:11 +07:00
Tam Nhu Tran cf8070b5f0 fix(profile): handle km compatibility for legacy kimi api users 2026-02-19 12:43:41 +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
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 b2ba402d0f feat(cliproxy): auto-sync on profile create 2026-01-28 11:57:22 -05:00
kaitranntt 8e29c48c6d fix(presets): make requiresApiKey required boolean, add sentinel docs
- Change requiresApiKey from optional to required boolean in CLI
- Add requiresApiKey: true to all existing presets for consistency
- Document 'ollama' placeholder as sentinel value in code comment
- Add trailing newline to ollama.svg
2026-01-22 15:17:06 -05:00
kaitranntt 3ce698c5fe fix(ollama): align property naming and descriptions
- Change CLI noApiKey to requiresApiKey to match UI convention
- Set apiKey='ollama' instead of empty string for local Ollama
- Align ollama-cloud descriptions between CLI/UI
- Keep https://ollama.com endpoint for direct API access
2026-01-22 15:02:49 -05:00
kaitranntt 2b7d18c4c6 feat(ui): add Ollama provider presets to dashboard
- Add ollama (local) and ollama-cloud presets to UI provider-presets.ts
- Update profile-create-dialog to handle requiresApiKey: false
- Show "No API Key Required" info box for local Ollama
- Add --api-key ignored warning to CLI for local Ollama preset
- Add ollama-cloud to CLI help text preset list

Fixes edge cases identified in PR review:
- UI dashboard now has parity with CLI Ollama support
- Conditional API key validation in profile creation form
2026-01-22 14:09:59 -05:00
Huynh Duc DungandClaude dc6977d32e fix(api): skip API key prompt for local Ollama using noApiKey flag
Local Ollama doesn't require an API key, but the CLI was still
prompting for one. This adds a `noApiKey` flag to provider presets
to mark providers that don't need authentication.

- Add `noApiKey?: boolean` property to ProviderPreset interface
- Set `noApiKey: true` for local Ollama (no key needed)
- All other presets unchanged (default to requiring API key)
- Skip API key prompt and show info message when noApiKey is true

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 17:34:12 +08:00
Huynh Duc DungandClaude ef2c8bba12 fix(api): skip API key prompt for local Ollama preset
Local Ollama doesn't require an API key, but the CLI was still
prompting for one. This adds a `requiresApiKey` property to provider
presets to control whether the API key step is required.

- Add `requiresApiKey` property to ProviderPreset interface
- Set `requiresApiKey: false` for local Ollama (no key needed)
- Set `requiresApiKey: true` for OpenRouter and Ollama Cloud
- Skip API key prompt and show info message when not required

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 17:21:50 +08:00
Huynh Duc DungandClaude bd3be23355 feat: add Ollama provider support
Add support for Ollama as a provider in CCS, enabling users to use
local Ollama models (qwen3-coder, gpt-oss:20b, gpt-oss:120b) and
Ollama Cloud models (glm-4.7:cloud, qwen3-coder:480b).

Changes:
- Add base-ollama.settings.json for local Ollama (localhost:11434)
- Add base-ollama-cloud.settings.json for ollama.com cloud API
- Add 'ollama' and 'ollama-cloud' presets to provider-presets.ts
- Update help documentation in api-command.ts and help-command.ts

Usage:
  ccs api create --preset ollama          # Local Ollama
  ccs api create --preset ollama-cloud    # Ollama Cloud

Ref: https://github.com/kaitranntt/ccs/issues/353

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 16:59:23 +08:00
kaitranntt eee62a46a2 docs: update minimax preset references to 'mm'
Align README and CLI help with actual preset ID.
2026-01-14 17:43:52 -05:00
kaitranntt e7066b9997 feat(api): add Minimax, DeepSeek, Qwen provider presets
Add three new Anthropic-compatible API providers as presets:
- Minimax: M2.1/M2.1-lightning/M2 models with 1M context
- DeepSeek: V3.2 and R1 reasoning model (128K context)
- Qwen: Alibaba Cloud qwen3-coder-plus (256K context)

Closes #123
2025-12-24 18:32:07 -05:00
kaitranntt a827b73eef feat(glm): add GLM 4.7 model support
- Update default GLM/GLMT model from glm-4.6 to glm-4.7
- Add glm-4.7 pricing entry
- Sync UI presets with CLI changes

Closes #179
2025-12-22 16:13:19 -05:00
kaitrannttandMinhOmega 31bafaab8d feat(api): add Azure Foundry preset
Add Microsoft Azure AI Foundry as a provider preset for `ccs api create`.

Usage: `ccs api create --preset foundry`

This is a cleaner implementation than the postinstall-based approach,
leveraging the existing preset system.

Co-authored-by: MinhOmega <49482201+MinhOmega@users.noreply.github.com>
2025-12-22 15:34:27 -05:00
kaitranntt 4f4ab43eb3 refactor(config): remove secrets.yaml architecture
- delete secrets-manager.ts entirely

- remove secrets API routes and client methods

- simplify unified-config-types (remove vault/secrets)

- update profile-reader to remove secrets loading

- clean up unused hooks and API client methods
2025-12-20 23:10:35 -05:00
kaitranntt 418d121577 feat(cli): add --preset option to ccs api create command
- add provider-presets.ts with OpenRouter/GLM/GLMT/Kimi configs
- add --preset flag for quick profile creation
- auto-fill name, base URL, model from preset
- show preset info and API key hints
- update help with preset documentation and examples
2025-12-20 19:49:50 -05:00
kaitranntt d193626e3b feat(cli): add interactive OpenRouter model picker for api create
- add openrouter-catalog.ts with fetcher and 24h file cache

- add openrouter-picker.ts with interactive search UI

- detect OpenRouter URL in api-command.ts handleCreate()

- offer interactive browse when no --model flag provided

- support tier mapping configuration (opus/sonnet/haiku)
2025-12-20 18:31:40 -05:00
kaitranntt ecb6bb448a refactor(api): extract service layer from api-command
- create api/services/ with 5 modules (800 → 426 lines)

- validation-service, profile-types, profile-reader, profile-writer

- separate CLI parsing from business logic

Phase 5: Command Refactor (api-command.ts)
2025-12-19 11:48:33 -05:00
kaitranntt 83570050ef feat(api-profile-ux): Implement API & UI for profile management 2025-12-10 21:36:11 -05:00
kaitranntt f83051be40 feat(api): improve create UX with URL validation and model mapping
- Add URL warning for common mistakes (e.g., /chat/completions endpoint)
- Add optional model mapping prompt for Opus/Sonnet/Haiku backends
- Show edit hint after profile creation for modifying settings
- Support custom model configurations in unified config mode

Closes #72
2025-12-10 20:56:32 -05:00
kaitranntt 1dbd7229a5 refactor(config): use settings file references instead of inline env
Changes config.yaml to store references to *.settings.json files
instead of inlining env vars. This matches Claude's ~/.claude/settings.json
pattern and gives users familiar editing experience.

Changes:
- ProfileConfig now stores 'settings' path instead of 'env' object
- CLIProxyVariantConfig uses 'settings' instead of 'model'/'env'
- Migration preserves existing *.settings.json files, only stores references
- Updated config.yaml comments to explain settings file pattern
- Create/remove commands now manage settings files alongside config.yaml

Benefits:
- Users edit familiar *.settings.json format
- config.yaml stays clean (just references)
- No confusion about where to make changes
2025-12-10 17:53:00 -05:00
kaitranntt b621b8e47b feat(config): add unified YAML config with migration support
Implements unified config.yaml format consolidating:
- config.json (API profiles)
- profiles.json (account metadata)
- *.settings.json (env vars)

Features:
- Auto-migration from v1 JSON to v2 YAML with backup
- Secrets separation into secrets.yaml (chmod 600)
- Enhanced YAML output with section comments
- CLIProxy OAuth settings migration with env var support
- Feature flag for gradual rollout (CCS_UNIFIED_CONFIG=1)
- Rollback support via ccs migrate --rollback

New commands:
- ccs migrate - Run migration
- ccs migrate --dry-run - Preview changes
- ccs migrate --rollback <path> - Restore from backup
- ccs migrate --list-backups - List available backups

Closes #75
2025-12-10 17:42:40 -05:00
kaitranntt 6427ecf5af feat(cliproxy): add crud commands for variant profiles
- Add `ccs cliproxy create/list/remove` commands for variant management
- Interactive wizard with provider/model selection from catalog
- Settings file auto-generated with all 6 ANTHROPIC_* env fields
- Fix `ccs api create` to include all 4 model fields (was missing 3)
- Fix `--config` flag to save to correct variant settings file
- Remove paid tier badge from AGY models (all free via Antigravity)
- Add settings file format example to README for CLIProxy variants
- Add 22 unit tests for cliproxy command validation and config handling
2025-12-05 21:44:41 -05:00
kaitranntt 073a5e15ee feat(ui): enhance section headers with gradient and rename profile to api
- Add sectionHeader() with gradient + bold styling
- Rename profile-command.ts to api-command.ts
- Update help command layout
- Change command color from italic to bold
2025-12-02 15:12:53 -05:00