2025-08-08 12:12:28 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 预设供应商配置模板
|
|
|
|
|
|
*/
|
2025-09-11 22:33:55 +08:00
|
|
|
|
import { ProviderCategory } from "../types";
|
|
|
|
|
|
|
2025-10-02 22:14:35 +08:00
|
|
|
|
export interface TemplateValueConfig {
|
|
|
|
|
|
label: string;
|
|
|
|
|
|
placeholder: string;
|
|
|
|
|
|
defaultValue?: string;
|
|
|
|
|
|
editorValue: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-19 23:11:48 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 预设供应商的视觉主题配置
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface PresetTheme {
|
|
|
|
|
|
/** 图标类型:'claude' | 'codex' | 'generic' */
|
|
|
|
|
|
icon?: "claude" | "codex" | "generic";
|
|
|
|
|
|
/** 背景色(选中状态),支持 Tailwind 类名或 hex 颜色 */
|
|
|
|
|
|
backgroundColor?: string;
|
|
|
|
|
|
/** 文字色(选中状态),支持 Tailwind 类名或 hex 颜色 */
|
|
|
|
|
|
textColor?: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-08 12:12:28 +08:00
|
|
|
|
export interface ProviderPreset {
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
websiteUrl: string;
|
2025-09-21 23:09:53 +08:00
|
|
|
|
// 新增:第三方/聚合等可单独配置获取 API Key 的链接
|
|
|
|
|
|
apiKeyUrl?: string;
|
2025-08-08 12:12:28 +08:00
|
|
|
|
settingsConfig: object;
|
2025-08-29 09:03:11 +08:00
|
|
|
|
isOfficial?: boolean; // 标识是否为官方预设
|
2025-11-06 15:22:38 +08:00
|
|
|
|
isPartner?: boolean; // 标识是否为商业合作伙伴
|
|
|
|
|
|
partnerPromotionKey?: string; // 合作伙伴促销信息的 i18n key
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category?: ProviderCategory; // 新增:分类
|
2025-11-02 23:10:21 +08:00
|
|
|
|
// 新增:指定该预设所使用的 API Key 字段名(默认 ANTHROPIC_AUTH_TOKEN)
|
|
|
|
|
|
apiKeyField?: "ANTHROPIC_AUTH_TOKEN" | "ANTHROPIC_API_KEY";
|
2025-10-02 22:14:35 +08:00
|
|
|
|
// 新增:模板变量定义,用于动态替换配置中的值
|
|
|
|
|
|
templateValues?: Record<string, TemplateValueConfig>; // editorValue 存储编辑器中的实时输入值
|
feat: Implement Speed Test Function
* feat: add unified endpoint speed test for API providers
Add a comprehensive endpoint latency testing system that allows users to:
- Test multiple API endpoints concurrently
- Auto-select the fastest endpoint based on latency
- Add/remove custom endpoints dynamically
- View latency results with color-coded indicators
Backend (Rust):
- Implement parallel HTTP HEAD requests with configurable timeout
- Handle various error scenarios (timeout, connection failure, invalid URL)
- Return structured latency data with status codes
Frontend (React):
- Create interactive speed test UI component with auto-sort by latency
- Support endpoint management (add/remove custom endpoints)
- Extract and update Codex base_url from TOML configuration
- Integrate with provider presets for default endpoint candidates
This feature improves user experience when selecting optimal API endpoints,
especially useful for users with multiple provider options or proxy setups.
* refactor: convert endpoint speed test to modal dialog
- Transform EndpointSpeedTest component into a modal dialog
- Add "Advanced" button next to base URL input to open modal
- Support ESC key and backdrop click to close modal
- Apply Linear design principles: minimal styling, clean layout
- Remove unused showBaseUrlInput variable
- Implement same modal pattern for both Claude and Codex
* fix: prevent modal cascade closing when ESC is pressed
- Add state checks to prevent parent modal from closing when child modals (endpoint speed test or template wizard) are open
- Update ESC key handler dependencies to track all modal states
- Ensures only the topmost modal responds to ESC key
* refactor: unify speed test panel UI with project design system
UI improvements:
- Update modal border radius from rounded-lg to rounded-xl
- Unify header padding from px-6 py-4 to p-6
- Change speed test button color to blue theme (bg-blue-500) for consistency
- Update footer background from bg-gray-50 to bg-gray-100
- Style "Done" button as primary action button with blue theme
- Adjust footer button spacing and hover states
Simplify endpoint display:
- Remove endpoint labels (e.g., "Current Address", "Custom 1")
- Display only URL for cleaner interface
- Clean up all label-related logic:
* Remove label field from EndpointCandidate interface
* Remove label generation in buildInitialEntries function
* Remove label handling in useEffect merge logic
* Remove label generation in handleAddEndpoint
* Remove label parameters from claudeSpeedTestEndpoints
* Remove label parameters from codexSpeedTestEndpoints
* refactor: improve endpoint list UI consistency
- Show delete button for all endpoints on hover for uniform UI
- Change selected state to use blue theme matching main interface:
* Blue border (border-blue-500) for selected items
* Light blue background (bg-blue-50/dark:bg-blue-900/20)
* Blue indicator dot (bg-blue-500/dark:bg-blue-400)
- Switch from compact list (space-y-px) to card-based layout (space-y-2)
- Add rounded corners to each endpoint item for better visual separation
* feat: persist custom endpoints to settings.json
- Extend AppSettings to store custom endpoints for Claude and Codex
- Add Tauri commands: get/add/remove/update custom endpoints
- Update frontend API with endpoint persistence methods
- Modify EndpointSpeedTest to load/save custom endpoints via API
- Track endpoint last used time for future sorting/cleanup
- Store endpoints per app type in settings.json instead of localStorage
* - feat(types): add Provider.meta and ProviderMeta (snake_case) with custom_endpoints map
- feat(provider-form): persist custom endpoints on provider create by merging EndpointSpeedTest’s custom URLs into meta.custom_endpoints on submit
- feat(endpoint-speed-test): add onCustomEndpointsChange callback emitting normalized custom URLs; wire it for both Claude/Codex modals
- fix(api): send alias param names (app/appType/app_type and provider_id/providerId) in Tauri invokes to avoid “missing providerId” with older backends
- storage: custom endpoints are stored in ~/.cc-switch/config.json under providers[<id>].meta.custom_endpoints (not in settings.json)
- behavior: edit flow remains immediate writes; create flow now writes once via addProvider, removing the providerId dependency during creation
* feat: add endpoint candidates support and code formatting improvements
- Add endpointCandidates field to ProviderPreset and CodexProviderPreset interfaces
- Integrate preset endpoint candidates into speed test endpoint selection
- Add multiple endpoint options for PackyCode providers (Claude & Codex)
- Apply consistent code formatting (trailing commas, line breaks)
- Improve template value type safety and readability
* refactor: improve endpoint management button UX
Replace ambiguous "Advanced" text with intuitive "Manage & Test" label accompanied by Zap icon, making the endpoint management panel entry point more discoverable and self-explanatory for both Claude and Codex configurations.
* - merge: merge origin/main, resolve conflicts and preserve both feature sets
- feat(tauri): register import/export and file dialogs; keep endpoint speed test and custom endpoints
- feat(api): add updateTrayMenu and onProviderSwitched; wire import/export APIs
- feat(types): extend global API declarations (import/export)
- chore(presets): GLM preset supports both new and legacy model keys
- chore(rust): add chrono dependency; refresh lockfile
---------
Co-authored-by: Jason <farion1231@gmail.com>
2025-10-07 19:14:32 +08:00
|
|
|
|
// 新增:请求地址候选列表(用于地址管理/测速)
|
|
|
|
|
|
endpointCandidates?: string[];
|
2025-10-19 23:11:48 +08:00
|
|
|
|
// 新增:视觉主题配置
|
|
|
|
|
|
theme?: PresetTheme;
|
2025-08-08 12:12:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const providerPresets: ProviderPreset[] = [
|
2025-08-29 09:03:11 +08:00
|
|
|
|
{
|
2025-10-08 11:02:09 +08:00
|
|
|
|
name: "Claude Official",
|
2025-08-29 09:03:11 +08:00
|
|
|
|
websiteUrl: "https://www.anthropic.com/claude-code",
|
|
|
|
|
|
settingsConfig: {
|
2025-08-29 11:35:17 +08:00
|
|
|
|
env: {},
|
2025-08-29 09:03:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
isOfficial: true, // 明确标识为官方预设
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "official",
|
2025-10-19 23:11:48 +08:00
|
|
|
|
theme: {
|
|
|
|
|
|
icon: "claude",
|
|
|
|
|
|
backgroundColor: "#D97757",
|
|
|
|
|
|
textColor: "#FFFFFF",
|
|
|
|
|
|
},
|
2025-08-29 09:03:11 +08:00
|
|
|
|
},
|
2025-08-08 12:12:28 +08:00
|
|
|
|
{
|
2025-09-12 20:14:59 +08:00
|
|
|
|
name: "DeepSeek",
|
2025-08-26 11:28:10 +08:00
|
|
|
|
websiteUrl: "https://platform.deepseek.com",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-08-21 23:23:08 +08:00
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.deepseek.com/anthropic",
|
2025-09-06 23:13:01 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
2025-09-30 22:19:20 +08:00
|
|
|
|
ANTHROPIC_MODEL: "DeepSeek-V3.2-Exp",
|
2025-11-02 18:02:22 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "DeepSeek-V3.2-Exp",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "DeepSeek-V3.2-Exp",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "DeepSeek-V3.2-Exp",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "cn_official",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-08 11:02:09 +08:00
|
|
|
|
name: "Zhipu GLM",
|
2025-08-21 23:23:08 +08:00
|
|
|
|
websiteUrl: "https://open.bigmodel.cn",
|
2025-11-06 15:22:38 +08:00
|
|
|
|
apiKeyUrl: "https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-08-21 23:23:08 +08:00
|
|
|
|
ANTHROPIC_BASE_URL: "https://open.bigmodel.cn/api/anthropic",
|
2025-09-06 23:13:01 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
2025-11-02 23:24:49 +08:00
|
|
|
|
ANTHROPIC_MODEL: "glm-4.6",
|
2025-10-05 20:41:39 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-4.5-air",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-4.6",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-4.6",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "cn_official",
|
2025-11-06 16:04:10 +08:00
|
|
|
|
isPartner: true, // 合作伙伴
|
|
|
|
|
|
partnerPromotionKey: "zhipu", // 促销信息 i18n key
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "Z.ai GLM",
|
|
|
|
|
|
websiteUrl: "https://z.ai",
|
|
|
|
|
|
apiKeyUrl: "https://z.ai/subscribe?ic=8JVLJQFSKB",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.z.ai/api/anthropic",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
ANTHROPIC_MODEL: "glm-4.6",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-4.5-air",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-4.6",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-4.6",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
isPartner: true, // 合作伙伴
|
2025-11-06 15:22:38 +08:00
|
|
|
|
partnerPromotionKey: "zhipu", // 促销信息 i18n key
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
2025-08-21 20:05:42 +08:00
|
|
|
|
{
|
2025-10-08 11:02:09 +08:00
|
|
|
|
name: "Qwen Coder",
|
2025-08-21 23:23:08 +08:00
|
|
|
|
websiteUrl: "https://bailian.console.aliyun.com",
|
2025-08-21 20:05:42 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-09-13 15:36:43 +08:00
|
|
|
|
ANTHROPIC_BASE_URL:
|
|
|
|
|
|
"https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy",
|
2025-09-06 23:13:01 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
2025-09-24 22:28:32 +08:00
|
|
|
|
ANTHROPIC_MODEL: "qwen3-max",
|
2025-11-02 18:02:22 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "qwen3-max",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "qwen3-max",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "qwen3-max",
|
2025-08-21 20:05:42 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "cn_official",
|
2025-08-21 20:05:42 +08:00
|
|
|
|
},
|
2025-08-08 12:12:28 +08:00
|
|
|
|
{
|
2025-08-26 11:28:10 +08:00
|
|
|
|
name: "Kimi k2",
|
|
|
|
|
|
websiteUrl: "https://platform.moonshot.cn/console",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-08-26 11:28:10 +08:00
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.moonshot.cn/anthropic",
|
2025-09-06 23:13:01 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
Release v3.6.0: Major architecture refactoring and feature enhancements
New Features:
- Provider duplication and manual sorting via drag-and-drop
- Custom endpoint management for aggregator providers
- Usage query with auto-refresh interval and test script API
- Config editor improvements (JSON format button, real-time TOML validation)
- Auto-sync on directory change for WSL environment support
- Load live config when editing active provider to protect manual modifications
- New provider presets: DMXAPI, Azure Codex, AnyRouter, AiHubMix, MiniMax
- Partner promotion mechanism (Zhipu GLM Z.ai)
Architecture Improvements:
- Backend: 5-phase refactoring (error handling → command split → services → concurrency)
- Frontend: 4-stage refactoring (tests → hooks → components → cleanup)
- Testing: 100% hooks unit test coverage, integration tests for critical flows
Documentation:
- Complete README rewrite with detailed architecture overview
- Separate Chinese (README_ZH.md) and English (README.md) versions
- Comprehensive v3.6.0 changelog with categorized changes
- New bilingual screenshots and partner banners
Bug Fixes:
- Fixed configuration sync issues (apiKeyUrl priority, MCP sync, import sync)
- Fixed usage query interval timing and refresh button animation
- Fixed UI issues (edit mode alignment, language switch state)
- Fixed endpoint speed test and provider duplicate insertion position
- Force exit on config error to prevent silent fallback
Technical Details:
- Updated to Tauri 2.8.x, TailwindCSS 4.x, TanStack Query v5.90.x
- Removed legacy v1 migration logic for better startup performance
- Standardized command parameters (unified to camelCase `app`)
- Result pattern for graceful error handling
2025-11-07 16:27:51 +08:00
|
|
|
|
ANTHROPIC_MODEL: "kimi-k2-thinking",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "kimi-k2-thinking",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "kimi-k2-thinking",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "kimi-k2-thinking",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "cn_official",
|
2025-08-08 12:12:28 +08:00
|
|
|
|
},
|
2025-11-11 23:50:52 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "Kimi For Coding",
|
|
|
|
|
|
websiteUrl: "https://www.kimi.com/coding/docs/",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.kimi.com/coding/",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
ANTHROPIC_MODEL: "kimi-for-coding",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "kimi-for-coding",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "kimi-for-coding",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "kimi-for-coding",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
},
|
2025-09-06 11:01:09 +08:00
|
|
|
|
{
|
2025-10-08 11:02:09 +08:00
|
|
|
|
name: "ModelScope",
|
2025-09-06 11:01:09 +08:00
|
|
|
|
websiteUrl: "https://modelscope.cn",
|
|
|
|
|
|
settingsConfig: {
|
2025-09-06 23:13:01 +08:00
|
|
|
|
env: {
|
2025-09-06 11:01:09 +08:00
|
|
|
|
ANTHROPIC_BASE_URL: "https://api-inference.modelscope.cn",
|
2025-09-12 12:04:19 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
2025-09-30 22:19:20 +08:00
|
|
|
|
ANTHROPIC_MODEL: "ZhipuAI/GLM-4.6",
|
2025-11-02 18:02:22 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "ZhipuAI/GLM-4.6",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "ZhipuAI/GLM-4.6",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "ZhipuAI/GLM-4.6",
|
2025-09-06 23:13:01 +08:00
|
|
|
|
},
|
2025-09-06 11:01:09 +08:00
|
|
|
|
},
|
2025-09-11 22:33:55 +08:00
|
|
|
|
category: "aggregator",
|
2025-09-06 11:01:09 +08:00
|
|
|
|
},
|
2025-08-08 12:12:28 +08:00
|
|
|
|
{
|
2025-10-08 11:02:09 +08:00
|
|
|
|
name: "KAT-Coder",
|
2025-11-02 21:51:14 +08:00
|
|
|
|
websiteUrl: "https://console.streamlake.ai",
|
|
|
|
|
|
apiKeyUrl: "https://console.streamlake.ai/console/api-key",
|
2025-10-02 22:14:35 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-10-08 21:22:56 +08:00
|
|
|
|
ANTHROPIC_BASE_URL:
|
|
|
|
|
|
"https://vanchin.streamlake.ai/api/gateway/v1/endpoints/${ENDPOINT_ID}/claude-code-proxy",
|
2025-10-02 22:14:35 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
2025-11-02 21:51:14 +08:00
|
|
|
|
ANTHROPIC_MODEL: "KAT-Coder-Pro V1",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "KAT-Coder-Air V1",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "KAT-Coder-Pro V1",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "KAT-Coder-Pro V1",
|
2025-10-02 22:14:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
templateValues: {
|
|
|
|
|
|
ENDPOINT_ID: {
|
|
|
|
|
|
label: "Vanchin Endpoint ID",
|
|
|
|
|
|
placeholder: "ep-xxx-xxx",
|
|
|
|
|
|
defaultValue: "",
|
|
|
|
|
|
editorValue: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2025-10-12 21:31:38 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "Longcat",
|
|
|
|
|
|
websiteUrl: "https://longcat.chat/platform",
|
|
|
|
|
|
apiKeyUrl: "https://longcat.chat/platform/api_keys",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.longcat.chat/anthropic",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
ANTHROPIC_MODEL: "LongCat-Flash-Chat",
|
2025-11-02 18:02:22 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "LongCat-Flash-Chat",
|
2025-10-12 21:31:38 +08:00
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "LongCat-Flash-Chat",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "LongCat-Flash-Chat",
|
|
|
|
|
|
CLAUDE_CODE_MAX_OUTPUT_TOKENS: "6000",
|
2025-10-12 22:27:02 +08:00
|
|
|
|
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: 1,
|
2025-10-12 21:31:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
},
|
2025-11-02 21:51:14 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "MiniMax",
|
|
|
|
|
|
websiteUrl: "https://platform.minimaxi.com",
|
|
|
|
|
|
apiKeyUrl: "https://platform.minimaxi.com/user-center/basic-information",
|
|
|
|
|
|
settingsConfig: {
|
2025-11-03 10:24:59 +08:00
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.minimaxi.com/anthropic",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
API_TIMEOUT_MS: "3000000",
|
|
|
|
|
|
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: 1,
|
|
|
|
|
|
ANTHROPIC_MODEL: "MiniMax-M2",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "MiniMax-M2",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "MiniMax-M2",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "MiniMax-M2",
|
2025-11-02 21:51:14 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
},
|
2025-11-11 23:50:52 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "BaiLing",
|
|
|
|
|
|
websiteUrl: "https://alipaytbox.yuque.com/sxs0ba/ling/get_started",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://api.tbox.cn/api/anthropic",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
ANTHROPIC_MODEL: "Ling-1T",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "Ling-1T",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "Ling-1T",
|
|
|
|
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "Ling-1T",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
category: "cn_official",
|
|
|
|
|
|
},
|
2025-11-05 14:48:07 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "AiHubMix",
|
|
|
|
|
|
websiteUrl: "https://aihubmix.com",
|
|
|
|
|
|
apiKeyUrl: "https://aihubmix.com",
|
|
|
|
|
|
// 说明:该供应商使用 ANTHROPIC_API_KEY(而非 ANTHROPIC_AUTH_TOKEN)
|
|
|
|
|
|
apiKeyField: "ANTHROPIC_API_KEY",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://aihubmix.com",
|
|
|
|
|
|
ANTHROPIC_API_KEY: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
// 请求地址候选(用于地址管理/测速),用户可自行选择/覆盖
|
|
|
|
|
|
endpointCandidates: ["https://aihubmix.com", "https://api.aihubmix.com"],
|
|
|
|
|
|
category: "aggregator",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "DMXAPI",
|
|
|
|
|
|
websiteUrl: "https://www.dmxapi.cn",
|
|
|
|
|
|
apiKeyUrl: "https://www.dmxapi.cn",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://www.dmxapi.cn",
|
|
|
|
|
|
ANTHROPIC_API_KEY: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
// 请求地址候选(用于地址管理/测速),用户可自行选择/覆盖
|
|
|
|
|
|
endpointCandidates: ["https://aihubmix.com", "https://api.aihubmix.com"],
|
|
|
|
|
|
category: "aggregator",
|
|
|
|
|
|
},
|
2025-10-08 11:02:09 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: "PackyCode",
|
2025-10-30 09:04:11 +08:00
|
|
|
|
websiteUrl: "https://www.packyapi.com",
|
2025-11-10 18:44:19 +08:00
|
|
|
|
apiKeyUrl: "https://www.packyapi.com/register?aff=cc-switch",
|
2025-10-08 11:02:09 +08:00
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
2025-10-30 09:04:11 +08:00
|
|
|
|
ANTHROPIC_BASE_URL: "https://www.packyapi.com",
|
2025-10-08 11:02:09 +08:00
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
// 请求地址候选(用于地址管理/测速)
|
|
|
|
|
|
endpointCandidates: [
|
2025-10-30 09:04:11 +08:00
|
|
|
|
"https://www.packyapi.com",
|
|
|
|
|
|
"https://api-slb.packyapi.com",
|
2025-10-23 16:53:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
category: "third_party",
|
2025-11-10 18:44:19 +08:00
|
|
|
|
isPartner: true, // 合作伙伴
|
|
|
|
|
|
partnerPromotionKey: "packycode", // 促销信息 i18n key
|
2025-10-23 16:53:42 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "AnyRouter",
|
|
|
|
|
|
websiteUrl: "https://anyrouter.top",
|
|
|
|
|
|
apiKeyUrl: "https://anyrouter.top/register?aff=PCel",
|
|
|
|
|
|
settingsConfig: {
|
|
|
|
|
|
env: {
|
|
|
|
|
|
ANTHROPIC_BASE_URL: "https://anyrouter.top",
|
|
|
|
|
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
// 请求地址候选(用于地址管理/测速)
|
|
|
|
|
|
endpointCandidates: [
|
|
|
|
|
|
"https://q.quuvv.cn",
|
|
|
|
|
|
"https://pmpjfbhq.cn-nb1.rainapp.top",
|
|
|
|
|
|
"https://anyrouter.top",
|
2025-10-08 11:02:09 +08:00
|
|
|
|
],
|
|
|
|
|
|
category: "third_party",
|
|
|
|
|
|
},
|
2025-08-08 12:12:28 +08:00
|
|
|
|
];
|