# How to Configure a Custom OpenAI-Compatible Endpoint for AI Summaries in Meetily

> Learn to set up a custom OpenAI-compatible endpoint for AI summaries in Meetily. Easily integrate your preferred LLM by configuring the runtime endpoint URL with the builtin_ai_generate_summary command.

- Repository: [Zackriya Solutions/meetily](https://github.com/Zackriya-Solutions/meetily)
- Tags: how-to-guide
- Published: 2026-07-12

---

**Meetily routes AI summary requests to any OpenAI-compatible API by accepting a custom endpoint URL at runtime through the `builtin_ai_generate_summary` Tauri command, which constructs the request URL in [`llm_client.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/llm_client.rs) by appending `/chat/completions` to your provided base endpoint.**

Meetily, the open-source meeting assistant from Zackriya-Solutions/meetily, supports private and third-party LLM deployments through its flexible provider system. You can configure a **custom OpenAI-compatible endpoint** to generate meeting summaries using self-hosted models, Azure OpenAI, or proxy services instead of the default OpenAI API. This configuration happens at runtime through the Rust backend's LLM client, requiring no hard-coded constants or source modifications.

## How the Custom Endpoint System Works

The architecture follows a three-layer flow that keeps the endpoint configuration dynamic and user-controlled.

### Frontend to Backend Communication

When a user requests a summary, the React frontend invokes the Tauri command `builtin_ai_generate_summary` with a provider string of `"custom-openai"` and the endpoint URL. This command resides in [`frontend/src-tauri/src/summary/summary_engine/commands.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/summary_engine/commands.rs) and acts as the bridge between the UI and the summary generation logic.

### URL Construction in the LLM Client

Inside [`frontend/src-tauri/src/summary/llm_client.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/llm_client.rs), the `generate_summary` function handles the actual HTTP request construction. When the provider is `LLMProvider::CustomOpenAI`, the code builds the request URL dynamically:

```rust
format!("{}/chat/completions", endpoint.trim_end_matches('/'))

```

This logic appears at lines 173-179 of the file, ensuring your custom endpoint (e.g., `https://my-proxy.example.com`) receives the standardized OpenAI chat completions path.

## Configuring the Endpoint in Your Application

### Frontend Implementation (TypeScript)

To invoke the summary generation with a custom endpoint, use the Tauri API to pass the `customOpenAIEndpoint` parameter:

```typescript
import { invoke } from '@tauri-apps/api/tauri';

async function generateSummaryViaCustomOpenAI(
  transcript: string,
  apiKey: string,
  model = 'gpt-4',
  endpoint = 'https://my-openai-proxy.example.com'
) {
  const result = await invoke<string>('builtin_ai_generate_summary', {
    provider: 'custom-openai',
    modelName: model,
    apiKey,
    systemPrompt: 'You are a concise meeting-summary assistant.',
    userPrompt: transcript,
    customOpenAIEndpoint: endpoint,
    maxTokens: 1024,
    temperature: 0.7,
    topP: 0.9,
  });

  return result;
}

```

### Rust Command Handler

The Tauri command in [`frontend/src-tauri/src/summary/summary_engine/commands.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/summary_engine/commands.rs) receives these parameters and forwards them to the LLM client:

```rust
#[tauri::command]
pub async fn builtin_ai_generate_summary(
    provider: String,
    model_name: String,
    api_key: String,
    system_prompt: String,
    user_prompt: String,
    custom_openai_endpoint: Option<String>,
    // …other optional args…
) -> Result<String, String> {
    let provider = LLMProvider::from_str(&provider)?;
    let client = reqwest::Client::new();

    // Pass the optional endpoint straight to the core generator.
    summary::llm_client::generate_summary(
        &client,
        &provider,
        &model_name,
        &api_key,
        &system_prompt,
        &user_prompt,
        None,                       // ollama_endpoint – not used here
        custom_openai_endpoint.as_deref(),
        max_tokens,
        temperature,
        top_p,
        None,                       // app_data_dir – not needed for remote service
        None,                       // cancellation token
    )
    .await
}

```

### Persisting User Settings

Meetily stores configuration in JSON format within the app-data directory. When users save a custom endpoint through the settings UI, the application writes to a structure resembling:

```json
{
  "summary": {
    "customOpenAIEndpoint": "https://my-openai-proxy.example.com"
  }
}

```

The frontend then retrieves this value from the settings store defined in [`frontend/src-tauri/src/config.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/config.rs) and passes it as the `customOpenAIEndpoint` argument during the next invocation.

## Critical Source Files Reference

Understanding these specific files helps when debugging or extending the endpoint configuration:

- **[`frontend/src-tauri/src/summary/llm_client.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/llm_client.rs)** (lines 173-179): Contains the URL formatting logic for `LLMProvider::CustomOpenAI`
- **[`frontend/src-tauri/src/summary/summary_engine/commands.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/summary_engine/commands.rs)**: Exports the `builtin_ai_generate_summary` Tauri command that accepts the endpoint parameter
- **[`frontend/src-tauri/src/config.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/config.rs)**: Defines constants for settings persistence paths

## Summary

- Meetily's AI summary engine accepts **custom OpenAI-compatible endpoints** at runtime through the `custom_openai_endpoint` parameter.
- The backend constructs the full API URL in [`llm_client.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/llm_client.rs) by appending `/chat/completions` to your provided base endpoint.
- Invoke the `builtin_ai_generate_summary` command with `provider: 'custom-openai'` and your endpoint URL to route requests to private or third-party LLM services.
- Settings persist in the app-data JSON store, allowing users to save endpoint configurations between sessions.

## Frequently Asked Questions

### What endpoint format does Meetily expect for custom OpenAI-compatible services?

Meetily expects the base URL of your OpenAI-compatible API without the `/chat/completions` path. For example, use `https://api.example.com/v1` rather than the full completion URL. The `generate_summary` function in [`frontend/src-tauri/src/summary/llm_client.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/summary/llm_client.rs) automatically appends `/chat/completions` to your endpoint after trimming trailing slashes at lines 173-179.

### Can I use Azure OpenAI Service with Meetily's custom endpoint configuration?

Yes. Azure OpenAI follows the OpenAI API specification, so you can set your Azure endpoint (e.g., `https://my-resource.openai.azure.com/openai/deployments/my-model`) as the `customOpenAIEndpoint`. Ensure you include the deployment path in the URL and provide the Azure API key in the `apiKey` parameter when invoking the command.

### Where does Meetily store the custom endpoint configuration between app restarts?

Meetily persists settings in a JSON file within the application data directory, managed through constants in [`frontend/src-tauri/src/config.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/config.rs). The settings UI writes the `customOpenAIEndpoint` value to this store, and the frontend retrieves it when calling `builtin_ai_generate_summary` on subsequent launches.

### Is the custom endpoint parameter required for all AI summary requests?

No. The `custom_openai_endpoint` parameter is optional (`Option<String>`) in the Rust command handler. You only need to provide it when using `LLMProvider::CustomOpenAI`. If you use the standard OpenAI provider or other built-in providers like Ollama, this parameter can be null or omitted entirely.