fix(ModelEditContent): preserve model price settings (#8560)

fix(ModelEditContent): 为价格输入字段添加默认值
This commit is contained in:
Phantom 2025-07-27 21:56:30 +08:00 committed by GitHub
parent 2e87c76b6e
commit 392f1e0a24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -373,6 +373,7 @@ const ModelEditContent: FC<ModelEditContentProps> = ({ provider, model, onUpdate
<Input
style={{ width: '100px' }}
placeholder={t('models.price.custom_currency_placeholder')}
defaultValue={model.pricing?.currencySymbol}
maxLength={5}
onChange={(e) => setCurrencySymbol(e.target.value)}
/>
@ -382,6 +383,7 @@ const ModelEditContent: FC<ModelEditContentProps> = ({ provider, model, onUpdate
<Form.Item label={t('models.price.input')} name="input_per_million_tokens">
<InputNumber
placeholder="0.00"
defaultValue={model.pricing?.input_per_million_tokens}
min={0}
step={0.01}
precision={2}
@ -392,6 +394,7 @@ const ModelEditContent: FC<ModelEditContentProps> = ({ provider, model, onUpdate
<Form.Item label={t('models.price.output')} name="output_per_million_tokens">
<InputNumber
placeholder="0.00"
defaultValue={model.pricing?.output_per_million_tokens}
min={0}
step={0.01}
precision={2}