Skip to content

Feature Request: Support custom Anthropic base URL (ANTHROPIC_BASE_URL) #1067

@rajpopat27

Description

@rajpopat27

Feature Request

Problem
There is no way to configure a custom Anthropic base URL.
Users running local LLM gateways (e.g. Bifrost, LiteLLM) that expose
an Anthropic-compatible endpoint cannot use them as a drop-in replacement.

Requested Change
Add support for an ANTHROPIC_BASE_URL environment variable (similar to
how OPENAI_BASE_URL is supported) so users can point the Anthropic
provider to a custom endpoint.

Expected Behavior
Setting:
ANTHROPIC_BASE_URL=http://my-gateway:8080/anthropic

...should route all Anthropic API calls to that endpoint instead of
https://api.anthropic.com

Use Case

  • Local LLM gateways (Bifrost, LiteLLM, etc.)
  • Corporate proxies
  • Self-hosted Anthropic-compatible endpoints

Workaround
Currently forced to use the Custom OpenAI provider which has
JSON parsing issues with Claude models wrapping responses in markdown fences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions