Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Cohere.
Copyright (c) 2026 Cohere.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.cohere'

version = '1.9.3'
version = '1.9.4'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cohere'
artifactId = 'cohere-java'
version = '1.9.3'
version = '1.9.4'
from components.java
pom {
name = 'cohere'
Expand Down
38 changes: 13 additions & 25 deletions reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Reference
<details><summary><code>client.chatStream(request) -> Optional&lt;StreamedChatResponse&gt;</code></summary>
<details><summary><code>client.chatStream(request) -> Optional&amp;lt;StreamedChatResponse&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -912,7 +912,7 @@ Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private D
</dl>
</details>

<details><summary><code>client.generateStream(request) -> Optional&lt;GenerateStreamedResponse&gt;</code></summary>
<details><summary><code>client.generateStream(request) -> Optional&amp;lt;GenerateStreamedResponse&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -1584,7 +1584,7 @@ client.rerank(
)
.query("What is the capital of the United States?")
.topN(3)
.model("rerank-v3.5")
.model("rerank-v4.0-pro")
.build()
);
```
Expand Down Expand Up @@ -2123,7 +2123,7 @@ client.checkApiKey();
</details>

## V2
<details><summary><code>client.v2.chatStream(request) -> Optional&lt;V2ChatStreamResponse&gt;</code></summary>
<details><summary><code>client.v2.chatStream(request) -> Optional&amp;lt;V2ChatStreamResponse&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -2403,10 +2403,7 @@ If tool_choice isn't specified, then the model is free to choose whether to use
<dl>
<dd>

**priority:** `Optional<Integer>`

The priority of the request (lower means earlier handling; default 0 highest priority).
Higher priority requests are handled first, and dropped last when the system is under load.
**priority:** `Optional<Integer>` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.

</dd>
</dl>
Expand Down Expand Up @@ -2698,10 +2695,7 @@ If tool_choice isn't specified, then the model is free to choose whether to use
<dl>
<dd>

**priority:** `Optional<Integer>`

The priority of the request (lower means earlier handling; default 0 highest priority).
Higher priority requests are handled first, and dropped last when the system is under load.
**priority:** `Optional<Integer>` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.

</dd>
</dl>
Expand Down Expand Up @@ -2871,10 +2865,7 @@ If `NONE` is selected, when the input exceeds the maximum input token length an
<dl>
<dd>

**priority:** `Optional<Integer>`

The priority of the request (lower means earlier handling; default 0 highest priority).
Higher priority requests are handled first, and dropped last when the system is under load.
**priority:** `Optional<Integer>` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.

</dd>
</dl>
Expand Down Expand Up @@ -2920,7 +2911,7 @@ client.v2().rerank(
Arrays.asList("Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.")
)
.query("What is the capital of the United States?")
.model("rerank-v3.5")
.model("rerank-v4.0-pro")
.topN(3)
.build()
);
Expand Down Expand Up @@ -2985,10 +2976,7 @@ For optimal performance we recommend against sending more than 1,000 documents i
<dl>
<dd>

**priority:** `Optional<Integer>`

The priority of the request (lower means earlier handling; default 0 highest priority).
Higher priority requests are handled first, and dropped last when the system is under load.
**priority:** `Optional<Integer>` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.

</dd>
</dl>
Expand Down Expand Up @@ -3204,7 +3192,7 @@ client.batches().retrieve("id");
</dl>
</details>

<details><summary><code>client.batches.cancel(id) -> Map&lt;String, Object&gt;</code></summary>
<details><summary><code>client.batches.cancel(id) -> Map&amp;lt;String, Object&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -3846,7 +3834,7 @@ client.datasets().get("id");
</dl>
</details>

<details><summary><code>client.datasets.delete(id) -> Map&lt;String, Object&gt;</code></summary>
<details><summary><code>client.datasets.delete(id) -> Map&amp;lt;String, Object&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4139,7 +4127,7 @@ client.connectors().get("id");
</dl>
</details>

<details><summary><code>client.connectors.delete(id) -> Map&lt;String, Object&gt;</code></summary>
<details><summary><code>client.connectors.delete(id) -> Map&amp;lt;String, Object&amp;gt;</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4733,7 +4721,7 @@ client.finetuning().getFinetunedModel("id");
</dl>
</details>

<details><summary><code>client.finetuning.deleteFinetunedModel(id) -> Map&lt;String, Object&gt;</code></summary>
<details><summary><code>client.finetuning.deleteFinetunedModel(id) -> Map&amp;lt;String, Object&amp;gt;</code></summary>
<dl>
<dd>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/cohere/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.cohere:cohere-java/1.9.3");
put("User-Agent", "com.cohere:cohere-java/1.7.1");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.cohere.fern:api-sdk");
put("X-Fern-SDK-Version", "1.9.3");
put("X-Fern-SDK-Version", "1.7.1");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ public Optional<Thinking> getThinking() {
}

/**
* @return The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.
* @return Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
*/
@JsonProperty("priority")
public Optional<Integer> getPriority() {
Expand Down Expand Up @@ -514,8 +513,7 @@ public interface _FinalStage {
_FinalStage thinking(Thinking thinking);

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
_FinalStage priority(Optional<Integer> priority);

Expand Down Expand Up @@ -607,8 +605,7 @@ public _FinalStage model(@NotNull String model) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -618,8 +615,7 @@ public _FinalStage priority(Integer priority) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
@java.lang.Override
@JsonSetter(value = "priority", nulls = Nulls.SKIP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ public Optional<Thinking> getThinking() {
}

/**
* @return The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.
* @return Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
*/
@JsonProperty("priority")
public Optional<Integer> getPriority() {
Expand Down Expand Up @@ -514,8 +513,7 @@ public interface _FinalStage {
_FinalStage thinking(Thinking thinking);

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
_FinalStage priority(Optional<Integer> priority);

Expand Down Expand Up @@ -607,8 +605,7 @@ public _FinalStage model(@NotNull String model) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -618,8 +615,7 @@ public _FinalStage priority(Integer priority) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
@java.lang.Override
@JsonSetter(value = "priority", nulls = Nulls.SKIP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ public Optional<V2EmbedRequestTruncate> getTruncate() {
}

/**
* @return The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.
* @return Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
*/
@JsonProperty("priority")
public Optional<Integer> getPriority() {
Expand Down Expand Up @@ -291,8 +290,7 @@ public interface _FinalStage {
_FinalStage truncate(V2EmbedRequestTruncate truncate);

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
_FinalStage priority(Optional<Integer> priority);

Expand Down Expand Up @@ -361,8 +359,7 @@ public _FinalStage inputType(@NotNull EmbedInputType inputType) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -372,8 +369,7 @@ public _FinalStage priority(Integer priority) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
@java.lang.Override
@JsonSetter(value = "priority", nulls = Nulls.SKIP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ public Optional<Integer> getMaxTokensPerDoc() {
}

/**
* @return The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.
* @return Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
*/
@JsonProperty("priority")
public Optional<Integer> getPriority() {
Expand Down Expand Up @@ -186,8 +185,7 @@ public interface _FinalStage {
_FinalStage maxTokensPerDoc(Integer maxTokensPerDoc);

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
_FinalStage priority(Optional<Integer> priority);

Expand Down Expand Up @@ -249,8 +247,7 @@ public _FinalStage query(@NotNull String query) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -260,8 +257,7 @@ public _FinalStage priority(Integer priority) {
}

/**
* <p>The priority of the request (lower means earlier handling; default 0 highest priority).
* Higher priority requests are handled first, and dropped last when the system is under load.</p>
* <p>Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.</p>
*/
@java.lang.Override
@JsonSetter(value = "priority", nulls = Nulls.SKIP)
Expand Down
Loading