MandAPI
English ▾
Coding tools

Create a MandAPI model profile for Junie CLI

Use Junie's custom JSON profiles with a complete Chat Completions request URL.

Use this recipe with your coding assistant

Read the prompt
Help me create a MandAPI custom-model profile for Junie CLI. Inspect the installed version and preserve existing profiles. Use a profile named mandapi with the exact account-visible MODEL_ID, apiType OpenAICompletion, baseUrl https://api.mandapi.com/v1/chat/completions and apiKey ${MANDAPI_API_KEY}. Junie expects the full endpoint URL, not only /v1. Keep the actual key private in the inherited environment. Select custom:mandapi, guide a short read-only README task and check its MandAPI usage. Do not add made-up model limits or Ingrazzio proxy fields. Report the saved profile and how to restore the former model.
TXT

Choose the API format

Junie CLI supports custom model profiles. Choose an account-visible MandAPI model with reliable tool calling for the coding work you need. This recipe uses Chat Completions, not JetBrains' Ingrazzio proxy protocol.

Junie's baseUrl is the complete request URL: it does not append an API path. For OpenAICompletion, use https://api.mandapi.com/v1/chat/completions rather than stopping at /v1.

Create a named profile

Create .junie/models/mandapi.json in your project, or put mandapi.json in your configured $JUNIE_HOME/models directory. Replace MODEL_ID with the exact ID accepted by your account:

json
{
  "displayName": "MandAPI",
  "providerName": "MandAPI",
  "baseUrl": "https://api.mandapi.com/v1/chat/completions",
  "id": "MODEL_ID",
  "apiType": "OpenAICompletion",
  "apiKey": "${MANDAPI_API_KEY}"
}

The filename supplies the profile name. The environment reference keeps a real credential out of the JSON. No helper model override is needed for this starting setup: omitted roles inherit the top-level model.

Supply the key and start

Set MANDAPI_API_KEY privately in the terminal that will launch Junie. In Bash:

bash
read -rsp "MandAPI key: " MANDAPI_API_KEY
printf '\n'
export MANDAPI_API_KEY

Or PowerShell:

powershell
$env:MANDAPI_API_KEY = [Net.NetworkCredential]::new('', (Read-Host 'MandAPI key' -AsSecureString)).Password
bash
junie --model custom:mandapi

Ask for a README summary without changing files. Confirm the selected custom profile and check the corresponding usage in MandAPI before starting a larger coding task.

Fix the precise error

A missing environment variable can prevent the profile loading. A 404 can mean the profile used only a base host instead of the full request path. If the profile is absent, check its filename, JSON syntax and model discovery directory. Repeated malformed tool calls call for checking the model's compatibility, not just increasing retries.

To restore the earlier provider, select it with /model and remove or rename this profile outside the discovery directory.

References

Topics inspired by public documentation; instructions and examples adapted for MandAPI.