Advanced compatibility setup. Claude Code expects Anthropic Messages, which NoMask does not expose directly. Anthropic does not support routing Claude Code to non-Claude models; features and tool behavior can differ through an adapter.
Before you start
- Create a key on the API Keys page and add funds to your API balance.
- Choose a text model with Function calling and streaming on the Models page. Copy its exact model ID.
- Use the connection values below. Replace key placeholders locally; keep secrets out of project files and source control.
Replace
your-model-id throughout the examples with the exact ID of a text model that supports function calling and streaming. Check the Models page for current availability and limits.Install and configure
1. Start a local protocol adapter
Install Python 3.11 or newer. In a dedicated terminal, install the current LiteLLM proxy package:- macOS / Linux / WSL
- Windows PowerShell
nomask-adapter.yaml. The local alias nomask routes to your-model-id; changing models means updating this route and restarting the adapter.
custom_openai/ makes LiteLLM translate requests into Chat Completions. Do not enable native Responses or Messages passthrough: NoMask does not expose those protocols. Unsupported optional fields may be removed by drop_params.
store_prompts_in_spend_logs off. NoMask’s prompt-storage policy is unchanged.
2. Install Claude Code
Open a second terminal and use the installer for your operating system:- macOS / Linux / WSL
- Windows PowerShell
3. Set the connection and model aliases
Merge this into your personal~/.claude/settings.json file (%USERPROFILE%\.claude\settings.json on Windows). Every alias below routes to the same NoMask model configured in the adapter.
NOMASK_GATEWAY_KEY. Clear a conflicting Anthropic key in this terminal:
- macOS / Linux / WSL
- Windows PowerShell
/v1 here: Claude Code appends /v1/messages. Changes to your shell variables require restarting Claude Code.
Launch and test
/status to check the connection, then ask for NOMASK_OK. Next ask it to read the project files and create nomask-test.txt. Review its file actions and check the follow-up response.
Confirm requests appear in API Overview under the actual NoMask model. The nomask name is only a local routing alias.
If an alias fails, make sure all configured aliases still say
nomask and that the adapter is running. Extended thinking, prompt-cache controls and other Claude-specific features are not guaranteed by protocol translation. Use a direct integration if the tool loop fails.Troubleshooting
- 401: check that your key is active and available to the process running the tool. Restart the tool after changing environment variables.
- 402: add funds to your API balance or reduce the requested output.
- 404: check the exact model ID and base URL. Direct connections use Chat Completions, not Responses or Anthropic Messages.
- 429: wait for
Retry-After. API keys share account limits; creating another key does not reset usage. Check the key’s monthly spending cap too. - Context or tool errors: start a shorter task, lower the output limit and confirm the model supports function calling. A plain text reply alone does not confirm file-editing tools work.