@@ -12,14 +12,14 @@ const http = require('http');
1212const PROVIDER_CONFIG = {
1313 qwen : {
1414 apiKey : process . env . QWEN_API_KEY ,
15- endpoint : process . env . QWEN_API_ENDPOINT ,
16- path : '/v1/chat/completions' ,
15+ endpoint : process . env . QWEN_API_ENDPOINT || 'https://dashscope.aliyuncs.com' ,
16+ path : process . env . QWEN_API_PATH || '/v1/chat/completions' ,
1717 defaultModel : process . env . QWEN_MODEL || 'qwen3-coder-480b-a35b-instruct'
1818 } ,
1919 deepseek : {
20- apiKey : process . env . THETA_API_KEY ,
21- endpoint : process . env . DEEPSEEK_API_ENDPOINT ,
22- path : '/v1/chat/completions' ,
20+ apiKey : process . env . DEEPSEEK_API_KEY ,
21+ endpoint : process . env . DEEPSEEK_API_ENDPOINT || 'https://api.deepseek.com' ,
22+ path : process . env . DEEPSEEK_API_PATH || '/v1/chat/completions' ,
2323 defaultModel : process . env . DEEPSEEK_MODEL || 'DeepSeek-V3.2' ,
2424 extraHeaders : {
2525 'SOFA-TraceId' : process . env . SOFA_TRACE_ID ,
@@ -241,7 +241,8 @@ async function callAI(options) {
241241 headers : {
242242 'Content-Type' : 'application/json' ,
243243 Authorization : `Bearer ${ apiKey } ` ,
244- 'Content-Length' : Buffer . byteLength ( data )
244+ 'Content-Length' : Buffer . byteLength ( data ) ,
245+ ...( config . extraHeaders || { } )
245246 }
246247 } ;
247248
0 commit comments