@juspay/neurolink 9.69.2 → 9.69.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [9.69.3](https://github.com/juspay/neurolink/compare/v9.69.2...v9.69.3) (2026-06-08)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(providers):** prevent unhandled auth rejection from unused AnthropicVertex client ([b2d8b25](https://github.com/juspay/neurolink/commit/b2d8b2568729e6ccf02cbe4266c450aeb1fe4e37))
6
+
1
7
  ## [9.69.2](https://github.com/juspay/neurolink/compare/v9.69.1...v9.69.2) (2026-06-07)
2
8
 
3
9
  ## [9.69.1](https://github.com/juspay/neurolink/compare/v9.69.0...v9.69.1) (2026-06-07)
@@ -1215,7 +1215,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
1215
1215
 
1216
1216
  IMPORTANT: When you have gathered all necessary information and are ready to provide your final answer, you MUST call the 'final_result' tool with the structured data. Do not return the final answer as plain text - always use the final_result tool.`),f&&(m.systemInstruction=f);let h=EO(e.thinkingConfig);if(h&&(m.thinkingConfig=h),(u.output?.format==="json"||u.schema)&&!d&&!c&&(m.responseMimeType="application/json",u.schema)){let B=Es(u.schema,"openApi3"),V=ln(B);V.$schema&&delete V.$schema;let q=ws(V);m.responseSchema=q,g.debug("[GoogleVertex] Added responseSchema for JSON output (stream)",{schemaKeys:Object.keys(q)})}let y=Date.now(),x=e.maxSteps||ts,b=Number.isFinite(x)&&x>0?Math.min(Math.floor(x),100):Math.min(ts,100),T=[...s],w="",_="",C=[],k=[],I=0,A,R=new Map,P=0,D=0,z=[];for(;I<b;){I++,g.debug(`[GoogleVertex] Native SDK step ${I}/${b}`);try{let B=await o.models.generateContentStream({model:t,contents:T,config:m}),V=[],q=[];for await(let K of B){let Ae=K,re=Ae.candidates?.[0]?.content;if(re&&Array.isArray(re.parts))for(let se of re.parts)q.push(se),typeof se.text=="string"&&se.text.length>0&&z.push(se.text);K.functionCalls&&V.push(...K.functionCalls);let Z=Ae.usageMetadata;Z&&(Z.promptTokenCount!==void 0&&Z.promptTokenCount>0&&(P=Z.promptTokenCount),Z.candidatesTokenCount!==void 0&&Z.candidatesTokenCount>0&&(D=Z.candidatesTokenCount))}let X=q.filter(K=>typeof K.text=="string").map(K=>K.text).join("");if(V.length===0){w=X;break}if(d){let K=V.find(Ae=>Ae.name==="final_result");if(K){A=K.args,g.debug("[GoogleVertex] Received final_result tool call with structured output (stream)",{outputKeys:Object.keys(A)}),w=JSON.stringify(A);break}}_=X,g.debug(`[GoogleVertex] Executing ${V.length} function calls`),T.push({role:"model",parts:q.length>0?q:V.map(K=>({functionCall:K}))});let ge=[],te=[],ve=[];for(let K of V){C.push({toolName:K.name,args:K.args}),te.push({toolName:K.name,args:K.args});let Ae=R.get(K.name);if(Ae&&Ae.count>=rs){g.warn(`[GoogleVertex] Tool "${K.name}" has exceeded retry limit (${rs}), skipping execution`);let ye={error:`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Ae.count} times and will not be retried. Last error: ${Ae.lastError}. Please proceed without using this tool or inform the user that this functionality is unavailable.`,status:"permanently_failed",do_not_retry:!0};ge.push({functionResponse:{name:K.name,response:ye}}),k.push({name:K.name,input:K.args,output:ye}),ve.push({toolName:K.name,output:ye});continue}let Ie=l.get(K.name);if(Ie)try{let ye={toolCallId:`${K.name}-${Date.now()}`,messages:[],abortSignal:void 0},re=await Ie(K.args,ye);k.push({name:K.name,input:K.args,output:re}),ge.push({functionResponse:{name:K.name,response:{result:re}}}),ve.push({toolName:K.name,output:re})}catch(ye){let re=ye instanceof Error?ye.message:"Unknown error",Z=R.get(K.name)||{count:0,lastError:""};Z.count++,Z.lastError=re,R.set(K.name,Z),g.warn(`[GoogleVertex] Tool "${K.name}" failed (attempt ${Z.count}/${rs}): ${re}`);let se=Z.count>=rs,ee={error:se?`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Z.count} times with error: ${re}. This tool will not be retried. Please proceed without using this tool or inform the user that this functionality is unavailable.`:`TOOL_EXECUTION_ERROR: ${re}. Retry attempt ${Z.count}/${rs}.`,status:se?"permanently_failed":"failed",do_not_retry:se,retry_count:Z.count,max_retries:rs};ge.push({functionResponse:{name:K.name,response:ee}}),k.push({name:K.name,input:K.args,output:ee}),ve.push({toolName:K.name,output:ee})}else{let ye={error:`TOOL_NOT_FOUND: The tool "${K.name}" does not exist. Do not attempt to call this tool again.`,status:"permanently_failed",do_not_retry:!0};ge.push({functionResponse:{name:K.name,response:ye}}),k.push({name:K.name,input:K.args,output:ye}),ve.push({toolName:K.name,output:ye})}}if(te.length>0||ve.length>0){let K=b_(q);Xt(this.handleToolExecutionStorage(te.map((Ae,Ie)=>({...Ae,...Ie===0&&K?{thoughtSignature:K}:{},stepIndex:I})),ve.map(Ae=>({...Ae,stepIndex:I})),e,new Date),bf,"tool storage write timed out").catch(Ae=>{g.warn("[GoogleVertex] Failed to store native Gemini stream tool executions",{error:Ae instanceof Error?Ae.message:String(Ae)})})}T.push({role:"user",parts:ge})}catch(B){throw g.error("[GoogleVertex] Native SDK error",B),this.handleProviderError(B)}}I>=b&&!w&&(g.warn(`[GoogleVertex] Tool call loop terminated after reaching maxSteps (${b}). Model was still calling tools. Using accumulated text from last step.`),w=_||`[Tool execution limit reached after ${b} steps. The model continued requesting tool calls beyond the limit.]`);let M=Date.now()-y,L=A?[w]:z.length>0?z:[w];async function*N(){for(let B of L)B.length>0&&(yield{content:B})}let $=C.filter(B=>B.toolName!=="final_result"),U=k.filter(B=>B.name!=="final_result"),j={stream:N(),provider:this.providerName,model:t,usage:{input:P,output:D,total:P+D},toolCalls:$.map(B=>({toolName:B.toolName,args:B.args})),toolsUsed:$.map(B=>B.toolName),toolExecutions:qu(U),metadata:{streamId:`native-vertex-${Date.now()}`,startTime:y,responseTime:M,totalToolExecutions:$.length}};return A&&(j.structuredOutput=A),j}async executeNativeGemini3Generate(e){let t=e.model||this.modelName||Yb(),n=D4(t,e.region),o=await this.createVertexGenAIClient(n);g.debug("[GoogleVertex] Using native @google/genai for Gemini 3 generate",{model:t,project:this.projectId,location:n});let s=e.input?.text||e.prompt||"Please respond.",i=[],a=[{text:s}],c=e.input;if(c?.pdfFiles&&c.pdfFiles.length>0){g.debug(`[GoogleVertex] Processing ${c.pdfFiles.length} PDF file(s) for native generate`);for(let U of c.pdfFiles){let j;typeof U=="string"?Br.existsSync(U)?j=Br.readFileSync(U):j=Buffer.from(U,"base64"):j=U;let B=j.toString("base64");a.push({inlineData:{mimeType:"application/pdf",data:B}})}}if(c?.images&&c.images.length>0){g.debug(`[GoogleVertex] Processing ${c.images.length} image(s) for native generate`);for(let U of c.images){let j,B="image/jpeg";if(typeof U=="string")if(Br.existsSync(U)){j=Br.readFileSync(U);let q=tc.extname(U).toLowerCase();q===".png"?B="image/png":q===".gif"?B="image/gif":q===".webp"&&(B="image/webp")}else if(U.startsWith("data:")){let q=U.match(/^data:([^;]+);base64,(.+)$/);if(q)B=q[1],j=Buffer.from(q[2],"base64");else continue}else if(U.startsWith("http://")||U.startsWith("https://"))try{let q=await fetch(U);if(!q.ok){g.warn(`[GoogleVertex] Image fetch failed: ${q.status} ${q.statusText}, skipping`,{url:U});continue}let X=await q.arrayBuffer();j=Buffer.from(X);let ge=q.headers.get("content-type");ge&&ge.startsWith("image/")&&(B=ge.split(";")[0])}catch(q){g.warn(`[GoogleVertex] Image URL fetch threw, skipping: ${q instanceof Error?q.message:String(q)}`,{url:U});continue}else j=Buffer.from(U,"base64");else j=U;let V=j.toString("base64");a.push({inlineData:{mimeType:B,data:V}})}}T_(i,e.conversationMessages),i.push({role:"user",parts:a});let l=e.disableTools?{}:e.tools||{},u,d=new Map;if(Object.keys(l).length>0){let U=[];for(let[j,B]of Object.entries(l)){let V={name:j,description:B.description||`Tool: ${j}`},X=B.parameters||B.inputSchema;if(X){let ge=Es(X,"openApi3"),te=ln(ge);te.$schema&&delete te.$schema;let ve=ws(te);S0(ve),V.parametersJsonSchema=ve}U.push(V),B.execute&&d.set(j,B.execute)}u=[{functionDeclarations:U}],g.debug("[GoogleVertex] Converted tools for native SDK generate",{toolCount:U.length,toolNames:U.map(j=>j.name)})}let m=!1;if(e.schema&&u){m=!0;let U=Es(e.schema,"openApi3"),j=ln(U);j.$schema&&delete j.$schema;let B=ws(j),V=u[0]?.functionDeclarations||[];V.push({name:"final_result",description:"Return the final structured result. You MUST call this tool when you have gathered all information and are ready to provide the final answer. The arguments should contain the structured data matching the expected schema.",parametersJsonSchema:B}),u=[{functionDeclarations:V}],g.debug("[GoogleVertex] Added final_result tool for structured output with tools (generate)",{schemaKeys:Object.keys(B),totalTools:V.length})}let f={temperature:e.temperature??1,maxOutputTokens:e.maxTokens};gO(t)&&(f.maxOutputTokens&&f.maxOutputTokens>Dc&&(g.warn(`[GoogleVertex] Capping maxOutputTokens from ${f.maxOutputTokens} to ${Dc} for ${t}`),f.maxOutputTokens=Dc),f.maxOutputTokens||(f.maxOutputTokens=Dc)),e.topP!==void 0&&(f.topP=e.topP),e.topK!==void 0&&(f.topK=e.topK),e.stopSequences&&e.stopSequences.length>0&&(f.stopSequences=e.stopSequences),u&&(f.tools=u);let h=e.systemPrompt||"";m&&(h=h+`
