feat: support dual protocols (OpenAI/Anthropic) for custom providers (#389)
This commit is contained in:
committed by
GitHub
Unverified
parent
80e89ddc5c
commit
99681777a0
8
test-anthropic.js
Normal file
8
test-anthropic.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const { Anthropic } = require('@anthropic-ai/sdk');
|
||||
const client = new Anthropic({ apiKey: 'test', baseURL: 'https://api.minimaxi.com/anthropic' });
|
||||
const req = client.buildRequest({ method: 'post', path: '/messages', body: {} });
|
||||
console.log('Build Request URL 1:', req.url);
|
||||
|
||||
const client2 = new Anthropic({ apiKey: 'test', baseURL: 'https://api.minimaxi.com/anthropic/v1' });
|
||||
const req2 = client2.buildRequest({ method: 'post', path: '/messages', body: {} });
|
||||
console.log('Build Request URL 2:', req2.url);
|
||||
Reference in New Issue
Block a user