mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-07-09 17:18:24 +00:00
add preset providers
This commit is contained in:
parent
027826fd13
commit
52a6371600
13 changed files with 95 additions and 1 deletions
14
README.md
14
README.md
|
|
@ -177,6 +177,20 @@ Codex support is powered by [musistudio/codexl](https://github.com/musistudio/co
|
|||
<strong>TeamoRouter</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="330">
|
||||
<a href="https://code0.ai?source=claudecoderouter">
|
||||
<img src="/docs/public/provider-icons/code0.png" width="42" height="42" alt="code0.ai icon" />
|
||||
<br />
|
||||
<strong>code0.ai</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="330">
|
||||
<a href="https://www.claudeapi.com?source=claudecoderouter">
|
||||
<img src="/docs/public/provider-icons/claudeapi.png" width="42" height="42" alt="claudeapi icon" />
|
||||
<br />
|
||||
<strong>claudeapi</strong>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
14
README_zh.md
14
README_zh.md
|
|
@ -176,6 +176,20 @@ CCR 可以完全通过桌面 UI 完成配置。首次使用建议按下面顺序
|
|||
<strong>TeamoRouter</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="330">
|
||||
<a href="https://code0.ai?source=claudecoderouter">
|
||||
<img src="/docs/public/provider-icons/code0.png" width="42" height="42" alt="code0.ai 图标" />
|
||||
<br />
|
||||
<strong>code0.ai</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="330">
|
||||
<a href="https://www.claudeapi.com?source=claudecoderouter">
|
||||
<img src="/docs/public/provider-icons/claudeapi.png" width="42" height="42" alt="claudeapi 图标" />
|
||||
<br />
|
||||
<strong>claudeapi</strong>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
BIN
docs/public/provider-icons/claudeapi.png
Normal file
BIN
docs/public/provider-icons/claudeapi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/public/provider-icons/code0.png
Normal file
BIN
docs/public/provider-icons/code0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
|
|
@ -78,6 +78,14 @@ Choose a provider below to get started. CCR shows what will be added before savi
|
|||
<span class="provider-import-icon-shell"><img src="../../../provider-icons/teamorouter.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">TeamoRouter</span><span class="provider-import-meta">Anthropic / Chat / Responses</span></span>
|
||||
</a>
|
||||
<a class="provider-import-button provider-code0" href="ccr://provider?name=code0.ai&base_url=https%3A%2F%2Fconsole.code0.ai&protocol=anthropic_messages&source=https%3A%2F%2Fcode0.ai%3Fsource%3Dclaudecoderouter" aria-label="Import code0.ai provider">
|
||||
<span class="provider-import-icon-shell"><img src="../../../provider-icons/code0.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">code0.ai</span><span class="provider-import-meta">Anthropic / Chat / Responses</span></span>
|
||||
</a>
|
||||
<a class="provider-import-button provider-claudeapi" href="ccr://provider?name=claudeapi&base_url=https%3A%2F%2Fgw.claudeapi.com&protocol=anthropic_messages&source=https%3A%2F%2Fwww.claudeapi.com%3Fsource%3Dclaudecoderouter" aria-label="Import claudeapi provider">
|
||||
<span class="provider-import-icon-shell"><img src="../../../provider-icons/claudeapi.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">claudeapi</span><span class="provider-import-meta">Anthropic Messages</span></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## Embeddable Button Component
|
||||
|
|
|
|||
|
|
@ -78,6 +78,14 @@ lead: 快速添加常见模型供应商,确认无误后即可保存,减少
|
|||
<span class="provider-import-icon-shell"><img src="../../provider-icons/teamorouter.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">TeamoRouter</span><span class="provider-import-meta">Anthropic / Chat / Responses</span></span>
|
||||
</a>
|
||||
<a class="provider-import-button provider-code0" href="ccr://provider?name=code0.ai&base_url=https%3A%2F%2Fconsole.code0.ai&protocol=anthropic_messages&source=https%3A%2F%2Fcode0.ai%3Fsource%3Dclaudecoderouter" aria-label="导入 code0.ai 供应商">
|
||||
<span class="provider-import-icon-shell"><img src="../../provider-icons/code0.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">code0.ai</span><span class="provider-import-meta">Anthropic / Chat / Responses</span></span>
|
||||
</a>
|
||||
<a class="provider-import-button provider-claudeapi" href="ccr://provider?name=claudeapi&base_url=https%3A%2F%2Fgw.claudeapi.com&protocol=anthropic_messages&source=https%3A%2F%2Fwww.claudeapi.com%3Fsource%3Dclaudecoderouter" aria-label="导入 claudeapi 供应商">
|
||||
<span class="provider-import-icon-shell"><img src="../../provider-icons/claudeapi.png" alt="" loading="lazy" /></span>
|
||||
<span class="provider-import-copy"><span class="provider-import-name">claudeapi</span><span class="provider-import-meta">Anthropic Messages</span></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## 嵌入式按钮组件
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,18 @@ h1 {
|
|||
--provider-brand-3: #f4f4f5;
|
||||
}
|
||||
|
||||
.doc-markdown a.provider-import-button.provider-code0 {
|
||||
--provider-brand: #101214;
|
||||
--provider-brand-2: #267dff;
|
||||
--provider-brand-3: #d8e8ff;
|
||||
}
|
||||
|
||||
.doc-markdown a.provider-import-button.provider-claudeapi {
|
||||
--provider-brand: #0d1b2a;
|
||||
--provider-brand-2: #2f8f83;
|
||||
--provider-brand-3: #d7fff8;
|
||||
}
|
||||
|
||||
.doc-markdown a.provider-import-button.provider-deepseek {
|
||||
--provider-brand: #173aa8;
|
||||
--provider-brand-2: #4e69ff;
|
||||
|
|
|
|||
15
packages/core/src/providers/presets/claudeapi/index.ts
Normal file
15
packages/core/src/providers/presets/claudeapi/index.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { defaultProviderAccountConfig, type ProviderPreset } from "@ccr/core/providers/presets/types";
|
||||
|
||||
export const claudeApiProviderPreset: ProviderPreset = {
|
||||
account: defaultProviderAccountConfig,
|
||||
aliases: ["claudeapi", "claudeapi.com", "www.claudeapi.com"],
|
||||
endpoints: [
|
||||
{
|
||||
baseUrl: "https://gw.claudeapi.com",
|
||||
protocols: ["anthropic_messages"]
|
||||
}
|
||||
],
|
||||
id: "claudeapi",
|
||||
name: "claudeapi",
|
||||
websiteUrl: "https://www.claudeapi.com?source=claudecoderouter"
|
||||
};
|
||||
15
packages/core/src/providers/presets/code0/index.ts
Normal file
15
packages/core/src/providers/presets/code0/index.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { defaultProviderAccountConfig, type ProviderPreset } from "@ccr/core/providers/presets/types";
|
||||
|
||||
export const code0ProviderPreset: ProviderPreset = {
|
||||
account: defaultProviderAccountConfig,
|
||||
aliases: ["code0", "code0.ai", "code 0"],
|
||||
endpoints: [
|
||||
{
|
||||
baseUrl: "https://console.code0.ai",
|
||||
protocols: ["anthropic_messages", "openai_chat_completions", "openai_responses"]
|
||||
}
|
||||
],
|
||||
id: "code0",
|
||||
name: "code0.ai",
|
||||
websiteUrl: "https://code0.ai?source=claudecoderouter"
|
||||
};
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
import { anthropicProviderPreset } from "@ccr/core/providers/presets/anthropic/index";
|
||||
import { bailianProviderPreset } from "@ccr/core/providers/presets/bailian/index";
|
||||
import { claudeApiProviderPreset } from "@ccr/core/providers/presets/claudeapi/index";
|
||||
import { code0ProviderPreset } from "@ccr/core/providers/presets/code0/index";
|
||||
import { deepSeekProviderPreset } from "@ccr/core/providers/presets/deepseek/index";
|
||||
import { geminiProviderPreset } from "@ccr/core/providers/presets/gemini/index";
|
||||
import { kimiCodingProviderPreset } from "@ccr/core/providers/presets/kimi-coding/index";
|
||||
|
|
@ -42,7 +44,9 @@ export const providerPresets: ProviderPreset[] = [
|
|||
bailianProviderPreset,
|
||||
siliconFlowProviderPreset,
|
||||
runApiProviderPreset,
|
||||
teamoRouterProviderPreset
|
||||
teamoRouterProviderPreset,
|
||||
code0ProviderPreset,
|
||||
claudeApiProviderPreset
|
||||
];
|
||||
|
||||
export function getProviderPresets(): ProviderPreset[] {
|
||||
|
|
|
|||
BIN
packages/ui/src/assets/provider-icons/claudeapi.png
Normal file
BIN
packages/ui/src/assets/provider-icons/claudeapi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
packages/ui/src/assets/provider-icons/code0.png
Normal file
BIN
packages/ui/src/assets/provider-icons/code0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
|
|
@ -43,6 +43,8 @@ import type {
|
|||
} from "@ccr/core/contracts/app";
|
||||
import anthropicProviderIconUrl from "@/assets/provider-icons/anthropic.png";
|
||||
import bailianProviderIconUrl from "@/assets/provider-icons/bailian.ico";
|
||||
import claudeapiProviderIconUrl from "@/assets/provider-icons/claudeapi.png";
|
||||
import code0ProviderIconUrl from "@/assets/provider-icons/code0.png";
|
||||
import deepseekProviderIconUrl from "@/assets/provider-icons/deepseek.ico";
|
||||
import geminiProviderIconUrl from "@/assets/provider-icons/gemini.svg";
|
||||
import mistralProviderIconUrl from "@/assets/provider-icons/mistral.webp";
|
||||
|
|
@ -319,6 +321,8 @@ export const mcpStdioMessageModeOptions: Array<{ label: string; value: GatewayMc
|
|||
export const providerPresetIconUrls: Record<string, string> = {
|
||||
anthropic: anthropicProviderIconUrl,
|
||||
bailian: bailianProviderIconUrl,
|
||||
claudeapi: claudeapiProviderIconUrl,
|
||||
code0: code0ProviderIconUrl,
|
||||
deepseek: deepseekProviderIconUrl,
|
||||
gemini: geminiProviderIconUrl,
|
||||
"kimi-coding": moonshotProviderIconUrl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue