Skip to content

Feat: allow overriding base URL for Anthropic credentials #14676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idirouhab
Copy link

Summary

This PR updates the AnthropicApi credential type to support overriding the default base URL (https://api.anthropic.com). This change mirrors the existing flexibility of the OpenAiApi credential, allowing users to specify a custom endpoint.

This is particularly useful for testing against mock environments or using enterprise proxies.

How to test

  1. Go to Credentials > Anthropic in n8n.
  2. Enter a custom Base URL (e.g., pointing to a mock server).
  3. Use the “Test” button to verify that the test request is sent to the provided endpoint.

No visual changes in the UI other than the added field.


Related Linear tickets, Github issues, and Community forum posts

N/A – improvement identified internally for consistency with existing OpenAI credential functionality.


Review / Merge checklist

  • PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md))
  • [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Let me know if there's a Linear ticket you want to include or if you want help writing a test for this.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@idirouhab idirouhab changed the title feat: allow overriding base URL for Anthropic credentials Feat: allow overriding base URL for Anthropic credentials Apr 16, 2025
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants