Reorganize docs/user-manual/ from flat structure to language subdirectories (zh/, en/, ja/) with shared assets/. Move existing Chinese docs into zh/, fix image paths, add multilingual navigation README, and translate all 23 markdown files (~4500 lines each) to English and Japanese.
3.4 KiB
2.3 Edit Provider
Open the Edit Panel
- Find the provider card you want to edit
- Hover over the card to reveal action buttons
- Click the "Edit" button
Editable Content
Basic Information
| Field | Description |
|---|---|
| Name | Provider display name |
| Notes | Additional notes |
| Website Link | Provider website or console URL |
| Icon | Custom icon and color |
Icon Customization
CC Switch provides rich icon customization features:
Icon Picker
- Click the icon area to open the icon picker
- Use the search box to search icons by name
- Click to select the desired icon
The icon library includes common AI service provider and technology icons, supporting:
- Fuzzy search by name
- Icon name tooltips
- Real-time preview of selected icon
Configuration
JSON-formatted configuration content, including:
- API Key
- Endpoint URL
- Other environment variables
Editing the Currently Active Provider
When editing the currently active provider, a special "backfill" mechanism applies:
- When opening the edit panel, the latest content is read from the live configuration file
- If you manually modified the configuration in the CLI tool, those changes are synced back
- After saving, modifications are written to the live configuration file
This ensures CC Switch and CLI tool configurations stay in sync.
Modify API Key
When editing a provider, you can modify the key directly in the API Key input field:
- Click the "Edit" button on the provider card
- Enter the new key in the "API Key" input field
- Click "Save"
Tip
: The API Key input field supports a show/hide toggle. Click the eye icon on the right to view the full key.
Modify Endpoint URL
When editing a provider, you can modify the URL directly in the Endpoint URL input field:
- Click the "Edit" button on the provider card
- Enter the new URL in the "Endpoint URL" input field
- Click "Save"
Endpoint URL Format
| Application | Format Example |
|---|---|
| Claude | https://api.example.com |
| Codex | https://api.example.com/v1 |
| Gemini | https://api.example.com |
Add Custom Endpoints
Providers can be configured with multiple endpoints for:
- Testing multiple addresses during speed tests
- Backup endpoints for failover
Auto-collection
When adding a provider, CC Switch automatically extracts endpoint URLs from the configuration.
Manual Addition
When editing a provider, in the "Endpoint Management" area you can:
- Add new endpoints
- Delete existing endpoints
- Set a default endpoint
JSON Editor
Configuration uses JSON format, and the editor provides:
- Syntax highlighting
- Format validation
- Error messages
Common Errors
Missing quotes:
// Wrong
{ env: { KEY: "value" } }
// Correct
{ "env": { "KEY": "value" } }
Trailing comma:
// Wrong
{ "env": { "KEY": "value", } }
// Correct
{ "env": { "KEY": "value" } }
Unclosed brackets:
// Wrong
{ "env": { "KEY": "value" }
// Correct
{ "env": { "KEY": "value" } }
Save and Activate
- Click the "Save" button
- If this is the currently active provider, the configuration is immediately written to the live file
- Restart the CLI tool for changes to take effect
Cancel Editing
Click "Cancel" or press the Esc key to close the edit panel. All modifications will be discarded.
