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/modelDefaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,17 @@ export const defaultModelsSettings: DefaultModelSetting[] = [
},

// Claude系列模型配置
{
id: 'claude-opus-4-1',
name: 'Claude Opus 4.1',
temperature: 0.7,
maxTokens: 32000,
contextLength: 204800,
match: ['claude-opus-4-1', 'claude-opus-4-1-20250805'],
vision: true,
functionCall: true,
reasoning: true
},
{
id: 'claude-opus-4',
name: 'Claude Opus 4',
Expand Down
11 changes: 11 additions & 0 deletions src/main/presenter/configPresenter/providerModelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ export const providerModelSettings: Record<string, { models: ProviderModelSettin
// Anthropic提供商特定模型配置
anthropic: {
models: [
{
id: 'claude-opus-4-1',
name: 'Claude Opus 4.1',
temperature: 0.7,
maxTokens: 32000,
contextLength: 204800,
match: ['claude-opus-4-1', 'claude-opus-4-1-20250805'],
vision: true,
functionCall: true,
reasoning: true
},
{
id: 'claude-opus-4',
name: 'Claude Opus 4',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
:provider="provider"
:enabled-models="enabledModels"
:total-models-count="totalModelsCount"
@show-model-list-dialog="openModelCheckDialog"
@show-model-list-dialog="showModelListDialog = true"
@disable-all-models="handleDisableAllModels"
@model-enabled-change="handleModelEnabledChange"
@config-changed="handleConfigChanged"
Expand Down Expand Up @@ -288,6 +288,15 @@
</DialogContent>
</Dialog>
</div>
<ProviderDialogContainer
v-model:show-model-list-dialog="showModelListDialog"
:provider="provider"
:provider-models="providerModels"
:custom-models="customModels"
:model-to-disable="null"
:check-result="false"
@model-enabled-change="handleModelEnabledChange"
/>
</section>
</template>

Expand Down Expand Up @@ -317,6 +326,7 @@ import { useModelCheckStore } from '@/stores/modelCheck'
import { usePresenter } from '@/composables/usePresenter'
import type { LLM_PROVIDER, RENDERER_MODEL_META } from '@shared/presenter'
import ProviderModelManager from './ProviderModelManager.vue'
import ProviderDialogContainer from './ProviderDialogContainer.vue'

const { t } = useI18n()

Expand All @@ -338,6 +348,7 @@ const authMethod = ref<'apikey' | 'oauth'>('apikey')
const apiHost = ref(props.provider.baseUrl || '')
const apiKey = ref(props.provider.apiKey || '')
const showCheckModelDialog = ref(false)
const showModelListDialog = ref(false)
const checkResult = ref<boolean>(false)
const isLoggingIn = ref(false)
const validationResult = ref<{ success: boolean; message: string } | null>(null)
Expand All @@ -363,6 +374,18 @@ const totalModelsCount = computed(() => {
return providerModels?.models.length || 0
})

const providerModels = computed((): RENDERER_MODEL_META[] => {
const provider = settingsStore.allProviderModels.find((p) => p.providerId === props.provider.id)
return provider?.models || []
})

const customModels = computed((): RENDERER_MODEL_META[] => {
const providerCustomModels = settingsStore.customModels.find(
(p) => p.providerId === props.provider.id
)
return providerCustomModels?.models || []
})

// 初始化认证方法检测
const detectAuthMethod = async () => {
// 检查provider配置中的认证模式
Expand Down