> ## Documentation Index
> Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating Configuration Mid-Stream

> Update streaming session parameters without reconnecting using the UpdateConfiguration message.

Send an `UpdateConfiguration` message during an active streaming session to change session parameters without reconnecting. Every field is optional — include only the parameters you want to change.

```json theme={null}
{
  "type": "UpdateConfiguration",
  "keyterms_prompt": ["account number", "routing number"],
  "max_turn_silence": 5000
}
```

## Supported fields

### Mode

| Field  | Type                                                | Models |
| ------ | --------------------------------------------------- | ------ |
| `mode` | `"min_latency"` \| `"balanced"` \| `"max_accuracy"` | U3 Pro |

Switch between accuracy/latency trade-off modes mid-session. See [Optimizing accuracy and latency](/streaming/getting-started/optimizing-accuracy-and-latency).

### Turn detection

| Field                | Type     | Models                      |
| -------------------- | -------- | --------------------------- |
| `min_turn_silence`   | int (ms) | U3 Pro, Universal Streaming |
| `max_turn_silence`   | int (ms) | U3 Pro, Universal Streaming |
| `interruption_delay` | int (ms) | U3 Pro                      |

* `min_turn_silence` — Minimum silence in ms before an end-of-turn check fires. Lower values produce faster turn endings; higher values reduce entity splitting on numbers and proper nouns.
* `max_turn_silence` — Maximum silence in ms before forcing a turn to end, regardless of confidence. Increase for moments where you expect a longer pause (caller reading out a number, address, etc.).
* `interruption_delay` — How quickly the first partial is emitted on U3 Pro. Lower values produce faster TTFT for aggressive barge-in; higher values produce more confident first partials. See [Tuning early partial timing](/streaming/getting-started/transcribe-streaming-audio).

### VAD

| Field           | Type        | Models                      |
| --------------- | ----------- | --------------------------- |
| `vad_threshold` | float (0–1) | U3 Pro, Universal Streaming |

* `vad_threshold` — Confidence threshold for classifying audio frames as speech. Increase for noisy environments to reduce false speech detection.

### Prompting and context

| Field             | Type      | Models                      |
| ----------------- | --------- | --------------------------- |
| `prompt`          | string    | U3 Pro                      |
| `keyterms_prompt` | string\[] | U3 Pro, Universal Streaming |
| `agent_context`   | string    | U3 Pro                      |

* `prompt` — Update the contextual prompt mid-stream as your application learns more about the conversation. See [Prompting guide](/streaming/prompting-and-keyterms).
* `keyterms_prompt` — Replace the current keyterms list. The most effective way to improve recognition accuracy mid-stream — dynamically swap the list as your voice agent moves between conversation stages. See [Keyterms prompting](/streaming/prompting-and-keyterms).
* `agent_context` — Pass your voice agent's most recent spoken reply so the model has it as context for the next user turn. See [Context carryover](/streaming/universal-3-pro/context-carryover#passing-your-agents-reply-as-context).

### Partials

| Field                 | Type | Models |
| --------------------- | ---- | ------ |
| `continuous_partials` | bool | U3 Pro |

* `continuous_partials` — Toggle steady-cadence partial emission on or off mid-session.

## Example

Set the keyterms for a caller-identification stage of a voice agent flow:

<Tabs>
  <Tab language="python" title="Python" default>
    ```python theme={null}
    websocket.send(json.dumps({
        "type": "UpdateConfiguration",
        "keyterms_prompt": ["Kelly Byrne-Donoghue", "date of birth", "January", "February"],
    }))
    ```
  </Tab>

  <Tab language="python-sdk" title="Python SDK">
    ```python theme={null}
    client.update_configuration(
        keyterms_prompt=["Kelly Byrne-Donoghue", "date of birth", "January", "February"],
    )
    ```
  </Tab>

  <Tab language="javascript" title="Javascript">
    ```javascript theme={null}
    ws.send(JSON.stringify({
      type: "UpdateConfiguration",
      keyterms_prompt: ["Kelly Byrne-Donoghue", "date of birth", "January", "February"],
    }));
    ```
  </Tab>

  <Tab language="javascript-sdk" title="JavaScript SDK">
    ```javascript theme={null}
    transcriber.updateConfiguration({
      keytermsPrompt: ["Kelly Byrne-Donoghue", "date of birth", "January", "February"],
    });
    ```
  </Tab>
</Tabs>

## Behavior notes

* `UpdateConfiguration` is a delta. Fields you omit keep their current values.
* `mode`, `prompt`, `agent_context`, `interruption_delay`, and `continuous_partials` are U3 Pro only.
