Skip to content

Commit 0519ad3

Browse files
feat!: sdk regeneration 2026-04-29 (#47)
## Summary - Regenerate the Java SDK with the latest Fern output and re-apply the remaining manual patch to `src/main/java/com/deepgram/core/ClientOptions.java`. - Preserve repo-owned docs during regen by freezing `docs/` in `.fernignore`, and add `README.md` to release-please config so future version bumps update README dependency snippets automatically. - Refresh README examples and build metadata so snippet validation passes in both Gradle and Maven, including adding the SageMaker test dependency to `pom.xml`. ## Breaking Changes - Rename public agent history types: - `AgentV1HistoryContent` -> `ConversationHistoryMessage` - `AgentV1HistoryFunctionCalls` -> `FunctionCallHistoryMessage` - `AgentV1SettingsAgentContextMessagesItemContent` -> `ConversationHistoryMessage` - `AgentV1SettingsAgentContextMessagesItemFunctionCalls` -> `FunctionCallHistoryMessage` - Rename public management request type: - `CreateKeyV1RequestOne` -> `CreateKeyV1Request` - These changes affect public method signatures on `AgentV1History`, `AgentV1SettingsAgentContextMessagesItem`, and project key creation clients, so downstream Java consumers may need import and type updates. ## Additional Changes - Add `AgentV1InjectAgentMessage.behavior` and `AgentV1InjectAgentMessageBehavior`. - Add `ListenV2LanguageHint` and `V2ConnectOptions.languageHint`. - Update README dependency versions to `0.3.0`, fix the API docs link, and clarify custom endpoint configuration for REST and WebSocket usage. ## Validation - `./gradlew unitTest compileExamples` - `./gradlew test compileExamples` - `mvn test` --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent bb69012 commit 0519ad3

23 files changed

Lines changed: 439 additions & 408 deletions

.fern/metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "4.92.0",
2+
"cliVersion": "4.107.0",
33
"generatorName": "fernapi/fern-java-sdk",
4-
"generatorVersion": "4.6.1",
4+
"generatorVersion": "4.6.2",
55
"generatorConfig": {
66
"package-prefix": "com.deepgram",
77
"base-api-exception-class-name": "DeepgramHttpException",
@@ -11,8 +11,8 @@
1111
},
1212
"enable-wire-tests": true
1313
},
14-
"originGitCommit": "0d16d3b0d2f3da69dc058ea78f235b2b11288371",
14+
"originGitCommit": "05bd7add608b322a6278fa20da22f2ed501d50ef",
1515
"originGitCommitIsDirty": true,
1616
"invokedBy": "manual",
17-
"sdkVersion": "0.3.0"
17+
"sdkVersion": "0.3.1"
1818
}

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ README.md
3333
CHANGELOG.md
3434
CONTRIBUTING.md
3535
LICENSE
36+
docs/
3637

3738
# Tests (manually maintained)
3839
src/test/

