Commit Graph
23 Commits
Author SHA1 Message Date
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
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 ae1847d901 fix(validation): add Windows reserved name validation and version format edge cases
- Fixed version regex to accept -N suffix (e.g., 6.6.80-0)
- Added .trim() to version input for whitespace handling
- Added Windows reserved device names (CON, PRN, AUX, NUL, COM1-9, LPT1-9) validation
- Updated binary-service, variant-service, and validation-service with checks
2026-01-05 00:00:58 -05:00
kaitranntt a59ad0e8c6 fix(minimax): prevent double-resolve race condition and align placeholder
- Add resolved flag + safeResolve() wrapper to prevent timeout/response race
- Align apiKeyPlaceholder to YOUR_MINIMAX_API_KEY_HERE across presets
2026-01-02 20:06:17 -05:00
Huynh Duc Dung 2b549f5b3d refactor(minimax): Rename to 'mm' for brevity
- Rename profile ID: minimax -> mm
- Rename settings file: base-minimax.settings.json -> base-mm.settings.json
- Update all code references
- Remove review_pr.md documentation
- Shorter CLI command: ccs mm instead of ccs minimax

Rationale:
- 'mm' is more concise (2 chars vs 7 chars)
- Matches 'glm', 'kimi' short naming pattern
- Improves UX for frequent switching
2026-01-02 20:38:52 +08:00
kaitranntt 0c69740694 fix(dashboard): support unified config.yaml in web server routes
Add loadConfigSafe() function that handles both unified (config.yaml) and
legacy (config.json) config formats. Uses throwable errors instead of
process.exit() so try/catch blocks work properly in web server routes.

Updated files to use loadConfigSafe():
- overview-routes.ts: Dashboard overview API
- route-helpers.ts: readConfigSafe() helper
- profile-reader.ts: API profile reading
- profile-writer.ts: API profile writing
- variant-config-adapter.ts: CLIProxy variant config

Fixes #206 (Problem 2: config.json not found when user has config.yaml)
2025-12-26 13:37:54 -05:00
Kai (Tam Nhu) TranandGitHub 080ad11804 Merge pull request #197 from kaitranntt/fix/glm-auth-persistence
fix(profiles): prevent GLM auth regression from first-time install detection
2025-12-24 18:48:40 -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 adb6222bc6 refactor(paths): use expandPath() consistently for cross-platform path handling
- variant-settings.ts: Use expandPath() in deleteSettingsFile()
- profile-writer.ts: Use expandPath() in removeApiProfileUnified()
- migration-manager.ts: Remove local expandPath(), import from helpers

All path expansion now uses the central expandPath() from utils/helpers.ts
which handles ~, ~\, ${VAR}, $VAR, and %VAR% on all platforms.
2025-12-24 18:19:47 -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 86d992fce6 fix(ui): fix profile switching and improve UX
- Add key prop to ProfileEditor to force remount on profile change

- Reset editorHasChanges on discard confirmation

- Add text-white to destructive dialog button

- Change OpenRouter default model to claude-opus-4.5
2025-12-21 01:20:57 -05:00
kaitranntt 70bc44eb11 fix(openrouter): add ANTHROPIC_API_KEY="" default for OpenRouter profiles
Per OpenRouter requirements, explicitly blank out the Anthropic API key
to prevent conflicts when using OpenRouter's API. The key is visible in
the "Additional Variables" section of the profile editor.
2025-12-20 23:43:52 -05:00
kaitranntt 7d4961e7a9 fix(openrouter): correct ANTHROPIC_BASE_URL to https://openrouter.ai/api
Update OPENROUTER_BASE_URL in provider presets (CLI and UI) which is
used as ANTHROPIC_BASE_URL when creating OpenRouter profiles.
2025-12-20 23:31:11 -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 4c74e92cc4 feat(api): unify profile management with config-aware services
- profile-reader: fix isApiProfileConfigured to check settings.json fallback
- profile-reader: exclude 'default' profile (native Claude) from listings
- profile-routes: use createApiProfile/removeApiProfile services
- provider-presets: add category field (recommended/alternative)
- recovery-manager: remove auto-creation of GLM/GLMT/Kimi profiles
2025-12-20 21:07:27 -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 6372b3d303 refactor: add barrel exports to api/, glmt/, management/
- src/api/index.ts: re-export services module

- src/glmt/index.ts: export all GLMT transformers and pipeline

- src/management/index.ts: export doctor, managers, diagnostics, checks, repair
2025-12-19 16:01:22 -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