Skip to content

feat(regen): add deepgram think provider types - #141

Merged
GregHolmes merged 10 commits into
mainfrom
gh/sdk-gen-2026-10-30
Nov 4, 2026
Merged

GregHolmes merged 10 commits into
mainfrom
gh/sdk-gen-2026-10-30

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Voice Agent Think: Deepgram-hosted Think providers use typed Think Fast and PhoneLLM models. Existing ThinkSettingsV1Provider Visitor implementations receive the typed DeepgramThinkProvider through _visitUnknown until they implement visitDeepgram directly.

Validation

  • ./gradlew spotlessCheck test compileExamples
  • Production Agent integration test: a temporary runner forwarded DEEPGRAM_INTERNAL_API_KEY into DEEPGRAM_API_KEY and enabled DEEPGRAM_AGENT_THINK_PROVIDER. Think Fast and PhoneLLM both emitted SettingsApplied for every declared reasoning mode.
  • Regression coverage for every Deepgram Think reasoning-mode wire value

fern-api Bot and others added 3 commits October 30, 2026 17:29
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
@GregHolmes GregHolmes mentioned this pull request Oct 30, 2026
@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-10-30 feat(regen): add deepgram think provider types- #823 Oct 30, 2026
@GregHolmes GregHolmes changed the title feat(regen): add deepgram think provider types- #823 feat(regen): add deepgram think provider types Oct 30, 2026

@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.

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. visitDeepgram is a default method, so a 0.11.3-style Visitor still compiles (it lands in _visitUnknown). Class files are Java 11.
  • spotlessCheck test compileExamples green, 169 passed / 13 skipped.
  • Jackson: think type: deepgram deserializes to the think provider, not speak Deepgram. Unknown model / reasoning_mode values become UNKNOWN without throwing and round-trip.
  • Live prod: phonellm fp8 + mip_opt_out: true and think-fast + mip_opt_out: false get SettingsApplied; think-fast + mip_opt_out: true gets INVALID_SETTINGS.

Should-fix:

  • .fernignore:74-78 still freezes the think types "until the spec produces them", and this is that spec. The PR hand-edits the frozen DeepgramThinkProvider.java instead of letting Fern own it. Unfreeze DeepgramThinkProvider.java and DeepgramThinkProviderModel.java, and keep only ThinkSettingsV1Provider.java pinned 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 reads DEEPGRAM_API_KEY plus DEEPGRAM_AGENT_THINK_PROVIDER.
  • Worth a release-note line: an old Visitor's _visitUnknown now gets a typed DeepgramThinkProvider where it used to get a raw Map.
  • Import order in RegenTypesTest.java:37 and AgentV1ThinkLiveWireTest.java:25 (Spotless doesn't cover them).

@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.

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.

@GregHolmes

Copy link
Copy Markdown
Collaborator Author

Addressed in 45369a0:

  • Unfroze DeepgramThinkProvider and DeepgramThinkProviderModel; ThinkSettingsV1Provider remains pinned only for the default Visitor compatibility method.
  • Updated the regeneration inventory and corrected the test import order.
  • Clarified the temporary internal-key runner in the PR body and added the Visitor compatibility release-note handoff.
  • Verified locally with ./gradlew spotlessCheck test compileExamples.

An independent DevRel re-review found no findings. The current CI run was triggered by this push.

@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.

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):

  1. 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.
  2. 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."

@GregHolmes
GregHolmes merged commit 45ed904 into main Nov 4, 2026
9 checks passed
GregHolmes added a commit that referenced this pull request Nov 4, 2026
🤖 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>
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