mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
Update hidden credential_type input logic in EditModelModal
The hidden input for credential_type now prioritizes cost.credential_type, then provider.default_credential_type, and defaults to 'api_key' if neither is set. This ensures the correct credential type is submitted based on available data.
This commit is contained in:
@@ -186,7 +186,11 @@ export function EditModelModal({
|
||||
</label>
|
||||
</div>
|
||||
{/* Hidden defaults for credential_type and unit */}
|
||||
<input type="hidden" name="credential_type" value="api_key" />
|
||||
<input
|
||||
type="hidden"
|
||||
name="credential_type"
|
||||
value={cost?.credential_type ?? provider?.default_credential_type ?? "api_key"}
|
||||
/>
|
||||
<input type="hidden" name="unit" value={cost?.unit ?? "RUN"} />
|
||||
|
||||
<Dialog.Footer>
|
||||
|
||||
Reference in New Issue
Block a user