Aider CLI Custom Model Configuration

Aider connects to OpenAI-compatible APIs through the LiteLLM's openai/ model prefix.

Configuration

export AIDER_OPENAI_API_BASE="https://hsyunapi.hszl-bd.cn/v1"
export AIDER_OPENAI_API_KEY="$ACEDATACLOUD_API_KEY"
aider --model openai/MODEL_ID

Replace MODEL_ID with the model selected in the Coding configuration wizard. You can also write the corresponding options into a local .env or .aider.conf.yml, but do not submit the real Token.

Verification

aider --model openai/MODEL_ID --message "Reply only OK"

When using an unknown model for the first time, Aider may prompt that model metadata is missing; this is not equivalent to authentication failure. Check Token for 401, check model ID and /v1 Base URL for 404.

Official Reference

Return to Coding Plan Configuration Center.