Repository navigation
feat(regen): add deepgram think provider types - #141
Conversation
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.23.1
…m/deepgram-java-sdk into gh/sdk-gen-2026-10-30
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Thanks @GregHolmes. This one checks out against Maven Central. One cleanup and I'll approve.
Merge order: land this before release PR #140, so 0.11.4 ships DeepgramThinkProviderReasoningMode and DeepgramReasoningMode never gets published (Central stops at 0.11.3).
What I checked (Docker, JDK 11/17/21):
- japicmp vs 0.11.3: zero binary or source breaks.
visitDeepgramis a default method, so a 0.11.3-style Visitor still compiles (it lands in_visitUnknown). Class files are Java 11. spotlessCheck test compileExamplesgreen, 169 passed / 13 skipped.- Jackson: think
type: deepgramdeserializes to the think provider, not speakDeepgram. Unknown model / reasoning_mode values becomeUNKNOWNwithout throwing and round-trip. - Live prod: phonellm fp8 +
mip_opt_out: trueand think-fast +mip_opt_out: falseget SettingsApplied; think-fast +mip_opt_out: truegets INVALID_SETTINGS.
Should-fix:
.fernignore:74-78still freezes the think types "until the spec produces them", and this is that spec. The PR hand-edits the frozenDeepgramThinkProvider.javainstead of letting Fern own it. UnfreezeDeepgramThinkProvider.javaandDeepgramThinkProviderModel.java, and keep onlyThinkSettingsV1Provider.javapinned for the Visitor default (with the comment saying so). Fine as a fast follow-up if you'd rather not hold the release.
Nits:
- PR body says the integration test used
DEEPGRAM_INTERNAL_API_KEY, but it readsDEEPGRAM_API_KEYplusDEEPGRAM_AGENT_THINK_PROVIDER. - Worth a release-note line: an old Visitor's
_visitUnknownnow gets a typedDeepgramThinkProviderwhere it used to get a raw Map. - Import order in
RegenTypesTest.java:37andAgentV1ThinkLiveWireTest.java:25(Spotless doesn't cover them).
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Moving my earlier comment to a change request so this doesn't merge with the stale freeze.
.fernignore:74-78 freezes the think types "until the spec produces them", and this regen is that spec. The PR hand-edits the frozen DeepgramThinkProvider.java (reasoningMode type at lines 30/40/72/135/137/150/192/199) instead of letting Fern own it, so it'll drift from the spec on the next regen.
Fix: unfreeze DeepgramThinkProvider.java and DeepgramThinkProviderModel.java and let Fern generate them. Keep only ThinkSettingsV1Provider.java pinned (for the visitDeepgram default method), and update the comment to say that's why.
Everything else from my earlier review still holds: japicmp is clean vs 0.11.3, DeepgramReasoningMode never shipped, and this still needs to land before #140.
|
Addressed in 45369a0:
An independent DevRel re-review found no findings. The current CI run was triggered by this push. |
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Re-reviewed at 45369a0. Approving. Please merge this before release PR #140.
What this does: regenerates the Java SDK so the Deepgram-hosted Think models (think-fast, PhoneLLM) have their own typed settings. My earlier change request asked that the generator own those files instead of hand edits. That's done: only ThinkSettingsV1Provider.java stays frozen, so old Visitor implementations keep compiling.
What I checked:
- Will the next regen undo the hand rename? No. Fern itself renamed DeepgramReasoningMode to DeepgramThinkProviderReasoningMode in this regen (e417e22), merged Python #823 uses the same name, and replay.lock has no patches. DeepgramReasoningMode now appears nowhere in the repo.
- Does this break 0.11.3 users? No. japicmp against Maven Central 0.11.3 reports no binary incompatibilities. visitDeepgram is a default method and class files are still Java 11.
- Build: clean spotlessCheck compileJava compileExamples test in Docker (JDK 17), 182 tests, 0 failures.
- Parity: model and reasoning_mode values match JS and Python.
Nits (none block merge, fine as follow-ups):
- PR body: "Fern now owns DeepgramThinkProvider and DeepgramThinkProviderModel" is true from the next regen. In this PR both files are still main's hand copy plus the rename, because Fern skipped them while they were frozen (.fernignore:76-78 at e417e22). Suggested wording: "Fern owns DeepgramThinkProvider and DeepgramThinkProviderModel from the next regeneration; in this PR they carry the hand copy with the generated type name." Or rerun Fern on this branch now that they're unfrozen. The only diff should be getter Javadoc and private field order.
- AGENTS.md, separate small PR (this predates #141): .fernignore freezes .fern/replay.lock, .fern/replay.yml and .gitattributes, but the "Current temporarily frozen files" list doesn't mention them. One line each would cover it, e.g. "
.fern/replay.lock,.fern/replay.yml: Fern replay state managed by the generator, never hand-edit..gitattributes: repo line-ending and linguist settings."
🤖 I have created a release *beep* *boop* --- ## [0.11.4](v0.11.3...v0.11.4) (2026-11-04) ### Features * **Voice Agent:** Use Deepgram-hosted language models in the Think stage with `ThinkSettingsV1Provider.deepgram(DeepgramThinkProvider.builder()...)`. Select `think-fast` (requires Model Improvement Program participation) or `phonellm-mini-alpha-2-fp8` (for sessions using `mipOptOut(true)`). The provider supports `temperature(...)`, `reasoningMode(...)`, and `voicePromptOptOut(...)`; use `reasoningMode(DeepgramThinkProviderReasoningMode.NONE)` or omit it with phonellm to prevent reasoning text from being spoken. Early Access. ([#137](#137)) ([f03fe53](f03fe53)) ([#141](#141)) ([45ed904](45ed904)) --- 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
Regenerates the Java SDK with the Deepgram Think provider types required by #823. Fern now owns DeepgramThinkProvider and DeepgramThinkProviderModel; the regeneration preserves every remaining manual compatibility, WebSocket, query-serialization, and forward-compatibility patch.
The generated reasoning-mode type is DeepgramThinkProviderReasoningMode. The SDK provider, regression tests, and maintained agent example use that type consistently. The published SDK version remains 0.11.3; Release Please will perform the release bump after this PR merges.
Release note handoff
Validation