Merge pull request #902 from TonyGeez/feature/add-model-selector-command

Added to README.md - Feature/add model selector command
This commit is contained in:
musi
2025-10-12 15:03:36 +08:00
committed by GitHub
2 changed files with 27 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
- **Multi-Provider Support**: Supports various model providers like OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow.
- **Request/Response Transformation**: Customize requests and responses for different providers using transformers.
- **Dynamic Model Switching**: Switch models on-the-fly within Claude Code using the `/model` command.
- **CLI Model Management**: Manage models and providers directly from the terminal with `ccr model`.
- **GitHub Actions Integration**: Trigger Claude Code tasks in your GitHub workflows.
- **Plugin System**: Extend functionality with custom transformers.
@@ -229,6 +230,32 @@ This will open a web-based interface where you can easily view and edit your `co
![UI](/blog/images/ui.png)
### 5. CLI Model Management
For users who prefer terminal-based workflows, you can use the interactive CLI model selector:
```shell
ccr model
```
![](blog/images/models.gif)
This command provides an interactive interface to:
- View current configuration:
- See all configured models (default, background, think, longContext, webSearch, image)
- Switch models: Quickly change which model is used for each router type
- Add new models: Add models to existing providers
- Create new providers: Set up complete provider configurations including:
- Provider name and API endpoint
- API key
- Available models
- Transformer configuration with support for:
- Multiple transformers (openrouter, deepseek, gemini, etc.)
- Transformer options (e.g., maxtoken with custom limits)
- Provider-specific routing (e.g., OpenRouter provider preferences)
The CLI tool validates all inputs and provides helpful prompts to guide you through the configuration process, making it easy to manage complex setups without editing JSON files manually.
#### Providers
The `Providers` array is where you define the different model providers you want to use. Each provider object requires:

BIN
blog/images/models.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB