Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

fix(webui): reset price/reasoning when a model name is typed, not just picked

Sergey Kozyrenko28377ab4a420
diff --git a/frontend/src/pages/settings/settings-provider.tsx b/frontend/src/pages/settings/settings-provider.tsx
index 745f06cb..25d56b22 100644
--- a/frontend/src/pages/settings/settings-provider.tsx
+++ b/frontend/src/pages/settings/settings-provider.tsx
@@ -443,7 +443,15 @@ function FormModelComboboxItem<T extends FieldValues = FieldValues>({
<Input
className="rounded-r-none border-r-0 focus-visible:z-10"
disabled={disabled}
- onChange={(event) => field.onChange(event.target.value)}
+ onChange={(event) => {
+ const { value } = event.target;
+ field.onChange(value);
+ const matched = options.find((option) => option.name === value);
+
+ if (matched) {
+ onOptionSelect?.(matched);
+ }
+ }}
placeholder={placeholder}
value={displayValue}
/>