Skip to content

fix(diarize): expose diarize_model so the v2 diarizer is reachable at all#13

Merged
Jacob-Lasky merged 1 commit into
mainfrom
fix/diarize-model
Jul 25, 2026
Merged

fix(diarize): expose diarize_model so the v2 diarizer is reachable at all#13
Jacob-Lasky merged 1 commit into
mainfrom
fix/diarize-model

Conversation

@Jacob-Lasky

Copy link
Copy Markdown
Owner

The params panel could not produce the v2 diarizer by any path.

diarize is a deprecated boolean that always routes to v1. diarize_model is the current parameter and both enables diarization and selects the version, so it must be sent without diarize. The panel instead offered the legacy diarize_version select gated behind x-if="params.diarize" — so the only way to see the version control was to enable the thing that forces v1.

Confirmed on the wire, against production

diarize=true                              200, speaker labels (v1)
diarize_version=latest  (alone)           400  Failed to parse query string
diarize=true + diarize_version=latest     200
diarize_model=v2        (alone)           200
diarize_model=latest    (alone)           200
diarize=true + diarize_model=v2           400  diarize_model cannot be used together
                                               with diarize or diarize_version.
                                               (INVALID_QUERY_PARAMETER)
diarize_model=v2        on streaming      handshake rejected

Deepgram does not pick a winner between them — it rejects the pair outright. This is a mutual exclusion, not a precedence rule.

Changes

  • UI models diarize_model (v1 / v2 / latest) instead of diarize_version, and the select is no longer gated behind the checkbox.
  • The two controls clear each other, since sending both is a hard 400.
  • Hints state that v2 is batch-only and that the checkbox means v1.
  • clean_params drops diarize / diarize_version when diarize_model is present. The UI already prevents the pair; this covers the extra escape hatch and saved presets from before the rename, so an old config degrades to the modern parameter instead of a 400.
  • The deprecated boolean still works alone — replicating a legacy customer config is a job this tool has.

diarize_model is one of the params deepgram-sdk 7 added, so it rides as a real connect() kwarg rather than through the passthrough. A test pins that.

Verification

Semantics confirmed via DeepHive against the Deepgram docs, then verified on the wire rather than taken on faith.

116 passed, 1 skipped. UI probe:

diarize_model select visible WITHOUT diarize checked: True
options: ['Off / use the deprecated Diarize checkbox', 'v1', 'v2 (batch only)', 'latest']
after select v2      -> diarize_model='v2'     diarize=False
after check diarize  -> diarize_model=''       diarize=True
after select latest  -> diarize_model='latest' diarize=False
URL preview: ...&diarize_model=latest&...   (no diarize param)
pageerrors: none

… all

The params panel could not produce the v2 diarizer by any path.

`diarize` is a deprecated boolean that ALWAYS routes to v1. `diarize_model` is
the current parameter and both enables diarization and picks the version, so it
must be sent WITHOUT `diarize`. The panel instead offered the legacy
`diarize_version` select gated behind `x-if="params.diarize"`, so the only way
to see the version control was to enable the thing that forces v1.

Confirmed on the wire against production:

    diarize=true                                 200, speaker labels (v1)
    diarize_version=latest   (alone)             400 Failed to parse query string
    diarize=true + diarize_version=latest        200
    diarize_model=v2         (alone)             200
    diarize_model=latest     (alone)             200
    diarize=true + diarize_model=v2              400 diarize_model cannot be used
                                                 together with diarize or
                                                 diarize_version.
                                                 (INVALID_QUERY_PARAMETER)
    diarize_model=v2         on streaming        handshake rejected

Note Deepgram does not pick a winner between them, it rejects the pair outright,
so this is a mutual exclusion rather than a precedence rule.

Changes:
- UI models `diarize_model` (v1 / v2 / latest) instead of `diarize_version`, and
  the select is no longer gated behind the checkbox.
- The two controls clear each other, since sending both is a hard 400.
- Hints state that v2 is batch only and that the checkbox means v1.
- `clean_params` drops `diarize` and `diarize_version` when `diarize_model` is
  present. The UI already prevents the pair; this covers the `extra` escape
  hatch and any saved preset from before the rename, so an old config degrades
  to the modern parameter instead of a hard 400.
- The deprecated boolean still works alone, because replicating a legacy
  customer config is a job this tool has.

`diarize_model` is one of the params deepgram-sdk 7 added, so it rides as a real
connect() kwarg rather than through the passthrough; a test pins that.

Semantics confirmed via DeepHive against the Deepgram docs, then verified on the
wire rather than taken on faith.

116 passed, 1 skipped. UI probe: select reachable with diarize unchecked,
exclusion holds both ways, preview emits diarize_model=latest with no diarize,
no console errors.
@Jacob-Lasky
Jacob-Lasky merged commit cabb274 into main Jul 25, 2026
1 check passed
@Jacob-Lasky
Jacob-Lasky deleted the fix/diarize-model branch July 25, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant