{#if edit} {$i18n.t('Edit Connection')} {:else} {$i18n.t('Add Connection')} {/if}

{ e.preventDefault(); submitHandler(); }} >
{#if !direct}
{$i18n.t('Type')}
{/if}
{#if ['', 'openapi'].includes(type)}
{/if}
{#if ['', 'openapi'].includes(type)}
{$i18n.t(`WebUI will make requests to "{{url}}"`, { url: path.includes('://') ? path : `${url}${path.startsWith('/') ? '' : '/'}${path}` })}
{/if}
{$i18n.t('Auth')}
{#if auth_type === 'oauth_2.1'}
{#if !oauthClientInfo}
{$i18n.t('Not Registered')}
{:else}
{$i18n.t('Registered')}
{/if}
{/if}
{#if auth_type === 'bearer'} {:else if auth_type === 'none'}
{$i18n.t('No authentication')}
{:else if auth_type === 'session'}
{$i18n.t('Forwards system user session credentials to authenticate')}
{:else if auth_type === 'system_oauth'}
{$i18n.t('Forwards system user OAuth access token to authenticate')}
{:else if auth_type === 'oauth_2.1'}
{$i18n.t('Uses OAuth 2.1 Dynamic Client Registration')}
{/if}
{#if !direct}

{/if}
{#if type === 'mcp'}
{$i18n.t('Warning')}: {$i18n.t( 'MCP support is experimental and its specification changes often, which can lead to incompatibilities. OpenAPI specification support is directly maintained by the Open WebUI team, making it the more reliable option for compatibility.' )} {$i18n.t('Read more →')}
{/if}
{#if edit} {/if}