1217
1217
 
1218
- IMPORTANT: When you have gathered all necessary information and are ready to provide your final answer, you MUST call the 'final_result' tool with the structured data. Do not return the final answer as plain text - always use the final_result tool.`),h&&(f.systemInstruction=h);let y=EO(e.thinkingConfig);if(y&&(f.thinkingConfig=y),(e.output?.format==="json"||e.schema)&&!m&&!u&&(f.responseMimeType="application/json",e.schema)){let U=Es(e.schema,"openApi3"),j=ln(U);j.$schema&&delete j.$schema;let B=ws(j);f.responseSchema=B,g.debug("[GoogleVertex] Added responseSchema for JSON output (generate)",{schemaKeys:Object.keys(B)})}let x=Date.now(),b=e.maxSteps||ts,T=Number.isFinite(b)&&b>0?Math.min(Math.floor(b),100):Math.min(ts,100),w=[...i],_="",C="",k=[],I=[],A=0,R,P=new Map,D=0,z=0;for(;A<T;){A++,g.debug(`[GoogleVertex] Native SDK generate step ${A}/${T}`);try{let U=await o.models.generateContentStream({model:t,contents:w,config:f}),j=[],B=[];for await(let K of U){let Ae=K,re=Ae.candidates?.[0]?.content;re&&Array.isArray(re.parts)&&B.push(...re.parts),K.functionCalls&&j.push(...K.functionCalls);let Z=Ae.usageMetadata;Z&&(Z.promptTokenCount!==void 0&&Z.promptTokenCount>0&&(D=Z.promptTokenCount),Z.candidatesTokenCount!==void 0&&Z.candidatesTokenCount>0&&(z=Z.candidatesTokenCount))}let V=B.filter(K=>typeof K.text=="string").map(K=>K.text).join("");if(j.length===0){_=V;break}if(m){let K=j.find(Ae=>Ae.name==="final_result");if(K){R=K.args,g.debug("[GoogleVertex] Received final_result tool call with structured output (generate)",{outputKeys:Object.keys(R)}),_=JSON.stringify(R);break}}C=V,g.debug(`[GoogleVertex] Generate executing ${j.length} function calls`),w.push({role:"model",parts:B.length>0?B:j.map(K=>({functionCall:K}))});let q=[],X=k.length,ge=I.length;for(let K of j){k.push({toolName:K.name,args:K.args});let Ae=P.get(K.name);if(Ae&&Ae.count>=rs){g.warn(`[GoogleVertex] Tool "${K.name}" has exceeded retry limit (${rs}), skipping execution`);let ye={error:`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Ae.count} times and will not be retried. Last error: ${Ae.lastError}. Please proceed without using this tool or inform the user that this functionality is unavailable.`,status:"permanently_failed",do_not_retry:!0};I.push({name:K.name,input:K.args,output:ye}),q.push({functionResponse:{name:K.name,response:ye}});continue}let Ie=d.get(K.name);if(Ie)try{let ye={toolCallId:`${K.name}-${Date.now()}`,messages:[],abortSignal:void 0},re=await Ie(K.args,ye);I.push({name:K.name,input:K.args,output:re}),q.push({functionResponse:{name:K.name,response:{result:re}}})}catch(ye){let re=ye instanceof Error?ye.message:"Unknown error",Z=P.get(K.name)||{count:0,lastError:""};Z.count++,Z.lastError=re,P.set(K.name,Z),g.warn(`[GoogleVertex] Tool "${K.name}" failed (attempt ${Z.count}/${rs}): ${re}`);let se=Z.count>=rs,ee={error:se?`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Z.count} times with error: ${re}. This tool will not be retried. Please proceed without using this tool or inform the user that this functionality is unavailable.`:`TOOL_EXECUTION_ERROR: ${re}. Retry attempt ${Z.count}/${rs}.`,status:se?"permanently_failed":"failed",do_not_retry:se,retry_count:Z.count,max_retries:rs};I.push({name:K.name,input:K.args,output:ee}),q.push({functionResponse:{name:K.name,response:ee}})}else{let ye={error:`TOOL_NOT_FOUND: The tool "${K.name}" does not exist. Do not attempt to call this tool again.`,status:"permanently_failed",do_not_retry:!0};I.push({name:K.name,input:K.args,output:ye}),q.push({functionResponse:{name:K.name,response:ye}})}}let te=k.slice(X),ve=I.slice(ge);if(te.length>0||ve.length>0){let K=b_(B);Xt(this.handleToolExecutionStorage(te.map((Ae,Ie)=>({toolName:Ae.toolName,args:Ae.args,...Ie===0&&K?{thoughtSignature:K}:{},stepIndex:A})),ve.map(Ae=>({toolName:Ae.name,output:Ae.output,stepIndex:A})),e,new Date),bf,"tool storage write timed out").catch(Ae=>{g.warn("[GoogleVertex] Failed to store native Gemini generate tool executions",{error:Ae instanceof Error?Ae.message:String(Ae)})})}w.push({role:"user",parts:q})}catch(U){throw g.error("[GoogleVertex] Native SDK generate error",U),this.handleProviderError(U)}}A>=T&&!_&&(g.warn(`[GoogleVertex] Generate tool call loop terminated after reaching maxSteps (${T}). Model was still calling tools. Using accumulated text from last step.`),_=C||`[Tool execution limit reached after ${T} steps. The model continued requesting tool calls beyond the limit.]`);let M=Date.now()-x,L=k.filter(U=>U.toolName!=="final_result"),N=I.filter(U=>U.name!=="final_result"),$={content:_,provider:this.providerName,model:t,usage:{input:D,output:z,total:D+z},responseTime:M,toolsUsed:L.map(U=>U.toolName),toolExecutions:qu(N),enhancedWithTools:L.length>0};return R&&($.structuredOutput=R),this.enhanceResult($,e,x)}async createAnthropicVertexClient(e){let t=await zlr(),n=await Hlr(this.location,e);return new t.AnthropicVertex(n)}async executeNativeAnthropicStream(e){let t=e.model||this.modelName||"claude-sonnet-4-5@20250929",n=Date.now(),o=rm(e.timeout)??3e5,s=await this.createAnthropicVertexClient(o);g.debug("[GoogleVertex] Using native @anthropic-ai/vertex-sdk for Claude stream",{model:t,project:this.projectId,location:this.location});let i=[];if(e.conversationMessages&&e.conversationMessages.length>0)for(let M of e.conversationMessages)(M.role==="user"||M.role==="assistant")&&i.push({role:M.role,content:typeof M.content=="string"?M.content:JSON.stringify(M.content)});let a=e.input,c=[];if(a?.pdfFiles&&a.pdfFiles.length>0){g.debug(`[GoogleVertex] Processing ${a.pdfFiles.length} PDF file(s) for native Anthropic stream`);for(let M of a.pdfFiles){let L;typeof M=="string"?Br.existsSync(M)?L=Br.readFileSync(M):L=Buffer.from(M,"base64"):L=M;let N=L.toString("base64");c.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:N}})}}if(a?.images&&a.images.length>0){g.debug(`[GoogleVertex] Processing ${a.images.length} image(s) for native Anthropic stream`);for(let M of a.images){let L,N="image/jpeg";if(typeof M=="string")if(Br.existsSync(M)){L=Br.readFileSync(M);let U=tc.extname(M).toLowerCase();U===".png"?N="image/png":U===".gif"?N="image/gif":U===".webp"&&(N="image/webp")}else if(M.startsWith("data:")){let U=M.match(/^data:([^;]+);base64,(.+)$/);if(U)N=U[1],L=Buffer.from(U[2],"base64");else continue}else if(M.startsWith("http://")||M.startsWith("https://"))try{let U=await fetch(M);if(!U.ok){g.warn(`[GoogleVertex] Image fetch failed: ${U.status} ${U.statusText}, skipping`,{url:M});continue}let j=await U.arrayBuffer();L=Buffer.from(j);let B=U.headers.get("content-type");B&&B.startsWith("image/")&&(N=B.split(";")[0])}catch(U){g.warn(`[GoogleVertex] Image URL fetch threw, skipping: ${U instanceof Error?U.message:String(U)}`,{url:M});continue}else L=Buffer.from(M,"base64");else L=M;let $=L.toString("base64");c.push({type:"image",source:{type:"base64",media_type:N,data:$}})}}c.push({type:"text",text:a.text}),i.push({role:"user",content:c.length===1&&c[0].type==="text"?a.text:c});let l,u=new Map;if(e.tools&&Object.keys(e.tools).length>0&&!e.disableTools){l=[];for(let[M,L]of Object.entries(e.tools)){let N={name:M,description:L.description||`Tool: ${M}`,input_schema:{type:"object"}},U=L.parameters||L.inputSchema;if(U){let j=Es(U,"openApi3"),B=ln(j);N.input_schema={type:"object",properties:B.properties||{},required:B.required||[]}}l.push(N),L.execute&&u.set(M,L.execute)}g.debug("[GoogleVertex] Converted tools for native Anthropic SDK",{toolCount:l.length,toolNames:l.map(M=>M.name)})}let d=e,m=!1,f="";if(d.schema){m=!0;let M=Es(d.schema,"openApi3"),L=ln(M);L.$schema&&delete L.$schema;let N=ws(L),$={name:"final_result",description:"Return the final structured result. You MUST call this tool when you have gathered all information and are ready to provide the final answer. The arguments should contain the structured data matching the expected schema.",input_schema:{type:"object",properties:N.properties||N,required:N.required||[]}};l||(l=[]),l.push($),f=`
1218
+ IMPORTANT: When you have gathered all necessary information and are ready to provide your final answer, you MUST call the 'final_result' tool with the structured data. Do not return the final answer as plain text - always use the final_result tool.`),h&&(f.systemInstruction=h);let y=EO(e.thinkingConfig);if(y&&(f.thinkingConfig=y),(e.output?.format==="json"||e.schema)&&!m&&!u&&(f.responseMimeType="application/json",e.schema)){let U=Es(e.schema,"openApi3"),j=ln(U);j.$schema&&delete j.$schema;let B=ws(j);f.responseSchema=B,g.debug("[GoogleVertex] Added responseSchema for JSON output (generate)",{schemaKeys:Object.keys(B)})}let x=Date.now(),b=e.maxSteps||ts,T=Number.isFinite(b)&&b>0?Math.min(Math.floor(b),100):Math.min(ts,100),w=[...i],_="",C="",k=[],I=[],A=0,R,P=new Map,D=0,z=0;for(;A<T;){A++,g.debug(`[GoogleVertex] Native SDK generate step ${A}/${T}`);try{let U=await o.models.generateContentStream({model:t,contents:w,config:f}),j=[],B=[];for await(let K of U){let Ae=K,re=Ae.candidates?.[0]?.content;re&&Array.isArray(re.parts)&&B.push(...re.parts),K.functionCalls&&j.push(...K.functionCalls);let Z=Ae.usageMetadata;Z&&(Z.promptTokenCount!==void 0&&Z.promptTokenCount>0&&(D=Z.promptTokenCount),Z.candidatesTokenCount!==void 0&&Z.candidatesTokenCount>0&&(z=Z.candidatesTokenCount))}let V=B.filter(K=>typeof K.text=="string").map(K=>K.text).join("");if(j.length===0){_=V;break}if(m){let K=j.find(Ae=>Ae.name==="final_result");if(K){R=K.args,g.debug("[GoogleVertex] Received final_result tool call with structured output (generate)",{outputKeys:Object.keys(R)}),_=JSON.stringify(R);break}}C=V,g.debug(`[GoogleVertex] Generate executing ${j.length} function calls`),w.push({role:"model",parts:B.length>0?B:j.map(K=>({functionCall:K}))});let q=[],X=k.length,ge=I.length;for(let K of j){k.push({toolName:K.name,args:K.args});let Ae=P.get(K.name);if(Ae&&Ae.count>=rs){g.warn(`[GoogleVertex] Tool "${K.name}" has exceeded retry limit (${rs}), skipping execution`);let ye={error:`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Ae.count} times and will not be retried. Last error: ${Ae.lastError}. Please proceed without using this tool or inform the user that this functionality is unavailable.`,status:"permanently_failed",do_not_retry:!0};I.push({name:K.name,input:K.args,output:ye}),q.push({functionResponse:{name:K.name,response:ye}});continue}let Ie=d.get(K.name);if(Ie)try{let ye={toolCallId:`${K.name}-${Date.now()}`,messages:[],abortSignal:void 0},re=await Ie(K.args,ye);I.push({name:K.name,input:K.args,output:re}),q.push({functionResponse:{name:K.name,response:{result:re}}})}catch(ye){let re=ye instanceof Error?ye.message:"Unknown error",Z=P.get(K.name)||{count:0,lastError:""};Z.count++,Z.lastError=re,P.set(K.name,Z),g.warn(`[GoogleVertex] Tool "${K.name}" failed (attempt ${Z.count}/${rs}): ${re}`);let se=Z.count>=rs,ee={error:se?`TOOL_PERMANENTLY_FAILED: The tool "${K.name}" has failed ${Z.count} times with error: ${re}. This tool will not be retried. Please proceed without using this tool or inform the user that this functionality is unavailable.`:`TOOL_EXECUTION_ERROR: ${re}. Retry attempt ${Z.count}/${rs}.`,status:se?"permanently_failed":"failed",do_not_retry:se,retry_count:Z.count,max_retries:rs};I.push({name:K.name,input:K.args,output:ee}),q.push({functionResponse:{name:K.name,response:ee}})}else{let ye={error:`TOOL_NOT_FOUND: The tool "${K.name}" does not exist. Do not attempt to call this tool again.`,status:"permanently_failed",do_not_retry:!0};I.push({name:K.name,input:K.args,output:ye}),q.push({functionResponse:{name:K.name,response:ye}})}}let te=k.slice(X),ve=I.slice(ge);if(te.length>0||ve.length>0){let K=b_(B);Xt(this.handleToolExecutionStorage(te.map((Ae,Ie)=>({toolName:Ae.toolName,args:Ae.args,...Ie===0&&K?{thoughtSignature:K}:{},stepIndex:A})),ve.map(Ae=>({toolName:Ae.name,output:Ae.output,stepIndex:A})),e,new Date),bf,"tool storage write timed out").catch(Ae=>{g.warn("[GoogleVertex] Failed to store native Gemini generate tool executions",{error:Ae instanceof Error?Ae.message:String(Ae)})})}w.push({role:"user",parts:q})}catch(U){throw g.error("[GoogleVertex] Native SDK generate error",U),this.handleProviderError(U)}}A>=T&&!_&&(g.warn(`[GoogleVertex] Generate tool call loop terminated after reaching maxSteps (${T}). Model was still calling tools. Using accumulated text from last step.`),_=C||`[Tool execution limit reached after ${T} steps. The model continued requesting tool calls beyond the limit.]`);let M=Date.now()-x,L=k.filter(U=>U.toolName!=="final_result"),N=I.filter(U=>U.name!=="final_result"),$={content:_,provider:this.providerName,model:t,usage:{input:D,output:z,total:D+z},responseTime:M,toolsUsed:L.map(U=>U.toolName),toolExecutions:qu(N),enhancedWithTools:L.length>0};return R&&($.structuredOutput=R),this.enhanceResult($,e,x)}async createAnthropicVertexClient(e){let t=await zlr(),n=await Hlr(this.location,e),o=new t.AnthropicVertex(n);return o._authClientPromise?.catch(()=>{}),o}async executeNativeAnthropicStream(e){let t=e.model||this.modelName||"claude-sonnet-4-5@20250929",n=Date.now(),o=rm(e.timeout)??3e5,s=await this.createAnthropicVertexClient(o);g.debug("[GoogleVertex] Using native @anthropic-ai/vertex-sdk for Claude stream",{model:t,project:this.projectId,location:this.location});let i=[];if(e.conversationMessages&&e.conversationMessages.length>0)for(let M of e.conversationMessages)(M.role==="user"||M.role==="assistant")&&i.push({role:M.role,content:typeof M.content=="string"?M.content:JSON.stringify(M.content)});let a=e.input,c=[];if(a?.pdfFiles&&a.pdfFiles.length>0){g.debug(`[GoogleVertex] Processing ${a.pdfFiles.length} PDF file(s) for native Anthropic stream`);for(let M of a.pdfFiles){let L;typeof M=="string"?Br.existsSync(M)?L=Br.readFileSync(M):L=Buffer.from(M,"base64"):L=M;let N=L.toString("base64");c.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:N}})}}if(a?.images&&a.images.length>0){g.debug(`[GoogleVertex] Processing ${a.images.length} image(s) for native Anthropic stream`);for(let M of a.images){let L,N="image/jpeg";if(typeof M=="string")if(Br.existsSync(M)){L=Br.readFileSync(M);let U=tc.extname(M).toLowerCase();U===".png"?N="image/png":U===".gif"?N="image/gif":U===".webp"&&(N="image/webp")}else if(M.startsWith("data:")){let U=M.match(/^data:([^;]+);base64,(.+)$/);if(U)N=U[1],L=Buffer.from(U[2],"base64");else continue}else if(M.startsWith("http://")||M.startsWith("https://"))try{let U=await fetch(M);if(!U.ok){g.warn(`[GoogleVertex] Image fetch failed: ${U.status} ${U.statusText}, skipping`,{url:M});continue}let j=await U.arrayBuffer();L=Buffer.from(j);let B=U.headers.get("content-type");B&&B.startsWith("image/")&&(N=B.split(";")[0])}catch(U){g.warn(`[GoogleVertex] Image URL fetch threw, skipping: ${U instanceof Error?U.message:String(U)}`,{url:M});continue}else L=Buffer.from(M,"base64");else L=M;let $=L.toString("base64");c.push({type:"image",source:{type:"base64",media_type:N,data:$}})}}c.push({type:"text",text:a.text}),i.push({role:"user",content:c.length===1&&c[0].type==="text"?a.text:c});let l,u=new Map;if(e.tools&&Object.keys(e.tools).length>0&&!e.disableTools){l=[];for(let[M,L]of Object.entries(e.tools)){let N={name:M,description:L.description||`Tool: ${M}`,input_schema:{type:"object"}},U=L.parameters||L.inputSchema;if(U){let j=Es(U,"openApi3"),B=ln(j);N.input_schema={type:"object",properties:B.properties||{},required:B.required||[]}}l.push(N),L.execute&&u.set(M,L.execute)}g.debug("[GoogleVertex] Converted tools for native Anthropic SDK",{toolCount:l.length,toolNames:l.map(M=>M.name)})}let d=e,m=!1,f="";if(d.schema){m=!0;let M=Es(d.schema,"openApi3"),L=ln(M);L.$schema&&delete L.$schema;let N=ws(L),$={name:"final_result",description:"Return the final structured result. You MUST call this tool when you have gathered all information and are ready to provide the final answer. The arguments should contain the structured data matching the expected schema.",input_schema:{type:"object",properties:N.properties||N,required:N.required||[]}};l||(l=[]),l.push($),f=`
1219
1219
 