.github/release-please-config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"type": "generic",
2020
"path": "build.gradle"
2121
},
22+
{
23+
"type": "generic",
24+
"path": "README.md"
25+
},
2226
{
2327
"type": "json",
2428
"path": ".fern/metadata.json",

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Current permanently frozen files:
2727
- `src/main/java/com/deepgram/DeepgramClient.java`, `src/main/java/com/deepgram/AsyncDeepgramClient.java`, `src/main/java/com/deepgram/DeepgramClientBuilder.java`, `src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java` - custom wrapper entrypoints that add Bearer auth, session ID support, and custom transport behavior on top of Fern's generated API client
2828
- `src/main/java/com/deepgram/core/transport/` - hand-written transport abstraction
2929
- `build.gradle`, `settings.gradle`, `gradle/`, `gradlew`, `gradlew.bat`, `pom.xml`, `Makefile` - build and project configuration
30-
- `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `LICENSE` - docs
30+
- `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `LICENSE`, `docs/` - docs
3131
- `src/test/` - manually maintained tests
3232
- `examples/` - manually maintained examples
3333
- `.editorconfig`, `.githooks/`, `.github/`, `.gitignore` - repo and CI configuration

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Add the dependency to your `build.gradle`:
2626

2727
```groovy
2828
dependencies {
29-
implementation 'com.deepgram:deepgram-java-sdk:0.2.1' // x-release-please-version
29+
implementation 'com.deepgram:deepgram-java-sdk:0.3.0' // x-release-please-version
3030
}
3131
```
3232

@@ -38,7 +38,7 @@ Add the dependency to your `pom.xml`:
3838
<dependency>
3939
<groupId>com.deepgram</groupId>
4040
<artifactId>deepgram-java-sdk</artifactId>
41-
<version>0.2.1</version> <!-- x-release-please-version -->
41+
<version>0.3.0</version> <!-- x-release-please-version -->
4242
</dependency>
4343
```
4444

@@ -405,7 +405,7 @@ Use the separate [`deepgram-sagemaker`](https://github.com/deepgram/deepgram-jav
405405

406406
```groovy
407407
dependencies {
408-
implementation 'com.deepgram:deepgram-java-sdk:0.2.1' // x-release-please-version
408+
implementation 'com.deepgram:deepgram-java-sdk:0.3.0' // x-release-please-version
409409
implementation 'com.deepgram:deepgram-sagemaker:0.1.2'
410410
}
411411
```
@@ -507,15 +507,17 @@ DeepgramClient client = DeepgramClient.builder()
507507

508508
### Custom Base URL
509509

510-
For on-premises deployments or custom endpoints:
510+
For on-premises deployments or custom REST/WebSocket endpoints:
511511

512512
```java
513513
import com.deepgram.core.Environment;
514514

515515
DeepgramClient client = DeepgramClient.builder()
516516
.apiKey("YOUR_DEEPGRAM_API_KEY")
517517
.environment(Environment.custom()
518-
.base("https://your-custom-endpoint.com")
518+
.base("https://your-rest-endpoint.com")
519+
.production("wss://your-listen-websocket-endpoint.com")
520+
.agent("wss://your-agent-websocket-endpoint.com")
519521
.build())
520522
.build();
521523
```
@@ -700,7 +702,7 @@ make format # auto-format code
700702

701703
## API Reference
702704

703-
See [reference.md](reference.md) for complete API documentation.
705+
See [developers.deepgram.com](https://developers.deepgram.com) for complete API documentation.
704706

705707
## Getting Help
706708

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@
116116
<version>3.25.3</version>
117117
<scope>test</scope>
118118
</dependency>
119+
<dependency>
120+
<groupId>com.deepgram</groupId>
121+
<artifactId>deepgram-sagemaker</artifactId>
122+
<version>0.1.2</version>
123+
<scope>test</scope>
124+
</dependency>
119125
</dependencies>
120126

121127
<build>

src/main/java/com/deepgram/resources/agent/v1/types/AgentV1History.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public Object get() {
3333
@SuppressWarnings("unchecked")
3434
public <T> T visit(Visitor<T> visitor) {
3535
if (this.type == 0) {
36-
return visitor.visit((AgentV1HistoryContent) this.value);
36+
return visitor.visit((ConversationHistoryMessage) this.value);
3737
} else if (this.type == 1) {
38-
return visitor.visit((AgentV1HistoryFunctionCalls) this.value);
38+
return visitor.visit((FunctionCallHistoryMessage) this.value);
3939
}
4040
throw new IllegalStateException("Failed to visit value. This should never happen.");
4141
}
@@ -60,18 +60,18 @@ public String toString() {
6060
return this.value.toString();
6161
}
6262

63-
public static AgentV1History of(AgentV1HistoryContent value) {
63+
public static AgentV1History of(ConversationHistoryMessage value) {
6464
return new AgentV1History(value, 0);
6565
}
6666

67-
public static AgentV1History of(AgentV1HistoryFunctionCalls value) {
67+
public static AgentV1History of(FunctionCallHistoryMessage value) {
6868
return new AgentV1History(value, 1);
6969
}
7070

7171
public interface Visitor<T> {
72-
T visit(AgentV1HistoryContent value);
72+
T visit(ConversationHistoryMessage value);
7373

74-
T visit(AgentV1HistoryFunctionCalls value);
74+
T visit(FunctionCallHistoryMessage value);
7575
}
7676

7777
static final class Deserializer extends StdDeserializer<AgentV1History> {
@@ -86,13 +86,13 @@ public AgentV1History deserialize(JsonParser p, DeserializationContext context)
8686
&& ((Map<?, ?>) value).containsKey("role")
8787
&& ((Map<?, ?>) value).containsKey("content")) {
8888
try {
89-
return of(ObjectMappers.JSON_MAPPER.convertValue(value, AgentV1HistoryContent.class));
89+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConversationHistoryMessage.class));
9090
} catch (RuntimeException e) {
9191
}
9292
}
9393
if (value instanceof Map<?, ?> && ((Map<?, ?>) value).containsKey("function_calls")) {
9494
try {
95-
return of(ObjectMappers.JSON_MAPPER.convertValue(value, AgentV1HistoryFunctionCalls.class));
95+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, FunctionCallHistoryMessage.class));
9696
} catch (RuntimeException e) {
9797
}
9898
}

src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryContent.java

Lines changed: 0 additions & 171 deletions
This file was deleted.

0 commit comments

Comments
 (0)