mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat(Anthropic Chat Model Node): Add configurable base URL for Anthropic API (#15063)
This commit is contained in:
@@ -15,8 +15,11 @@ export async function searchModels(
|
||||
this: ILoadOptionsFunctions,
|
||||
filter?: string,
|
||||
): Promise<INodeListSearchResult> {
|
||||
const credentials = await this.getCredentials<{ url?: string }>('anthropicApi');
|
||||
|
||||
const baseURL = credentials.url ?? 'https://api.anthropic.com';
|
||||
const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'anthropicApi', {
|
||||
url: 'https://api.anthropic.com/v1/models',
|
||||
url: `${baseURL}/v1/models`,
|
||||
headers: {
|
||||
'anthropic-version': '2023-06-01',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user