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

{ e.preventDefault(); submitHandler(); }} >
{#if !direct}
{$i18n.t('Type')}
{/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 ['', '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}
{#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')}
{/if}
{#if !direct}

{/if}
{#if edit} {/if}