Repository navigation
feat(regen): add redaction, normalization, and model updates - #143
Conversation
…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.
…el binary compat" This reverts commit 6ca044f.
dg-coreylweathers
left a comment
There was a problem hiding this comment.
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.
|
Restored the legacy |
dg-coreylweathers
left a comment
There was a problem hiding this comment.
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.
🤖 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>
Summary
redact_usagefor 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.normalize_volumefor Speak V2 REST and WebSocket requests, allowing callers to opt into output loudness normalization.PHONELLM_MINI_ALPHA2FP8.Compatibility
hashCode()patches because Fern does not yet generate their behavior.FLUX_RENEE_ENand the deprecatedPHONELLM_MINI_ALPHA_2_FP8alias. The canonical Think constant is nowPHONELLM_MINI_ALPHA2FP8; both names serialize tophonellm-mini-alpha-2-fp8.Value.PHONELLM_MINI_ALPHA_2_FP8enum name, so applications compiled against earlier SDK versions continue to match it inswitchstatements..fern/metadata.jsonat the latest released SDK version,0.11.4; release-please owns the next version bump.Coverage
redact_usageandnormalize_volume.redact_usage.DeepgramModelJSON/value round-trip regression test.Validation
./gradlew spotlessCheck test compileExamples./gradlew integrationTest --tests com.deepgram.IntegrationTestCurrentRegenerationLiveSmokeredact_usageandnormalize_volume.