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
11 changes: 11 additions & 0 deletions src/main/presenter/configPresenter/providerModelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ export const providerModelSettings: Record<string, { models: ProviderModelSettin
// Anthropic provider-specific model configurations
anthropic: {
models: [
{
id: 'claude-sonnet-4-5-20250929',
name: 'Claude Sonnet 4.5',
temperature: 0.7,
maxTokens: 64000,
contextLength: 204800,
match: ['claude-sonnet-4-5', 'claude-sonnet-4-5-20250929'],
vision: true,
functionCall: true,
reasoning: true
},
{
id: 'claude-opus-4-1',
name: 'Claude Opus 4.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class AnthropicProvider extends BaseLLMProvider {
private anthropic!: Anthropic
private oauthToken?: string
private isOAuthMode = false
private defaultModel = 'claude-3-7-sonnet-20250219'
private defaultModel = 'claude-sonnet-4-5-20250929'

constructor(provider: LLM_PROVIDER, configPresenter: IConfigPresenter) {
super(provider, configPresenter)
Expand Down Expand Up @@ -169,14 +169,26 @@ export class AnthropicProvider extends BaseLLMProvider {

// 默认的模型列表(如API调用失败或数据格式不正确)
return [
{
id: 'claude-sonnet-4-5-20250929',
name: 'Claude Sonnet 4.5',
providerId: this.provider.id,
maxTokens: 64000,
group: 'Claude 4.5',
isCustom: false,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: true
},
{
id: 'claude-opus-4-1-20250805',
name: 'Claude Opus 4.1',
providerId: this.provider.id,
maxTokens: 32_000,
maxTokens: 32000,
group: 'Claude 4.1',
isCustom: false,
contextLength: 200000,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: true
Expand All @@ -185,10 +197,10 @@ export class AnthropicProvider extends BaseLLMProvider {
id: 'claude-opus-4-20250514',
name: 'Claude Opus 4',
providerId: this.provider.id,
maxTokens: 32_000,
maxTokens: 32000,
group: 'Claude 4',
isCustom: false,
contextLength: 200000,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: true
Expand All @@ -197,10 +209,10 @@ export class AnthropicProvider extends BaseLLMProvider {
id: 'claude-sonnet-4-20250514',
name: 'Claude Sonnet 4',
providerId: this.provider.id,
maxTokens: 64_000,
maxTokens: 64000,
group: 'Claude 4',
isCustom: false,
contextLength: 200000,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: true
Expand All @@ -209,10 +221,10 @@ export class AnthropicProvider extends BaseLLMProvider {
id: 'claude-3-7-sonnet-20250219',
name: 'Claude 3.7 Sonnet',
providerId: this.provider.id,
maxTokens: 64_000,
maxTokens: 64000,
group: 'Claude 3.7',
isCustom: false,
contextLength: 200000,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: true
Expand All @@ -236,7 +248,7 @@ export class AnthropicProvider extends BaseLLMProvider {
maxTokens: 8192,
group: 'Claude 3.5',
isCustom: false,
contextLength: 200000,
contextLength: 204800,
vision: true,
functionCall: true,
reasoning: false
Expand Down