Cloud model providers

Overview

mouaif ships with four additional first-class API-key providers on top of the original six: Azure OpenAI, Mistral, Groq, and DeepSeek. All four are OpenAI-shaped at the wire level — the same /chat/completions SSE contract and the same /models catalog shape — so they reuse the existing openai-compatible request builder, SSE parser, tool loop, and usage accounting. Adding them was a localized change: one ENDPOINTS entry (with a listModels adapter) in src/ai-endpoints.js, a row in the Settings providers list, and a keyring-namespace mapping in src/auth.js.

Usage

Add a provider

  1. Settings → Providers → + Add provider.

  2. Pick the provider from the dropdown:

  1. Save provider. All four are API-key only — the Settings form shows no OAuth option for them.

Add a model

In the project's Models editor set provider to azure / mistral / groq / deepseek and id to the model id (for Azure, the deployment name):

// <projectDir>/.mouaif.json
{
  "models": [
    { "id": "gpt-4o", "provider": "azure", "label": "GPT-4o (my deployment)", "apiVersion": "2024-10-21" },
    { "id": "mistral-large-latest", "provider": "mistral", "label": "Mistral Large" },
    { "id": "llama-3.3-70b-versatile", "provider": "groq", "label": "Llama 3.3 70B" },
    { "id": "deepseek-chat", "provider": "deepseek", "label": "DeepSeek Chat" }
  ]
}

The live model catalog (chat head refresh ↻) pulls each provider's real /models list, so picking from the picker works without hand-editing JSON.

Chat

No special path. The chat composer posts to /api/chats/:id/messages/stream, which hydrates the project model with the provider connection and streams SSE exactly like the other OpenAI-shaped providers. Tool calls, the multi-turn loop, usage/cost lines, and prompt-size profiles all work unchanged.

Behavior