1220
1220
  IMPORTANT: You MUST call the 'final_result' tool to return your response in the required structured format. Do not respond with plain text - always use the final_result tool.`,g.debug("[GoogleVertex] Added final_result tool for Anthropic structured output (stream)",{schemaKeys:Object.keys(N),totalTools:l.length})}let h=e.systemPrompt?e.systemPrompt+f:f?f.trim():void 0,y={model:t,max_tokens:e.maxTokens||4096,messages:i,...l&&l.length>0&&{tools:l},...m&&{tool_choice:{type:"any"}},...h&&{system:h},...e.temperature!==void 0&&{temperature:e.temperature},...e.topP!==void 0&&{top_p:e.topP},...e.stopSequences&&e.stopSequences.length>0&&{stop_sequences:e.stopSequences}},x=e.maxSteps||ts,b=[],T=[],w=lV(),_={input:0,output:0,total:0},C={streamId:`native-anthropic-vertex-${Date.now()}`,startTime:n,responseTime:0,totalToolExecutions:0},k=[],I={},A,R=()=>{try{A?.controller.abort()}catch{}};e.abortSignal?.addEventListener("abort",R);let P=setTimeout(()=>{g.warn(`[GoogleVertex] Anthropic stream exceeded ${o}ms \u2014 aborting`),R()},o);(async()=>{let M=0,L=[...i];try{for(;M<x;){if(e.abortSignal?.aborted)throw new Error("Stream aborted by caller");M++;let N=await s.messages.stream({...y,messages:L});A=N,N.on("text",X=>{X.length>0&&w.push(X)});let $=await N.finalMessage();A=void 0,_.input+=$.usage?.input_tokens||0,_.output+=$.usage?.output_tokens||0,_.total=_.input+_.output;let U=$.content.filter(X=>X.type==="tool_use");if(m){let X=U.find(ge=>ge.name==="final_result");if(X){I.value=X.input,w.push(JSON.stringify(X.input)),g.debug("[GoogleVertex] Extracted structured output from final_result tool (stream)",{keys:Object.keys(X.input)});break}}if(U.length===0)break;let j=[],B=[],V=[];for(let X of U){b.push({toolName:X.name,args:X.input}),k.push(X.name),B.push({toolCallId:X.id,toolName:X.name,args:X.input});let ge=u.get(X.name);if(ge)try{let te={toolCallId:X.id,messages:[],abortSignal:e.abortSignal},ve=await ge(X.input,te);T.push({name:X.name,input:X.input,output:ve});let K=typeof ve=="string"?ve:JSON.stringify(ve??null)??String(ve);j.push({type:"tool_result",tool_use_id:X.id,content:K}),V.push({toolCallId:X.id,toolName:X.name,output:ve})}catch(te){let ve=`Error executing tool "${X.name}": ${te instanceof Error?te.message:String(te)}`,K={error:ve};T.push({name:X.name,input:X.input,output:K}),j.push({type:"tool_result",tool_use_id:X.id,content:ve}),V.push({toolCallId:X.id,toolName:X.name,output:K})}else{let te=`TOOL_NOT_FOUND: The tool "${X.name}" does not exist.`,ve={error:te};T.push({name:X.name,input:X.input,output:ve}),j.push({type:"tool_result",tool_use_id:X.id,content:te}),V.push({toolCallId:X.id,toolName:X.name,output:ve})}}(B.length>0||V.length>0)&&Xt(this.handleToolExecutionStorage(B.map(X=>({...X,stepIndex:M})),V.map(X=>({...X,stepIndex:M})),e,new Date),bf,"tool storage write timed out").catch(X=>{g.warn("[GoogleVertex] Failed to store native Anthropic stream tool executions",{error:X instanceof Error?X.message:String(X)})});let q=$.content.filter(X=>X.type!=="server_tool_use");L.push({role:"assistant",content:q}),L.push({role:"user",content:j})}C.responseTime=Date.now()-n,C.totalToolExecutions=b.filter(N=>N.toolName!=="final_result").length,w.close()}catch(N){g.error("[GoogleVertex] Native Anthropic SDK stream error",N),w.error(this.handleProviderError(N))}finally{e.abortSignal?.removeEventListener("abort",R),clearTimeout(P)}})().catch(()=>{});let z={stream:w.iterable,provider:this.providerName,model:t,usage:_,metadata:C};return Object.defineProperty(z,"toolCalls",{enumerable:!0,configurable:!0,get:()=>b.filter(M=>M.toolName!=="final_result")}),Object.defineProperty(z,"toolsUsed",{enumerable:!0,configurable:!0,get:()=>k.filter(M=>M!=="final_result")}),Object.defineProperty(z,"toolExecutions",{enumerable:!0,configurable:!0,get:()=>qu(T.filter(M=>M.name!=="final_result"))}),Object.defineProperty(z,"structuredOutput",{enumerable:!0,configurable:!0,get:()=>I.value}),z}async executeNativeAnthropicGenerate(e){let t=e.model||this.modelName||"claude-sonnet-4-5@20250929",n=Date.now(),o=rm(e.timeout)??3e5,s=await this.createAnthropicVertexClient(o);g.debug("[GoogleVertex] Using native @anthropic-ai/vertex-sdk for Claude generate",{model:t,project:this.projectId,location:this.location});let i=[],a=e.prompt||e.input?.text||"Please respond.",c=e.conversationMessages&&e.conversationMessages.length>0?e.conversationMessages:e.conversationHistory;if(c&&c.length>0)for(let L of c)(L.role==="user"||L.role==="assistant")&&i.push({role:L.role,content:typeof L.content=="string"?L.content:JSON.stringify(L.content)});let l=e.input,u=[];if(l?.pdfFiles&&l.pdfFiles.length>0){g.debug(`[GoogleVertex] Processing ${l.pdfFiles.length} PDF file(s) for native Anthropic generate`);for(let L of l.pdfFiles){let N;typeof L=="string"?Br.existsSync(L)?N=Br.readFileSync(L):N=Buffer.from(L,"base64"):N=L;let $=N.toString("base64");u.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:$}})}}if(l?.images&&l.images.length>0){g.debug(`[GoogleVertex] Processing ${l.images.length} image(s) for native Anthropic generate`);for(let L of l.images){let N,$="image/jpeg";if(typeof L=="string")if(Br.existsSync(L)){N=Br.readFileSync(L);let j=tc.extname(L).toLowerCase();j===".png"?$="image/png":j===".gif"?$="image/gif":j===".webp"&&($="image/webp")}else if(L.startsWith("data:")){let j=L.match(/^data:([^;]+);base64,(.+)$/);if(j)$=j[1],N=Buffer.from(j[2],"base64");else continue}else if(L.startsWith("http://")||L.startsWith("https://"))try{let j=await fetch(L);if(!j.ok){g.warn(`[GoogleVertex] Image fetch failed: ${j.status} ${j.statusText}, skipping`,{url:L});continue}let B=await j.arrayBuffer();N=Buffer.from(B);let V=j.headers.get("content-type");V&&V.startsWith("image/")&&($=V.split(";")[0])}catch(j){g.warn(`[GoogleVertex] Image URL fetch threw, skipping: ${j instanceof Error?j.message:String(j)}`,{url:L});continue}else N=Buffer.from(L,"base64");else N=L;let U=N.toString("base64");u.push({type:"image",source:{type:"base64",media_type:$,data:U}})}}u.push({type:"text",text:a}),i.push({role:"user",content:u.length===1&&u[0].type==="text"?a:u});let d,m=new Map,f=[];if(!e.disableTools&&e.tools&&Object.keys(e.tools).length>0){d=[];for(let[L,N]of Object.entries(e.tools)){let $={name:L,description:N.description||`Tool: ${L}`,input_schema:{type:"object"}},j=N.parameters||N.inputSchema;if(j){let B=Es(j,"openApi3"),V=ln(B);$.input_schema={type:"object",properties:V.properties||{},required:V.required||[]}}d.push($),N.execute&&m.set(L,N.execute)}}let h=!1,y="";if(e.schema){h=!0;let L=Es(e.schema,"openApi3"),N=ln(L);N.$schema&&delete N.$schema;let $=ws(N),U={name:"final_result",description:"Return the final structured result. You MUST call this tool when you have gathered all information and are ready to provide the final answer. The arguments should contain the structured data matching the expected schema.",input_schema:{type:"object",properties:$.properties||$,required:$.required||[]}};d||(d=[]),d.push(U),y=`
