Vercel · Arazzo Workflow
Vercel AI Gateway Cost-Routed Two-Turn Conversation
Version 1.0.0
Run a cost-sorted chat completion, then send a follow-up turn carrying the prior reply.
Provider
Workflows
costRoutedConversation
Two cost-routed chat completions chained into a single conversation.
Issues a first cost-sorted chat completion, then sends a second completion that includes the first assistant reply and a follow-up message to continue the conversation.
1
firstTurn
createChatCompletion
Send the first chat completion, sorting providers by cost via the gateway routing options.
2
secondTurn
createChatCompletion
Continue the conversation by replaying the prior user and assistant turns and appending the follow-up message, again sorting by cost.