---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/bedrock_converse/helpers/variables/defaultEnforceConverseAlternation.md
description: 'Default implementation; alias of [`enforceConverseAlternation`](https://adk.nht.io/api/@nhtio/adk/batteries/llm/bedrock_converse/helpers/functions/enforceConverseAlternation).'
---

# Variable: defaultEnforceConverseAlternation

```ts
const defaultEnforceConverseAlternation: (
  messages: ConverseMessage[],
  policy: "merge" | "filler" | "reject",
) => ConverseMessage[] = enforceConverseAlternation;
```

Defined in: [src/batteries/llm/bedrock\_converse/helpers.ts:287](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/llm/bedrock_converse/helpers.ts#L287)

Default implementation; alias of [enforceConverseAlternation](../functions/enforceConverseAlternation.md).

Apply Converse's strict `user` ↔ `assistant` alternation to an already-ordered turn list.

## Parameters

| Parameter  | Type                                                             | Default value |
| ---------- | ---------------------------------------------------------------- | ------------- |
| `messages` | [`ConverseMessage`](../../types/interfaces/ConverseMessage.md)\[] | `undefined`   |
| `policy`   | `"merge"` | `"filler"` | `"reject"`                            | `'merge'`     |

## Returns

[`ConverseMessage`](../../types/interfaces/ConverseMessage.md)\[]

## Remarks

Exported and separately testable because it is the single most consequential transformation in
this battery, and the one a gateway would otherwise perform invisibly.

* `'merge'` concatenates consecutive same-role turns' content blocks. Lossless: the same blocks
  in the same order, in one turn — exactly what Converse would have accepted had the caller
  written it that way.
* `'filler'` inserts a placeholder opposite-role turn. LOSSIER — it fabricates model output that
  never existed — and offered only for callers who need positional stability across turns.
* `'reject'` returns the list untouched so Converse's own error surfaces. Use this when
  AUDITING: a repair applied before dispatch is invisible in the response, which makes a
  gateway's fix indistinguishable from a vendor's tolerance.
