variableExtractionPlan for squads using a differen...
# support
l
Would it be possible have another provider apart from OpenAI for generating structured outputs between agent handoffs?
v
Yes, you can use providers other than OpenAI (such as Anthropic) for variable extraction in squad handoffs. Here’s an example of configuring a handoff with a
variableExtractionPlan
for a squad assistant (replace provider/model as needed):
Copy code
json
{
  "tools": [
    {
      "type": "handoff",
      "destinations": [
        {
          "type": "assistant",
          "assistantName": "TechnicalSupportAgent",
          "description": "customer needs technical assistance",
          "variableExtractionPlan": {
            "schema": {
              "type": "object",
              "properties": {
                "issueType": { "type": "string" }
              }
            }
          }
        }
      ]
    }
  ]
}
This pattern works for Anthropic and other supported providers—just ensure your assistant and model configuration match your provider’s requirements. For best results, follow the provider-specific optimization tips in the [handoff documentation](https://docs.vapi.ai/squads/handoff). Source: - [VAPI Documentation Handoff Tool](https://docs.vapi.ai/squads/handoff)
l
but how can I state the model I want to use for variable extraction if using OpenAI as a provider?
c
Hi Luisson, Thanks for the follow-up question. After reviewing the current type definitions and implementation, the answer is no — it’s not possible to specify or override a custom LLM/model specifically for
variableExtractionPlan
on conversation or handoff nodes. The model used for variable extraction is inherited from the assistant/provider context and cannot be configured independently at this time. If this changes in the future, we’ll be sure to update the documentation accordingly. Please let us know if you’d like guidance on alternative approaches or workarounds. Best regards, Vapi Support
l
Hey @kyle, thanks for getting back to me. I understand is not possible at this time. I would still be interested in learning more of ways in which we could speed up the handoff process between agents.
c
This can mostly be accomplished by prompting: "When the user wants to X, execute the
handoff
tool immediately". If its still not fast enough, send a call id and we will review it to see what can be done.
l
thanks for the suggestion. I have been doing this across all of my 4 squad members and it still seems to be quite slow. I still think this is mainly due to the variable extraction piece. for instance I have this call: 019bc394-ba08-700a-a6d2-44fe1b1348e7 - Regardless of the language, you can hear the difference between handoffs there is a gap of 3-4 seconds and is quite hard to make it seem that is one fluent conversation. I remember you mentioning that the variable extraction has the hierarchy of: 1) main model for that squad member 2) if the main model isn't supported, it defaults to gpt4o-mini Since this specific agent is using gpt4o across all members, is there a way you could help me set the default to gpt4o-mini? I think this could potentially increase the speed of handoffs
c
Hi Luisson, If this is a transient squad, you can define the model for each assistant in the squad explicitly and set it to gpt-4o-mini. That will ensure all members of the transient squad use that model and can help reduce latency during handoffs. Let us know if you’d like us to double-check the configuration or review another call ID after making the change. Best regards, Kyle Vapi Support