1221
1221
 
@@ -16,7 +16,8 @@ import { NeuroLinkClient } from "./httpClient.js";
16
16
  *
17
17
  * @example Using with AI SDK
18
18
  * ```typescript
19
- * import { generateText } from 'ai';
19
+ * import { generateText } from "ai-sdk";
20
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
20
21
  * import { createNeuroLinkModel } from '@neurolink/ai-sdk';
21
22
  *
22
23
  * const model = createNeuroLinkModel({
@@ -106,7 +107,7 @@ export declare class NeuroLinkProvider {
106
107
  *
107
108
  * @example
108
109
  * ```typescript
109
- * import { createNeuroLinkProvider, generateText } from '@neurolink/ai-sdk';
110
+ * import { createNeuroLinkProvider, generateText } from "@neurolink/ai-sdk";
110
111
  *
111
112
  * const neurolink = createNeuroLinkProvider({
112
113
  * baseUrl: 'https://api.neurolink.example.com',
@@ -125,7 +126,7 @@ export declare function createNeuroLinkProvider(options: NeuroLinkProviderOption
125
126
  *
126
127
  * @example
127
128
  * ```typescript
128
- * import { createNeuroLinkModel, generateText } from '@neurolink/ai-sdk';
129
+ * import { createNeuroLinkModel, generateText } from "@neurolink/ai-sdk";
129
130
  *
130
131
  * const model = createNeuroLinkModel({
131
132
  * baseUrl: 'https://api.neurolink.example.com',
@@ -19,7 +19,8 @@ import { createClient } from "./httpClient.js";
19
19
  *
20
20
  * @example Using with AI SDK
21
21
  * ```typescript
22
- * import { generateText } from 'ai';
22
+ * import { generateText } from "ai-sdk";
23
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
23
24
  * import { createNeuroLinkModel } from '@neurolink/ai-sdk';
24
25
  *
25
26
  * const model = createNeuroLinkModel({
@@ -323,7 +324,7 @@ export class NeuroLinkProvider {
323
324
  *
324
325
  * @example
325
326
  * ```typescript
326
- * import { createNeuroLinkProvider, generateText } from '@neurolink/ai-sdk';
327
+ * import { createNeuroLinkProvider, generateText } from "@neurolink/ai-sdk";
327
328
  *
328
329
  * const neurolink = createNeuroLinkProvider({
329
330
  * baseUrl: 'https://api.neurolink.example.com',
@@ -354,7 +355,7 @@ export function createNeuroLinkProvider(options) {
354
355
  *
355
356
  * @example
356
357
  * ```typescript
357
- * import { createNeuroLinkModel, generateText } from '@neurolink/ai-sdk';
358
+ * import { createNeuroLinkModel, generateText } from "@neurolink/ai-sdk";
358
359
  *
359
360
  * const model = createNeuroLinkModel({
360
361
  * baseUrl: 'https://api.neurolink.example.com',
@@ -59,7 +59,8 @@
59
59
  * @example Vercel AI SDK Compatibility
60
60
  * ```typescript
61
61
  * import { createNeuroLinkProvider } from '@neurolink/ai-sdk';
62
- * import { generateText } from 'ai';
62
+ * import { generateText } from "ai-sdk";
63
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
63
64
  *
64
65
  * const neurolink = createNeuroLinkProvider({
65
66
  * baseUrl: 'https://api.neurolink.example.com',
@@ -59,7 +59,8 @@
59
59
  * @example Vercel AI SDK Compatibility
60
60
  * ```typescript
61
61
  * import { createNeuroLinkProvider } from '@neurolink/ai-sdk';
62
- * import { generateText } from 'ai';
62
+ * import { generateText } from "ai-sdk";
63
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
63
64
  *
64
65
  * const neurolink = createNeuroLinkProvider({
65
66
  * baseUrl: 'https://api.neurolink.example.com',
@@ -16,7 +16,8 @@ import { NeuroLinkClient } from "./httpClient.js";
16
16
  *
17
17
  * @example Using with AI SDK
18
18
  * ```typescript
19
- * import { generateText } from 'ai';
19
+ * import { generateText } from "ai-sdk";
20
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
20
21
  * import { createNeuroLinkModel } from '@neurolink/ai-sdk';
21
22
  *
22
23
  * const model = createNeuroLinkModel({
@@ -106,7 +107,7 @@ export declare class NeuroLinkProvider {
106
107
  *
107
108
  * @example
108
109
  * ```typescript
109
- * import { createNeuroLinkProvider, generateText } from '@neurolink/ai-sdk';
110
+ * import { createNeuroLinkProvider, generateText } from "@neurolink/ai-sdk";
110
111
  *
111
112
  * const neurolink = createNeuroLinkProvider({
112
113
  * baseUrl: 'https://api.neurolink.example.com',
@@ -125,7 +126,7 @@ export declare function createNeuroLinkProvider(options: NeuroLinkProviderOption
125
126
  *
126
127
  * @example
127
128
  * ```typescript
128
- * import { createNeuroLinkModel, generateText } from '@neurolink/ai-sdk';
129
+ * import { createNeuroLinkModel, generateText } from "@neurolink/ai-sdk";
129
130
  *
130
131
  * const model = createNeuroLinkModel({
131
132
  * baseUrl: 'https://api.neurolink.example.com',
@@ -19,7 +19,8 @@ import { createClient, NeuroLinkClient } from "./httpClient.js";
19
19
  *
20
20
  * @example Using with AI SDK
21
21
  * ```typescript
22
- * import { generateText } from 'ai';
22
+ * import { generateText } from "ai-sdk";
23
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
23
24
  * import { createNeuroLinkModel } from '@neurolink/ai-sdk';
24
25
  *
25
26
  * const model = createNeuroLinkModel({
@@ -323,7 +324,7 @@ export class NeuroLinkProvider {
323
324
  *
324
325
  * @example
325
326
  * ```typescript
326
- * import { createNeuroLinkProvider, generateText } from '@neurolink/ai-sdk';
327
+ * import { createNeuroLinkProvider, generateText } from "@neurolink/ai-sdk";
327
328
  *
328
329
  * const neurolink = createNeuroLinkProvider({
329
330
  * baseUrl: 'https://api.neurolink.example.com',
@@ -354,7 +355,7 @@ export function createNeuroLinkProvider(options) {
354
355
  *
355
356
  * @example
356
357
  * ```typescript
357
- * import { createNeuroLinkModel, generateText } from '@neurolink/ai-sdk';
358
+ * import { createNeuroLinkModel, generateText } from "@neurolink/ai-sdk";
358
359
  *
359
360
  * const model = createNeuroLinkModel({
360
361
  * baseUrl: 'https://api.neurolink.example.com',
@@ -59,7 +59,8 @@
59
59
  * @example Vercel AI SDK Compatibility
60
60
  * ```typescript
61
61
  * import { createNeuroLinkProvider } from '@neurolink/ai-sdk';
62
- * import { generateText } from 'ai';
62
+ * import { generateText } from "ai-sdk";
63
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
63
64
  *
64
65
  * const neurolink = createNeuroLinkProvider({
65
66
  * baseUrl: 'https://api.neurolink.example.com',
@@ -59,7 +59,8 @@
59
59
  * @example Vercel AI SDK Compatibility
60
60
  * ```typescript
61
61
  * import { createNeuroLinkProvider } from '@neurolink/ai-sdk';
62
- * import { generateText } from 'ai';
62
+ * import { generateText } from "ai-sdk";
63
+ * // Replace "ai-sdk" with the Vercel AI SDK package name in your project.
63
64
  *
64
65
  * const neurolink = createNeuroLinkProvider({
65
66
  * baseUrl: 'https://api.neurolink.example.com',
@@ -2036,7 +2036,21 @@ export class GoogleVertexProvider extends BaseProvider {
2036
2036
  async createAnthropicVertexClient(timeoutMs) {
2037
2037
  const mod = await getAnthropicVertexModule();
2038
2038
  const settings = await createVertexAnthropicSettings(this.location, timeoutMs);
2039
- return new mod.AnthropicVertex(settings);
2039
+ const client = new mod.AnthropicVertex(settings);
2040
+ // The vertex SDK eagerly starts Google ADC resolution in its constructor
2041
+ // (`this._authClientPromise = this._auth.getClient()`) and only awaits it
2042
+ // per-request in `prepareOptions()`. A client that is constructed but never
2043
+ // used — or built with misconfigured credentials — would otherwise leak
2044
+ // that rejection as a process-level `unhandledRejection`. Attaching a
2045
+ // handler here marks the promise as handled (so Node no longer reports it);
2046
+ // it does not consume the rejection — the per-request `await` in
2047
+ // `prepareOptions()` is a separate continuation and still surfaces auth
2048
+ // errors to callers. `void` flags the returned promise as deliberately
2049
+ // ignored (codebase convention for fire-and-forget).
2050
+ void client._authClientPromise?.catch(() => {
2051
+ // Intentionally ignored — see above.
2052
+ });
2053
+ return client;
2040
2054
  }
2041
2055
  /**
2042
2056
  * Execute stream using native @anthropic-ai/vertex-sdk for Claude models on Vertex AI
@@ -2036,7 +2036,21 @@ export class GoogleVertexProvider extends BaseProvider {
2036
2036
  async createAnthropicVertexClient(timeoutMs) {
2037
2037
  const mod = await getAnthropicVertexModule();
2038
2038
  const settings = await createVertexAnthropicSettings(this.location, timeoutMs);
2039
- return new mod.AnthropicVertex(settings);
2039
+ const client = new mod.AnthropicVertex(settings);
2040
+ // The vertex SDK eagerly starts Google ADC resolution in its constructor
2041
+ // (`this._authClientPromise = this._auth.getClient()`) and only awaits it
2042
+ // per-request in `prepareOptions()`. A client that is constructed but never
2043
+ // used — or built with misconfigured credentials — would otherwise leak
2044
+ // that rejection as a process-level `unhandledRejection`. Attaching a
2045
+ // handler here marks the promise as handled (so Node no longer reports it);
2046
+ // it does not consume the rejection — the per-request `await` in
2047
+ // `prepareOptions()` is a separate continuation and still surfaces auth
2048
+ // errors to callers. `void` flags the returned promise as deliberately
2049
+ // ignored (codebase convention for fire-and-forget).
2050
+ void client._authClientPromise?.catch(() => {
2051
+ // Intentionally ignored — see above.
2052
+ });
2053
+ return client;
2040
2054
  }
2041
2055
  /**
2042
2056
  * Execute stream using native @anthropic-ai/vertex-sdk for Claude models on Vertex AI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "9.69.2",
3
+ "version": "9.69.3",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applications with 21+ providers: OpenAI, Anthropic, Google AI Studio, Google Vertex, AWS Bedrock, Azure OpenAI, Mistral, LiteLLM, SageMaker, Hugging Face, Ollama, OpenAI-compatible, OpenRouter, DeepSeek, NVIDIA NIM, LM Studio, llama.cpp, plus voice (OpenAI TTS, ElevenLabs, Deepgram, Azure Speech).",
6
6
  "author": {