Skip to content

Commit 0c7d28b

Browse files
committed
feat: step modelinfo
1 parent bf0cb59 commit 0c7d28b

File tree

2 files changed

+139
-28
lines changed

2 files changed

+139
-28
lines changed

service/aiproxy/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func setLog(l *log.Logger) {
7171
l.SetOutput(os.Stdout)
7272
stdlog.SetOutput(l.Writer())
7373

74-
log.SetFormatter(&log.TextFormatter{
74+
l.SetFormatter(&log.TextFormatter{
7575
ForceColors: true,
7676
DisableColors: false,
7777
ForceQuote: config.DebugEnabled,

service/aiproxy/relay/adaptor/stepfun/constants.go

+138-27
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,159 @@ import (
77

88
var ModelList = []*model.ModelConfig{
99
{
10-
Model: "step-1-8k",
11-
Type: relaymode.ChatCompletions,
12-
Owner: model.ModelOwnerStepFun,
10+
Model: "step-1-8k",
11+
Type: relaymode.ChatCompletions,
12+
Owner: model.ModelOwnerStepFun,
13+
InputPrice: 0.005,
14+
OutputPrice: 0.02,
15+
RPM: 60,
16+
Config: model.NewModelConfig(
17+
model.WithModelConfigMaxContextTokens(8000),
18+
model.WithModelConfigToolChoice(true),
19+
),
1320
},
1421
{
15-
Model: "step-1-32k",
16-
Type: relaymode.ChatCompletions,
17-
Owner: model.ModelOwnerStepFun,
22+
Model: "step-1-32k",
23+
Type: relaymode.ChatCompletions,
24+
Owner: model.ModelOwnerStepFun,
25+
InputPrice: 0.015,
26+
OutputPrice: 0.07,
27+
RPM: 60,
28+
Config: model.NewModelConfig(
29+
model.WithModelConfigMaxContextTokens(32000),
30+
model.WithModelConfigToolChoice(true),
31+
),
1832
},
1933
{
20-
Model: "step-1-128k",
21-
Type: relaymode.ChatCompletions,
22-
Owner: model.ModelOwnerStepFun,
34+
Model: "step-1-128k",
35+
Type: relaymode.ChatCompletions,
36+
Owner: model.ModelOwnerStepFun,
37+
InputPrice: 0.04,
38+
OutputPrice: 0.2,
39+
RPM: 60,
40+
Config: model.NewModelConfig(
41+
model.WithModelConfigMaxContextTokens(128000),
42+
model.WithModelConfigToolChoice(true),
43+
),
2344
},
2445
{
25-
Model: "step-1-256k",
26-
Type: relaymode.ChatCompletions,
27-
Owner: model.ModelOwnerStepFun,
46+
Model: "step-1-256k",
47+
Type: relaymode.ChatCompletions,
48+
Owner: model.ModelOwnerStepFun,
49+
InputPrice: 0.95,
50+
OutputPrice: 0.3,
51+
RPM: 60,
52+
Config: model.NewModelConfig(
53+
model.WithModelConfigMaxContextTokens(256000),
54+
model.WithModelConfigToolChoice(true),
55+
),
2856
},
2957
{
30-
Model: "step-1-flash",
31-
Type: relaymode.ChatCompletions,
32-
Owner: model.ModelOwnerStepFun,
58+
Model: "step-1-flash",
59+
Type: relaymode.ChatCompletions,
60+
Owner: model.ModelOwnerStepFun,
61+
InputPrice: 0.001,
62+
OutputPrice: 0.004,
63+
RPM: 60,
64+
Config: model.NewModelConfig(
65+
model.WithModelConfigMaxContextTokens(8000),
66+
model.WithModelConfigToolChoice(true),
67+
),
3368
},
3469
{
35-
Model: "step-2-16k",
36-
Type: relaymode.ChatCompletions,
37-
Owner: model.ModelOwnerStepFun,
70+
Model: "step-2-16k",
71+
Type: relaymode.ChatCompletions,
72+
Owner: model.ModelOwnerStepFun,
73+
InputPrice: 0.038,
74+
OutputPrice: 0.12,
75+
RPM: 60,
76+
Config: model.NewModelConfig(
77+
model.WithModelConfigMaxContextTokens(16000),
78+
model.WithModelConfigToolChoice(true),
79+
),
3880
},
3981
{
40-
Model: "step-1v-8k",
41-
Type: relaymode.ChatCompletions,
42-
Owner: model.ModelOwnerStepFun,
82+
Model: "step-1v-8k",
83+
Type: relaymode.ChatCompletions,
84+
Owner: model.ModelOwnerStepFun,
85+
InputPrice: 0.005,
86+
OutputPrice: 0.02,
87+
RPM: 60,
88+
Config: model.NewModelConfig(
89+
model.WithModelConfigMaxContextTokens(8000),
90+
model.WithModelConfigToolChoice(true),
91+
model.WithModelConfigVision(true),
92+
),
4393
},
4494
{
45-
Model: "step-1v-32k",
46-
Type: relaymode.ChatCompletions,
47-
Owner: model.ModelOwnerStepFun,
95+
Model: "step-1v-32k",
96+
Type: relaymode.ChatCompletions,
97+
Owner: model.ModelOwnerStepFun,
98+
InputPrice: 0.015,
99+
OutputPrice: 0.07,
100+
RPM: 60,
101+
Config: model.NewModelConfig(
102+
model.WithModelConfigMaxContextTokens(32000),
103+
model.WithModelConfigToolChoice(true),
104+
model.WithModelConfigVision(true),
105+
),
48106
},
49107
{
50-
Model: "step-1x-medium",
51-
Type: relaymode.ChatCompletions,
52-
Owner: model.ModelOwnerStepFun,
108+
Model: "step-1.5v-mini",
109+
Type: relaymode.ChatCompletions,
110+
Owner: model.ModelOwnerStepFun,
111+
InputPrice: 0.008,
112+
OutputPrice: 0.035,
113+
RPM: 60,
114+
Config: model.NewModelConfig(
115+
model.WithModelConfigMaxContextTokens(32000),
116+
model.WithModelConfigToolChoice(true),
117+
model.WithModelConfigVision(true),
118+
),
119+
},
120+
121+
{
122+
Model: "step-tts-mini",
123+
Type: relaymode.AudioSpeech,
124+
Owner: model.ModelOwnerStepFun,
125+
InputPrice: 0.09,
126+
RPM: 60,
127+
Config: model.NewModelConfig(
128+
model.WithModelConfigMaxInputTokens(1000),
129+
model.WithModelConfigSupportFormats([]string{"opus", "wav", "flac", "mp3"}),
130+
model.WithModelConfigSupportVoices([]string{
131+
"cixingnansheng", "zhengpaiqingnian", "yuanqinansheng",
132+
"qingniandaxuesheng", "boyinnansheng", "ruyananshi",
133+
"shenchennanyin", "qinqienvsheng", "wenrounvsheng",
134+
"jilingshaonv", "yuanqishaonv", "ruanmengnvsheng",
135+
"youyanvsheng", "lengyanyujie", "shuangkuaijiejie",
136+
"wenjingxuejie", "linjiajiejie", "linjiameimei",
137+
"zhixingjiejie",
138+
}),
139+
),
140+
},
141+
142+
{
143+
Model: "step-asr",
144+
Type: relaymode.AudioTranscription,
145+
Owner: model.ModelOwnerStepFun,
146+
InputPrice: 0.09,
147+
RPM: 60,
148+
},
149+
150+
{
151+
Model: "step-1x-medium",
152+
Type: relaymode.ImagesGenerations,
153+
Owner: model.ModelOwnerStepFun,
154+
RPM: 60,
155+
ImageMaxBatchSize: 1,
156+
ImagePrices: map[string]float64{
157+
"256x256": 0.1,
158+
"512x512": 0.1,
159+
"768x768": 0.1,
160+
"1024x1024": 0.1,
161+
"1280x800": 0.1,
162+
"800x1280": 0.1,
163+
},
53164
},
54165
}

0 commit comments

Comments
 (0)