Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .arts/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"clawMode.mode": "editor"
}
3 changes: 3 additions & 0 deletions src/components/settings/provider-presets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Bailian from "@lobehub/icons/es/Bailian";
import XiaomiMiMo from "@lobehub/icons/es/XiaomiMiMo";
import Ollama from "@lobehub/icons/es/Ollama";
import OpenAI from "@lobehub/icons/es/OpenAI";
import Stepfun from "@lobehub/icons/es/Stepfun";

// ---------------------------------------------------------------------------
// Brand icon resolver
Expand All @@ -45,6 +46,7 @@ const ICON_BY_KEY: Record<ProviderIconKey, ReactNode> = {
ollama: <Ollama size={18} />,
openai: <OpenAI size={18} />,
deepseek: <DeepSeek size={18} />,
stepfun: <Stepfun size={18} />,
bedrock: <Bedrock size={18} />,
google: <Google size={18} />,
aws: <Aws size={18} />,
Expand Down Expand Up @@ -102,6 +104,7 @@ function resolveIcon(iconKey: string): ReactNode {
ollama: <Ollama size={18} />,
openai: <OpenAI size={18} />,
deepseek: <DeepSeek size={18} />,
stepfun: <Stepfun size={18} />,
cline: <Cline size={18} />,
opencode: <OpenCode size={18} />,
server: <HardDrives size={18} className="text-muted-foreground" />,
Expand Down
86 changes: 86 additions & 0 deletions src/lib/provider-catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,84 @@ export const VENDOR_PRESETS: VendorPreset[] = [
},
},

// ── StepFun (阶跃星辰) ──
{
key: 'stepfun',
name: 'StepFun',
description: 'StepFun Step Plan — Anthropic-compatible reasoning API',
descriptionZh: '阶跃星辰 Step Plan — Anthropic 兼容推理 API',
protocol: 'anthropic',
authStyle: 'api_key',
baseUrl: 'https://api.stepfun.com/step_plan',
defaultEnvOverrides: {
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
},
defaultModels: [
{
modelId: 'step-3.7-flash',
upstreamModelId: 'step-3.7-flash',
displayName: 'Step 3.7 Flash',
role: 'default',
capabilities: {
reasoning: true,
toolUse: true,
vision: true,
supportsEffort: true,
supportedEffortLevels: ['low', 'medium', 'high'],
},
},
{
modelId: 'step-3.5-flash-2603',
upstreamModelId: 'step-3.5-flash-2603',
displayName: 'Step 3.5 Flash 2603',
role: 'sonnet',
capabilities: {
reasoning: true,
toolUse: true,
supportsEffort: true,
supportedEffortLevels: ['low', 'medium', 'high'],
},
},
{
modelId: 'step-3.5-flash',
upstreamModelId: 'step-3.5-flash',
displayName: 'Step 3.5 Flash',
role: 'haiku',
capabilities: {
reasoning: true,
toolUse: true,
},
},
{
modelId: 'step-router-v1',
upstreamModelId: 'step-router-v1',
displayName: 'Step Router V1',
capabilities: {
reasoning: true,
toolUse: true,
},
},
],
defaultRoleModels: {
default: 'step-3.7-flash',
opus: 'step-3.7-flash',
sonnet: 'step-3.5-flash-2603',
haiku: 'step-3.5-flash',
},
fields: ['api_key'],
iconKey: 'stepfun',
sdkProxyOnly: true,
meta: {
apiKeyUrl: 'https://platform.stepfun.com/interface-key',
docsUrl: 'https://platform.stepfun.com/docs/zh/step-plan/integrations/reasoning-api',
billingModel: 'token_plan',
notes: [
'需订阅 Step Plan 套餐并获取 API Key',
'Anthropic SDK 会自动拼接 /v1/messages,base_url 不带 /v1',
],
},
},

// ── AWS Bedrock ──
{
key: 'bedrock',
Expand Down Expand Up @@ -1690,6 +1768,13 @@ export function canReliablyFetchModels(
reasonEn: "DeepSeek does not expose /v1/models — use manual entry in Add model.",
};
}
if (preset.key === 'stepfun') {
return {
reliable: false,
reasonZh: '阶跃星辰 Step Plan 不支持通过 /v1/models 拉取列表,请在「添加模型」里手动输入 model id',
reasonEn: "StepFun Step Plan does not expose /v1/models — use manual entry in Add model.",
};
}
// Image providers: catalog-only.
if (preset.protocol === 'gemini-image' || preset.protocol === 'openai-image') {
return {
Expand Down Expand Up @@ -1795,6 +1880,7 @@ export function canSearchUpstreamModels(
'bailian-token-plan-cn',
'xiaomi-mimo-token-plan',
'deepseek',
'stepfun',
]);
if (preset && manualOnlyKeys.has(preset.key)) {
return {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/provider-icon-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type ProviderIconKey =
| "ollama"
| "openai"
| "deepseek"
| "stepfun"
| "bedrock"
| "google"
| "aws"
Expand Down Expand Up @@ -90,6 +91,7 @@ export function getProviderIconKey(name: string, baseUrl: string): ProviderIconK
)
return "openai";
if (url.includes("deepseek") || lower.includes("deepseek")) return "deepseek";
if (url.includes("stepfun") || lower.includes("stepfun") || lower.includes("阶跃")) return "stepfun";
if (lower.includes("bedrock")) return "bedrock";
if (lower.includes("vertex") || lower.includes("google")) return "google";
if (lower.includes("aws")) return "aws";
Expand Down
Loading