1. Add the provider constant
Insrc/shared/constants.ts, add the provider to both engine provider lists:
2. Add credentials to the credential store
MIRA uses Electron’ssafeStorage 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 singleLLMClient class in resources/nae_context/llm_client.py. Add a new branch inside the relevant methods (_headers, _chat_payload, stream, complete) for your provider:
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 viaboto3 (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 toresources/requirements.txt:
6. Add the settings UI component
Settings components live insrc/renderer/src/components/settings/. Create a new component following the pattern of AwsCredentials.tsx or ApiTokens.tsx:
EngineSettings.tsx or SettingsModal.tsx depending on whether it’s an engine-level or global provider setting.
7. Write tests
Add provider tests inresources/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 atdocs/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