refactor: update model management components and enhance provider functionality

This commit is contained in:
Junyan Qin
2026-01-01 14:58:06 +08:00
parent fb73da8735
commit b4773c4e48
25 changed files with 1444 additions and 2209 deletions
@@ -155,7 +155,9 @@ export default function ProviderForm({
onValueChange={(v) => {
field.onChange(v);
const req = requesterList.find((r) => r.value === v);
if (req && !form.getValues('base_url')) {
// Auto-fill default URL when creating new provider
// or when base_url is empty in edit mode
if (req && (!providerId || !form.getValues('base_url'))) {
form.setValue('base_url', req.defaultUrl);
}
}}