fix: auto default

This commit is contained in:
Joel
2026-01-19 18:40:42 +08:00
parent fb28f03155
commit 49effca35d
2 changed files with 2 additions and 3 deletions

View File

@ -153,7 +153,7 @@ const ReasoningConfigForm: React.FC<Props> = ({
placeholder,
options,
} = schema
const canUseAuto = type !== FormTypeEnum.modelSelector
const canUseAuto = ![FormTypeEnum.modelSelector, FormTypeEnum.appSelector].includes(type)
const auto = canUseAuto ? value[variable]?.auto : 0
const tooltipContent = (tooltip && (
<Tooltip

View File

@ -12,7 +12,6 @@ import * as React from 'react'
import { useCallback, useMemo } from 'react'
import ReactDOM from 'react-dom'
import { v4 as uuid } from 'uuid'
import { FormTypeEnum } from '@/app/components/base/form/types'
import { useBasicTypeaheadTriggerMatch } from '@/app/components/base/prompt-editor/hooks'
import { $splitNodeContainingQuery } from '@/app/components/base/prompt-editor/utils'
import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
@ -81,7 +80,7 @@ const ToolPickerBlock: FC<ToolPickerBlockProps> = ({ scope = 'all' }) => {
const fields = schemas.map(schema => ({
id: schema.variable,
value: schema.default ?? null,
auto: ![FormTypeEnum.modelSelector, FormTypeEnum.appSelector].includes(schema.type as FormTypeEnum), // llm can not determine auto for these types
auto: schema.form === 'llm',
}))
nextTools[configId] = {
type: tool.provider_type, // === CollectionType.mcp ? 'mcp' : 'builtin'