Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export const ModelPricingEditorPanel = forwardRef<
})
const [billingExpr, setBillingExpr] = useState('')
const [requestRuleExpr, setRequestRuleExpr] = useState('')
const [editorReloadToken, setEditorReloadToken] = useState(0)
const isEditMode = !!editData

const form = useForm<ModelPricingFormValues>({
Expand Down Expand Up @@ -214,6 +215,7 @@ export const ModelPricingEditorPanel = forwardRef<
setPromptPrice(nextLaneState.promptPrice)
setLanePrices(nextLaneState.prices)
setLaneEnabled(nextLaneState.enabled)
setEditorReloadToken((token) => token + 1)
}, [editData, form])

const setFormValue = (field: keyof ModelPricingFormValues, value: string) => {
Expand Down Expand Up @@ -638,6 +640,7 @@ export const ModelPricingEditorPanel = forwardRef<
<TabsContent value='tiered_expr' className='pt-0'>
<FieldGroup className='gap-5'>
<TieredPricingEditor
key={editorReloadToken}
modelName={watchedValues.name}
billingExpr={billingExpr}
requestRuleExpr={requestRuleExpr}
Expand Down