mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(ui): render guardrail optional_params bool defaults in Select
The bool branch of the guardrail optional params renderer was using
string values ("true"/"false") for Select.Option, so when the backend
declared a real JS boolean as default_value (e.g. Pillar
include_scanners/include_evidence, IBM block_on_detection), antd's
Form.Item initialValue did not match any Option and the Select
rendered empty. Switching to real boolean Option values lets defaults
flow through unchanged. This matches the sibling fix already applied
in guardrail_provider_fields.tsx for Noma use_v2.
This commit is contained in:
parent
72a461ba4a
commit
f04a5e7113
1 changed files with 2 additions and 2 deletions
|
|
@ -192,8 +192,8 @@ const GuardrailOptionalParams: React.FC<GuardrailOptionalParamsProps> = ({
|
|||
</Select>
|
||||
) : field.type === "bool" || field.type === "boolean" ? (
|
||||
<Select placeholder={field.description}>
|
||||
<Select.Option value="true">True</Select.Option>
|
||||
<Select.Option value="false">False</Select.Option>
|
||||
<Select.Option value={true}>True</Select.Option>
|
||||
<Select.Option value={false}>False</Select.Option>
|
||||
</Select>
|
||||
) : field.type === "number" ? (
|
||||
<NumericalInput step={1} width={400} placeholder={field.description} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue