@@ -4,9 +4,9 @@ import { createLogger } from '@sim/logger'
44import { eq } from 'drizzle-orm'
55import { refreshTokenIfNeeded } from '@/app/api/auth/oauth/utils'
66import type { BlockOutput } from '@/blocks/types'
7- import { BlockType , DEFAULTS , EVALUATOR , HTTP } from '@/executor/constants'
7+ import { BlockType , DEFAULTS , EVALUATOR } from '@/executor/constants'
88import type { BlockHandler , ExecutionContext } from '@/executor/types'
9- import { buildAPIUrl , extractAPIErrorMessage } from '@/executor/utils/http'
9+ import { buildAPIUrl , buildAuthHeaders , extractAPIErrorMessage } from '@/executor/utils/http'
1010import { isJSONString , parseJSON , stringifyJSON } from '@/executor/utils/json'
1111import { validateModelProvider } from '@/executor/utils/permission-check'
1212import { calculateCost , getProviderFromModel } from '@/providers/utils'
@@ -143,9 +143,7 @@ export class EvaluatorBlockHandler implements BlockHandler {
143143
144144 const response = await fetch ( url . toString ( ) , {
145145 method : 'POST' ,
146- headers : {
147- 'Content-Type' : HTTP . CONTENT_TYPE . JSON ,
148- } ,
146+ headers : await buildAuthHeaders ( ) ,
149147 body : stringifyJSON ( providerRequest ) ,
150148 } )
151149
0 commit comments