mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
💄 style: update SiliconCloud reasoning models (#9287)
💄 style: update siliconcloud reasoning models
This commit is contained in:
parent
cee555a0f0
commit
b47bb5b3aa
2 changed files with 64 additions and 11 deletions
|
|
@ -84,6 +84,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-08-20',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -105,6 +108,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-07-31',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -164,6 +170,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-08-11',
|
||||
settings: {
|
||||
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -184,6 +193,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-07-28',
|
||||
settings: {
|
||||
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -223,6 +235,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-06-17',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -334,6 +349,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-06-17',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -353,6 +371,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-06-27',
|
||||
settings: {
|
||||
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -372,6 +393,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-06-16',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -391,6 +415,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-05-26',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -412,6 +439,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-07-25',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -453,6 +483,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-07-30',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -653,6 +686,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
],
|
||||
},
|
||||
releasedAt: '2025-04-14',
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -788,6 +824,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
{ name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -807,6 +846,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
{ name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
@ -1012,6 +1054,9 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|||
{ name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
extendParams: ['reasoningBudgetToken'],
|
||||
},
|
||||
type: 'chat',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,21 +43,29 @@ export const LobeSiliconCloudAI = createOpenAICompatibleRuntime({
|
|||
const thinkingBudget =
|
||||
thinking?.budget_tokens === 0 ? 1 : thinking?.budget_tokens || undefined;
|
||||
|
||||
return {
|
||||
const result: any = {
|
||||
...rest,
|
||||
...(['qwen3', 'deepseek-v3.1'].some((keyword) => model.toLowerCase().includes(keyword))
|
||||
? {
|
||||
enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
|
||||
thinking_budget:
|
||||
thinkingBudget === undefined
|
||||
? undefined
|
||||
: Math.min(Math.max(thinkingBudget, 1), 32_768),
|
||||
}
|
||||
: {}),
|
||||
max_tokens:
|
||||
max_tokens === undefined ? undefined : Math.min(Math.max(max_tokens, 1), 16_384),
|
||||
model,
|
||||
} as any;
|
||||
};
|
||||
|
||||
if (thinking) {
|
||||
// 只有部分模型支持指定 enable_thinking,其余一些慢思考模型只支持调节 thinking budget
|
||||
const hybridThinkingModels = [
|
||||
/GLM-4\.5(?!.*Air$)/, // GLM-4.5 和 GLM-4.5V(不包含 GLM-4.5 Air)
|
||||
/Qwen3-(?:\d+B|\d+B-A\d+B)$/, // Qwen3-8B、Qwen3-14B、Qwen3-32B、Qwen3-30B-A3B、Qwen3-235B-A22B
|
||||
/DeepSeek-V3\.1/,
|
||||
/Hunyuan-A13B-Instruct/,
|
||||
];
|
||||
if (hybridThinkingModels.some((regexp) => regexp.test(model))) {
|
||||
result.enable_thinking = thinking.type === 'enabled';
|
||||
}
|
||||
if (typeof thinkingBudget !== 'undefined') {
|
||||
result.thinking_budget = Math.min(Math.max(thinkingBudget, 1), 32_768);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
},
|
||||
debug: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue