Skip to content

feat(regen): add redaction, normalization, and model updates - #143

Merged
GregHolmes merged 8 commits into
mainfrom
gh/sdk-gen-2026-11-12
Nov 12, 2026
Merged

GregHolmes merged 8 commits into
mainfrom
gh/sdk-gen-2026-11-12

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Regenerate the Java SDK from the current Fern API definition.
  • Add redact_usage for Listen V1 REST and WebSocket requests, Listen V2 connection options, and Listen V2 Configure/ConfigureSuccess control messages. This lets callers request usage redaction across prerecorded and streaming transcription.
  • Add normalize_volume for Speak V2 REST and WebSocket requests, allowing callers to opt into output loudness normalization.
  • Expand the Deepgram voice-model catalog and expose the canonical PhoneLLM Think-provider model constant, PHONELLM_MINI_ALPHA2FP8.

Compatibility

  • Retain the existing SDK transport, WebSocket forward-compatibility, builder-stage, union-default, and fields-less hashCode() patches because Fern does not yet generate their behavior.
  • Keep FLUX_RENEE_EN and the deprecated PHONELLM_MINI_ALPHA_2_FP8 alias. The canonical Think constant is now PHONELLM_MINI_ALPHA2FP8; both names serialize to phonellm-mini-alpha-2-fp8.
  • Preserve the legacy internal Value.PHONELLM_MINI_ALPHA_2_FP8 enum name, so applications compiled against earlier SDK versions continue to match it in switch statements.
  • Keep .fern/metadata.json at the latest released SDK version, 0.11.4; release-please owns the next version bump.

Coverage

  • Add REST and WebSocket wire coverage for redact_usage and normalize_volume.
  • Add Listen V2 Configure/ConfigureSuccess coverage for redact_usage.
  • Add a catalog-wide DeepgramModel JSON/value round-trip regression test.
  • Update Think tests and the provider-combinations example to use the canonical PhoneLLM constant while retaining alias and legacy enum-switch coverage.

Validation

  • ./gradlew spotlessCheck test compileExamples
  • ./gradlew integrationTest --tests com.deepgram.IntegrationTestCurrentRegenerationLiveSmoke
    • Live REST and WebSocket checks passed for redact_usage and normalize_volume.
    • Live Agent V1 settings applied successfully with the canonical Think model.

@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-11-12 feat(regen): add redaction, normalization, and model updates Nov 12, 2026
…y compat

Fern's regen renamed the DeepgramThinkProviderModel.Value enum constant
from PHONELLM_MINI_ALPHA_2_FP8 to PHONELLM_MINI_ALPHA2FP8 alongside the
public static field rename. The static field already carries a
deprecated alias, but the enum constant itself has no such shim: code
compiled against the previous release that switches on getEnumValue()
using the old constant name silently falls through to the default
case instead of matching, because Java's enum-switch desugaring
resolves the old field name via a direct field reference at the
caller's class-load time.

Keep the Value enum constant named PHONELLM_MINI_ALPHA_2_FP8 (matching
the previous release) while keeping the new PHONELLM_MINI_ALPHA2FP8
name only on the public static field, the same compatibility pattern
already used elsewhere in this file.

@dg-coreylweathers dg-coreylweathers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this PR does: Regenerates the Java SDK with two new settings — redact_usage (turns on usage redaction) for Listen, and normalize_volume (loudness normalization) for Speak — plus 230 new voice models and a renamed internal name for one Think-provider model.

What I checked:

  • Catalog expansion: confirmed none of the 230 existing voice names were accidentally dropped, only added to.
  • New settings reach the server: new tests capture the real outgoing network request and confirm the setting is actually sent, for both REST and streaming connections.
  • Build and tests: reran the full suite myself in a clean container, separate from CI — everything passed.
  • Live check against the real Deepgram service: turning on usage redaction got echoed back by the server exactly as described, and volume normalization visibly changed the output audio between on and off, while an invalid value for it was correctly rejected rather than silently ignored.

Requesting changes: this renamed model's old name doesn't fully keep working the way it's supposed to.

When this SDK renames something like this, the standard we've followed before is to keep the old name working in every way a developer might use it — not just the obvious way. This PR covers the obvious way (calling it by name as a value), but misses a second, equally common way developers write this kind of code (checking it in a switch/case statement). I tested that second way directly: I took code written against the old name, compiled it, and ran it unchanged against this PR's new code. It didn't crash or show any warning — it just silently picked the wrong answer. A developer would have no way to know their code was behaving incorrectly.

This isn't a new or surprising rule — it's the exact same checklist Greg wrote himself for a similar rename earlier in this file's history, which spells out that every one of five specific spots needs to be handled, and this PR only handled two of them.

Fix: handle the other three spots the same way the existing pattern in this codebase already does, so the old name keeps working everywhere, not just when called directly. If that's not practical and the break is intentional, that's fine too — just say so plainly in the release notes, so nobody is surprised by it later. Full details and the exact code to change are in REVIEW-pr143.md.

@GregHolmes

Copy link
Copy Markdown
Collaborator Author

Restored the legacy Value.PHONELLM_MINI_ALPHA_2_FP8 enum constant and routed the canonical PhoneLLM field through it, so pre-existing enum switch cases keep matching. Added a regression test for that switch path.\n\nVerified with ./gradlew spotlessCheck test compileExamples --max-workers=2 in a Java 17 Docker container.

@dg-coreylweathers dg-coreylweathers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Your fix is exactly what I was going to recommend — restoring the internal enum name while keeping the new name on the public field, the same pattern DeepgramModel.java already uses for FLUX_RENEE_EN.

I re-checked it two ways: ran the full build and test suite myself in a clean container, and separately confirmed all 8 CI checks pass on this commit. Your new test is actually a better guard than what I had in mind — because it's a real switch statement compiled against the canonical constant, if a future regen renames that enum value again, the build won't even compile, instead of just failing a test. That's exactly the kind of protection this should have going forward.

@GregHolmes
GregHolmes merged commit 71aa65a into main Nov 12, 2026
8 checks passed
GregHolmes added a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.11.5](v0.11.4...v0.11.5)
(2026-11-12)


### Features

* **Listen / Speak:** add `redact_usage` to Listen V1 REST and WebSocket
requests and Listen V2 connection and Configure messages, and add
`normalize_volume` to Speak V2 REST and WebSocket requests. This release
also expands the Deepgram model catalog and adds the canonical
Think-provider PhoneLLM constant, `PHONELLM_MINI_ALPHA2FP8`; the prior
`PHONELLM_MINI_ALPHA_2_FP8` name remains available for compatibility.
([#143](#143))
([71aa65a](71aa65a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Greg Holmes <greg.holmes@deepgram.com>
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.

2 participants