@@ -68,21 +68,21 @@ export async function makeRequestOptions(
6868			? "hf-token" 
6969			: "provider-key" 
7070		: includeCredentials  ===  "include" 
71- 		   ? "credentials-include" 
72- 		   : "none" ; 
71+ 			 ? "credentials-include" 
72+ 			 : "none" ; 
7373
7474	const  url  =  endpointUrl 
7575		? chatCompletion 
7676			? endpointUrl  +  `/v1/chat/completions` 
7777			: endpointUrl 
7878		: makeUrl ( { 
79- 				 authMethod, 
80- 				 chatCompletion : chatCompletion  ??  false , 
81- 				 forceTask, 
82- 				 model, 
83- 				 provider : provider  ??  "hf-inference" , 
84- 				 taskHint, 
85- 		   } ) ; 
79+ 			authMethod, 
80+ 			chatCompletion : chatCompletion  ??  false , 
81+ 			forceTask, 
82+ 			model, 
83+ 			provider : provider  ??  "hf-inference" , 
84+ 			taskHint, 
85+ 		} ) ; 
8686
8787	const  headers : Record < string ,  string >  =  { } ; 
8888	if  ( accessToken )  { 
@@ -131,11 +131,11 @@ export async function makeRequestOptions(
131131		body : binary 
132132			? args . data 
133133			: JSON . stringify ( { 
134- 					 ...otherArgs , 
135- 					 ...( chatCompletion  ||  provider  ===  "together"  ||  provider  ===  "nebius"  ||  provider  ===  "hyperbolic" 
136- 						 ? {  model } 
137- 						 : undefined ) , 
138- 			   } ) , 
134+ 				...otherArgs , 
135+ 				...( chatCompletion  ||  provider  ===  "together"  ||  provider  ===  "nebius"  ||  provider  ===  "hyperbolic" 
136+ 					? {  model } 
137+ 					: undefined ) , 
138+ 			} ) , 
139139		...( credentials  ? {  credentials }  : undefined ) , 
140140		signal : options ?. signal , 
141141	} ; 
@@ -230,9 +230,6 @@ function makeUrl(params: {
230230				? HF_HUB_INFERENCE_PROXY_TEMPLATE . replace ( "{{PROVIDER}}" ,  params . provider ) 
231231				: HYPERBOLIC_API_BASE_URL ; 
232232
233- 			if  ( params . taskHint  ===  "text-generation" )  { 
234- 				return  `${ baseUrl }  /v1/chat/completions` ; 
235- 			} 
236233			if  ( params . taskHint  ===  "text-to-image" )  { 
237234				return  `${ baseUrl }  /v1/images/generations` ; 
238235			} 
0 commit comments