Skip to content

Commit 39a80c5

Browse files
KevinZhaoZhaoclaudeZhao
authored
💄 style: add pricing info for Azure GPT-5 series models (lobehub#9833)
* 💰 feat: add pricing info for Azure GPT-5 series models Added comprehensive pricing information for all Azure OpenAI GPT-5 series models: - GPT-5 Pro: $15/$120 per million tokens (input/output) - GPT-5 Codex: $1.25/$10 per million tokens with cache support - GPT-5: $1.25/$10 per million tokens with cache support - GPT-5 Mini: $0.25/$2 per million tokens with cache support - GPT-5 Nano: $0.05/$0.4 per million tokens with cache support - GPT-5 Chat: $1.25/$10 per million tokens with cache support Pricing aligns with OpenAI official rates and includes cache read pricing where applicable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔥 feat: remove Azure GPT-5 series models Removed all GPT-5 series model configurations from Azure provider: - GPT-5 Pro - GPT-5 Codex - GPT-5 - GPT-5 Mini - GPT-5 Nano - GPT-5 Chat These models are not yet officially released by Azure OpenAI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Zhao <zhaokm@ZhaodeMacBook-Pro.local> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Zhao <zhaokm@842f57833757mbpnetwork.lan>
1 parent 1b8a981 commit 39a80c5

File tree

3 files changed

+160
-1
lines changed

3 files changed

+160
-1
lines changed

packages/const/src/models.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export const responsesAPIModels = new Set([
3535
'codex-mini-latest',
3636
'computer-use-preview',
3737
'computer-use-preview-2025-03-11',
38+
'gpt-5-codex',
39+
'gpt-5-pro',
40+
'gpt-5-pro-2025-10-06',
3841
]);
3942

4043
/**

packages/model-bank/src/aiModels/azure.ts

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,161 @@
11
import { AIChatModelCard, AIImageModelCard } from '../types/aiModel';
22

33
const azureChatModels: AIChatModelCard[] = [
4+
{
5+
abilities: {
6+
functionCall: true,
7+
reasoning: true,
8+
structuredOutput: true,
9+
vision: true,
10+
},
11+
config: {
12+
deploymentName: 'gpt-5-pro',
13+
},
14+
contextWindowTokens: 400_000,
15+
description:
16+
'GPT-5 Pro 是 GPT-5 系列的高级版本,具备增强的推理能力。支持结构化输出、函数调用和文本/图像处理,适用于复杂的专业任务。',
17+
displayName: 'GPT-5 Pro',
18+
enabled: true,
19+
id: 'gpt-5-pro',
20+
maxOutput: 128_000,
21+
pricing: {
22+
units: [
23+
{ name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
24+
{ name: 'textOutput', rate: 120, strategy: 'fixed', unit: 'millionTokens' },
25+
],
26+
},
27+
releasedAt: '2025-10-06',
28+
type: 'chat',
29+
},
30+
{
31+
abilities: {
32+
functionCall: true,
33+
structuredOutput: true,
34+
},
35+
config: {
36+
deploymentName: 'gpt-5-codex',
37+
},
38+
contextWindowTokens: 400_000,
39+
description:
40+
'GPT-5 Codex 专为编程任务优化,针对 Codex CLI 和 VS Code 扩展进行了优化。支持结构化输出和函数调用,适用于代码生成和分析。',
41+
displayName: 'GPT-5 Codex',
42+
enabled: true,
43+
id: 'gpt-5-codex',
44+
maxOutput: 128_000,
45+
pricing: {
46+
units: [
47+
{ name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
48+
{ name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
49+
{ name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
50+
],
51+
},
52+
releasedAt: '2025-09-11',
53+
type: 'chat',
54+
},
55+
{
56+
abilities: {
57+
functionCall: true,
58+
reasoning: true,
59+
structuredOutput: true,
60+
vision: true,
61+
},
62+
config: {
63+
deploymentName: 'gpt-5',
64+
},
65+
contextWindowTokens: 400_000,
66+
description:
67+
'GPT-5 是 OpenAI 最新的旗舰模型,具备卓越的推理能力。支持文本和图像输入,结构化输出和并行工具调用,适用于需要深度理解和分析的复杂任务。',
68+
displayName: 'GPT-5',
69+
enabled: true,
70+
id: 'gpt-5',
71+
maxOutput: 128_000,
72+
pricing: {
73+
units: [
74+
{ name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
75+
{ name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
76+
{ name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
77+
],
78+
},
79+
releasedAt: '2025-08-07',
80+
type: 'chat',
81+
},
82+
{
83+
abilities: {
84+
functionCall: true,
85+
reasoning: true,
86+
structuredOutput: true,
87+
vision: true,
88+
},
89+
config: {
90+
deploymentName: 'gpt-5-mini',
91+
},
92+
contextWindowTokens: 400_000,
93+
description:
94+
'GPT-5 Mini 提供与 GPT-5 相似的能力,但更加高效和经济。支持推理、函数调用和视觉功能,适合大规模部署和对成本敏感的应用场景。',
95+
displayName: 'GPT-5 Mini',
96+
enabled: true,
97+
id: 'gpt-5-mini',
98+
maxOutput: 128_000,
99+
pricing: {
100+
units: [
101+
{ name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
102+
{ name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
103+
{ name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
104+
],
105+
},
106+
releasedAt: '2025-08-07',
107+
type: 'chat',
108+
},
109+
{
110+
abilities: {
111+
functionCall: true,
112+
reasoning: true,
113+
structuredOutput: true,
114+
vision: true,
115+
},
116+
config: {
117+
deploymentName: 'gpt-5-nano',
118+
},
119+
contextWindowTokens: 400_000,
120+
description:
121+
'GPT-5 Nano 是 GPT-5 系列中最小、最快的版本。在保持核心能力的同时,提供超低延迟和成本效益,适合边缘计算和实时应用。',
122+
displayName: 'GPT-5 Nano',
123+
enabled: true,
124+
id: 'gpt-5-nano',
125+
maxOutput: 128_000,
126+
pricing: {
127+
units: [
128+
{ name: 'textInput', rate: 0.05, strategy: 'fixed', unit: 'millionTokens' },
129+
{ name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
130+
{ name: 'textInput_cacheRead', rate: 0.005, strategy: 'fixed', unit: 'millionTokens' },
131+
],
132+
},
133+
releasedAt: '2025-08-07',
134+
type: 'chat',
135+
},
136+
{
137+
abilities: {
138+
vision: true,
139+
},
140+
config: {
141+
deploymentName: 'gpt-5-chat',
142+
},
143+
contextWindowTokens: 128_000,
144+
description:
145+
'GPT-5 Chat 专为对话场景优化的预览版本。支持文本和图像输入,仅输出文本,适用于聊天机器人和对话式AI应用。',
146+
displayName: 'GPT-5 Chat',
147+
id: 'gpt-5-chat',
148+
maxOutput: 16_384,
149+
pricing: {
150+
units: [
151+
{ name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
152+
{ name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
153+
{ name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
154+
],
155+
},
156+
releasedAt: '2025-08-07',
157+
type: 'chat',
158+
},
4159
{
5160
abilities: {
6161
functionCall: true,

packages/model-runtime/src/providers/azureOpenai/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export class LobeAzureOpenAI implements LobeRuntimeAI {
5151
...message,
5252
role:
5353
// Convert 'system' role to 'user' or 'developer' based on the model
54-
(model.includes('o1') || model.includes('o3')) && message.role === 'system'
54+
(model.includes('o1') || model.includes('o3') || model.includes('gpt-5')) &&
55+
message.role === 'system'
5556
? [...systemToUserModels].some((sub) => model.includes(sub))
5657
? 'user'
5758
: 'developer'

0 commit comments

Comments
 (0)