@@ -9,8 +9,8 @@ import { z } from "zod";
9
9
import { DisabledWorkflowContext } from "../serve/authorization" ;
10
10
11
11
export const getAgentsApi = ( { disabledContext } : { disabledContext : boolean } ) => {
12
- const token = getWorkflowRunId ( ) ;
13
- const workflowRunId = nanoid ( ) ;
12
+ const workflowRunId = getWorkflowRunId ( ) ;
13
+ const token = nanoid ( ) ;
14
14
15
15
let context : WorkflowContext ;
16
16
if ( disabledContext ) {
@@ -130,9 +130,12 @@ describe("tasks", () => {
130
130
131
131
test ( "multi agent with baseURL" , async ( ) => {
132
132
const { agentsApi, agent, token, workflowRunId } = getAgentsApi ( { disabledContext : false } ) ;
133
+
134
+ const customURL = "https://api.deepseek.com/v1" ;
135
+ const customApiKey = nanoid ( ) ;
133
136
const task = agentsApi . task ( {
134
137
agents : [ agent ] ,
135
- model : agentsApi . openai ( "gpt-3.5-turbo" , { baseURL : "https://api.deepseek.com/v1" } ) ,
138
+ model : agentsApi . openai ( "gpt-3.5-turbo" , { baseURL : customURL , apiKey : customApiKey } ) ,
136
139
maxSteps : 2 ,
137
140
prompt : "hello world!" ,
138
141
} ) ;
@@ -173,7 +176,7 @@ describe("tasks", () => {
173
176
"upstash-callback-workflow-url" : "https://requestcatcher.com/api" ,
174
177
"upstash-failure-callback-retries" : "3" ,
175
178
"upstash-feature-set" : "WF_NoDelete,InitialBody" ,
176
- "upstash-forward-authorization" : `Bearer ${ openaiToken } ` ,
179
+ "upstash-forward-authorization" : `Bearer ${ customApiKey } ` ,
177
180
"upstash-forward-content-type" : "application/json" ,
178
181
"upstash-forward-upstash-agent-name" : "Manager LLM" ,
179
182
"upstash-method" : "POST" ,
0 commit comments