We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8b6a3d commit 42fdf38Copy full SHA for 42fdf38
packages/inference/src/providers/providerHelper.ts
@@ -115,7 +115,10 @@ export abstract class TaskProviderHelper {
115
* Prepare the headers for the request
116
*/
117
prepareHeaders(params: HeaderParams, isBinary: boolean): Record<string, string> {
118
- const headers: Record<string, string> = { Authorization: `Bearer ${params.accessToken}` };
+ const headers: Record<string, string> = {};
119
+ if (params.authMethod !== "none") {
120
+ headers["Authorization"] = `Bearer ${params.accessToken}`;
121
+ }
122
if (!isBinary) {
123
headers["Content-Type"] = "application/json";
124
}
0 commit comments