Skip to main content
MIRA’s provider system is designed for extension. Adding a new provider requires changes to both Python engine files and the TypeScript settings UI.

1. Add the provider constant

In src/shared/constants.ts, add the provider to both engine provider lists:
Also add suggested models:

2. Add credentials to the credential store

MIRA uses Electron’s safeStorage API to store secrets encrypted in credentials.json. API tokens are stored as named entries via the credentials:save-token IPC channel. No changes to src/main/credential-store.ts are needed for a standard API-key provider — the user just adds a new API token entry via Settings → API Tokens using the env var name your engine expects. If your provider needs OAuth or a non-standard credential shape, extend CredentialStore in src/main/credential-store.ts.

3. Implement the NAE Python client

The NAE uses a single LLMClient class in resources/nae_context/llm_client.py. Add a new branch inside the relevant methods (_headers, _chat_payload, stream, complete) for your provider:
Also update NAEConfig in resources/nae_context/nae_types.py to document the new provider name:

4. Implement the RLM Python client (if needed)

For RLM, the provider is handled via boto3 (Bedrock) or LangChain-compatible adapters in resources/rlm_context/. If your provider supports an OpenAI-compatible API endpoint, you may be able to configure it via the base_url override without code changes.

5. Add Python dependencies

Add the provider’s SDK to resources/requirements.txt:

6. Add the settings UI component

Settings components live in src/renderer/src/components/settings/. Create a new component following the pattern of AwsCredentials.tsx or ApiTokens.tsx:
Register the component in EngineSettings.tsx or SettingsModal.tsx depending on whether it’s an engine-level or global provider setting.

7. Write tests

Add provider tests in resources/nae_context/ (manual integration test) and cover the settings component with a renderer test once TypeScript testing is set up.

8. Update docs

Add a new page at docs/configuration/providers/my-provider.mdx following the pattern of the existing provider pages, and add it to the Providers navigation group in docs/docs.json.
Edit this page — Open a pull request