← Back
Deepgram Voice Agent adds UpdateThink for mid-conversation LLM provider switching
· featureapiplatform · developers.deepgram.com ↗

Dynamic Provider Switching

Deepgram's Voice Agent now supports the UpdateThink client message, enabling developers to completely reconfigure the Think provider during active conversations. This complements the existing UpdatePrompt message by allowing full configuration replacement rather than just prompt appending.

Key Capabilities

With UpdateThink, you can dynamically:

  • Switch LLM providers – Change between different AI model providers mid-conversation
  • Update the model – Select a different model within a provider (e.g., gpt-4o-mini)
  • Replace the prompt – Set an entirely new system prompt for the agent
  • Reconfigure functions – Modify the available functions and tools available to the agent

All these changes occur within a single message, providing seamless control over the agent's reasoning setup.

Implementation

The message format is straightforward, with developers specifying the new Think configuration:

{
    "type": "UpdateThink",
    "think": {
        "provider": {
            "type": "open_ai",
            "model": "gpt-4o-mini"
        },
        "prompt": "You are a helpful voice assistant."
    }
}

The Deepgram server confirms successful updates with a ThinkUpdated response message. This allows developers to implement adaptive conversation flows, A/B test different reasoning approaches, or adjust agent behavior based on conversation context in real-time.

For implementation details and advanced configuration options, refer to the UpdateThink documentation.