Skip to content
Merged
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
57 changes: 57 additions & 0 deletions src/main/presenter/configPresenter/modelDefaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,63 @@ export const defaultModelsSettings: DefaultModelSetting[] = [
functionCall: true,
reasoning: false
},

// Zhipu
{
id: 'glm-4.5',
name: 'GLM-4.5',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-air',
name: 'GLM-4.5-Air',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-air'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-x',
name: 'GLM-4.5-X',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-x'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-airx',
name: 'GLM-4.5-AirX',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-airx'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-flash',
name: 'GLM-4.5-Flash',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-flash'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4-plus',
name: 'GLM-4-Plus',
Expand Down
59 changes: 58 additions & 1 deletion src/main/presenter/configPresenter/providerModelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,64 @@ export const providerModelSettings: Record<string, { models: ProviderModelSettin

// 智谱AI提供商特定模型配置
zhipu: {
models: []
models: [
// GLM 4.5 系列模型
{
id: 'glm-4.5',
name: 'GLM-4.5',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-air',
name: 'GLM-4.5-Air',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-air'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-x',
name: 'GLM-4.5-X',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-x'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-airx',
name: 'GLM-4.5-AirX',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-airx'],
vision: false,
functionCall: true,
reasoning: true
},
{
id: 'glm-4.5-flash',
name: 'GLM-4.5-Flash',
temperature: 0.7,
maxTokens: 8192,
contextLength: 128000,
match: ['glm-4.5-flash'],
vision: false,
functionCall: true,
reasoning: true
}
]
},

// Moonshot提供商特定模型配置
Expand Down
45 changes: 45 additions & 0 deletions src/main/presenter/llmProviderPresenter/providers/zhipuProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,51 @@ export class ZhipuProvider extends OpenAICompatibleProvider {
protected async fetchOpenAIModels(): Promise<MODEL_META[]> {
return [
// 语言模型
{
id: 'glm-4.5',
name: 'GLM-4.5',
group: 'zhipu',
providerId: this.provider.id,
isCustom: false,
contextLength: 128000,
maxTokens: 8192
},
{
id: 'glm-4.5-air',
name: 'GLM-4.5-Air',
group: 'zhipu',
providerId: this.provider.id,
isCustom: false,
contextLength: 128000,
maxTokens: 8192
},
{
id: 'glm-4.5-x',
name: 'GLM-4.5-X',
group: 'zhipu',
providerId: this.provider.id,
isCustom: false,
contextLength: 128000,
maxTokens: 8192
},
{
id: 'glm-4.5-airx',
name: 'GLM-4.5-AirX',
group: 'zhipu',
providerId: this.provider.id,
isCustom: false,
contextLength: 128000,
maxTokens: 8192
},
{
id: 'glm-4.5-flash',
name: 'GLM-4.5-Flash',
group: 'zhipu',
providerId: this.provider.id,
isCustom: false,
contextLength: 128000,
maxTokens: 8192
},
{
id: 'glm-4-plus',
name: 'GLM-4-Plus',
Expand Down