Skip to content

Ability to use Claude Code with 3rd party provider #1144

Description

@CyborTronik

Type

Missing documentation

Location

.claude_settings.json with openrouter

Description

In order to use the Claude Code with a 3rd party provider (not submitting to the max subscription), the Auto Claude generates its own file during the first task execution for the claude settings in the root of the project with the name .claude_settings.json, in it you can change the provider as you would do with the standard Claude Code change. An example with settings for openrouter is provided below:

  "env": {
    "ANTHROPIC_BASE_URL": "https://openrouter.ai/api",
    "ANTHROPIC_AUTH_TOKEN": "<your openrouter api key here>",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "openai/gpt-5.1-codex-max",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "openrouter/auto",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "minimax/minimax-m2.1"
  },

Note: A strange behaviour of Auto Claude has been observed, from time to time it fully overrides this setting file, instead of adjusting certain fields in it. For a better stability this might be needed improved. Other than that seems to be a quite good option to work with providers and models outside of the Claude Code.

Contribution

  • I'm willing to submit a PR for this

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedWe need help with thisneeds-triageNew issue, maintainer review needed

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions