diff --git a/crates/agent-gateway/web/src/pages/settings/ProvidersSection.tsx b/crates/agent-gateway/web/src/pages/settings/ProvidersSection.tsx
index 905a67b2f..e0c44d4c3 100644
--- a/crates/agent-gateway/web/src/pages/settings/ProvidersSection.tsx
+++ b/crates/agent-gateway/web/src/pages/settings/ProvidersSection.tsx
@@ -833,16 +833,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel.contextWindow}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- contextWindow: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, contextWindow: value } : prev,
+ );
+ }}
/>
@@ -857,16 +853,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel.maxOutputToken}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- maxOutputToken: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, maxOutputToken: value } : prev,
+ );
+ }}
/>
@@ -901,16 +893,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel[field]}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- [field]: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, [field]: value } : prev,
+ );
+ }}
/>
))}
diff --git a/crates/agent-gui/src/pages/settings/ProvidersSection.tsx b/crates/agent-gui/src/pages/settings/ProvidersSection.tsx
index 86f3f8916..af3e6873e 100644
--- a/crates/agent-gui/src/pages/settings/ProvidersSection.tsx
+++ b/crates/agent-gui/src/pages/settings/ProvidersSection.tsx
@@ -883,16 +883,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel.contextWindow}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- contextWindow: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, contextWindow: value } : prev,
+ );
+ }}
/>
@@ -907,16 +903,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel.maxOutputToken}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- maxOutputToken: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, maxOutputToken: value } : prev,
+ );
+ }}
/>
@@ -951,16 +943,12 @@ function ProviderModal({ providerType, initialData, onSave, onClose }: ModalProp
"ring-1 ring-inset ring-destructive focus-visible:ring-destructive",
)}
value={editingModel[field]}
- onChange={(event) =>
+ onChange={(event) => {
+ const value = event.currentTarget.value;
setEditingModel((prev) =>
- prev
- ? {
- ...prev,
- [field]: event.currentTarget.value,
- }
- : prev,
- )
- }
+ prev ? { ...prev, [field]: value } : prev,
+ );
+ }}
/>
))}