Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7b28d46
codegen metadata
anthropic-sdks-writer[bot] Sep 30, 2026
8cc825a
Merge branch 'main' into next
anthropic-sdks-writer[bot] Sep 30, 2026
bbd9598
fix(api): send the beta header by default when listing spend limits
anthropic-sdks-writer[bot] Oct 1, 2026
c355f1a
chore(internal): run detekt on the core module in eight parallel tasks
anthropic-sdks-writer[bot] Oct 1, 2026
d1f3a63
chore(ci): generate the Javadoc in the same Gradle run as the compile
anthropic-sdks-writer[bot] Oct 1, 2026
ddb499a
chore(docs): correct example groups in rate limit list description
anthropic-sdks-writer[bot] Oct 1, 2026
df57dee
feat(api): add line to model objects
anthropic-sdks-writer[bot] Oct 1, 2026
9231cff
chore(tests): run tests skipped for a query param bug that is now fixed
anthropic-sdks-writer[bot] Oct 1, 2026
d50ce89
chore(tests): run tests that an older mock server could not serve
anthropic-sdks-writer[bot] Oct 1, 2026
d21d76f
chore(tests): run the tests skipped for incomplete example responses
anthropic-sdks-writer[bot] Oct 1, 2026
c1450d5
feat(api): add include_default parameter to list workspaces
anthropic-sdks-writer[bot] Oct 1, 2026
a012009
fix(client): send array header params as a single comma-separated header
anthropic-sdks-writer[bot] Oct 2, 2026
83c1432
fix(client): send default and caller-provided array header values in …
anthropic-sdks-writer[bot] Oct 2, 2026
8dd88f3
fix(client): fix requests failing under ProGuard and R8, and keep muc…
anthropic-sdks-writer[bot] Oct 2, 2026
6560b24
fix(client): don't send a default header value again when the caller …
anthropic-sdks-writer[bot] Oct 2, 2026
a5c7977
fix(client): fix profile config parsing under ProGuard with older Jac…
claude[bot] Oct 2, 2026
1c424bf
chore(docs): update the description of the Model line field
anthropic-sdks-writer[bot] Oct 2, 2026
537fae7
docs(api): state the agent tools limit as 256
anthropic-sdks-writer[bot] Oct 2, 2026
20b61fc
feat(api): add display_name to RBAC roles and deprecate name
anthropic-sdks-writer[bot] Oct 3, 2026
9de8343
feat(api): add disabled to thinking types in model capabilities
anthropic-sdks-writer[bot] Oct 6, 2026
8c207f2
feat(api): add claude-haiku-5-5 and typed computer and browser toolse…
anthropic-sdks-writer[bot] Oct 7, 2026
00de508
chore(docs): update the activity summaries endpoint description
anthropic-sdks-writer[bot] Oct 7, 2026
476c9df
feat(api): add lifecycle stage fields and filter to /v1/models
anthropic-sdks-writer[bot] Oct 7, 2026
608e237
release: 2.69.0
stainless-app[bot] Oct 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ jobs:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build SDK
run: ./scripts/build
# Where the "Build local Maven repo" step runs it needs the Javadoc, and generating it in
# the same Gradle run as the compile is faster.
run: ./scripts/build ${{ github.repository != 'anthropics/anthropic-sdk-java' && !startsWith(github.ref, 'refs/heads/stl/') && 'dokkaGeneratePublicationJavadoc' || '' }}

- name: Build local Maven repo
if: |-
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.68.0"
".": "2.69.0"
}
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# Changelog

## 2.69.0 (2026-10-07)

Full Changelog: [v2.68.0...v2.69.0](https://github.com/anthropics/anthropic-sdk-java/compare/v2.68.0...v2.69.0)

### Features

* **api:** add claude-haiku-5-5 and typed computer and browser toolset tool calls ([8c207f2](https://github.com/anthropics/anthropic-sdk-java/commit/8c207f2e239dedd88f7d3bb5c15d49ed44446892))
* **api:** add disabled to thinking types in model capabilities ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **api:** add display_name to RBAC roles and deprecate name ([20b61fc](https://github.com/anthropics/anthropic-sdk-java/commit/20b61fc8fadb5ad4f75c0fe162e865bec3e7edcc))
* **api:** add include_default parameter to list workspaces ([c1450d5](https://github.com/anthropics/anthropic-sdk-java/commit/c1450d5e7eee91d777365f300677f3a1f84100e7))
* **api:** add lifecycle stage fields and filter to /v1/models ([476c9df](https://github.com/anthropics/anthropic-sdk-java/commit/476c9df6b02d2c1d5d41e118b739a8c73c19ae9c))
* **api:** add line to model objects ([df57dee](https://github.com/anthropics/anthropic-sdk-java/commit/df57deef84fb1f68e7761adba5024bd7ad1a41c9))
* **api:** add url_sources to the Managed Agents web_fetch tool config ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **api:** add web search and code execution support to model capabilities ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))


### Bug Fixes

* **api:** send the beta header by default when listing spend limits ([bbd9598](https://github.com/anthropics/anthropic-sdk-java/commit/bbd95986796f7b02dbbff9840f2b11bb843265f5))
* **client:** don't send a default header value again when the caller passes it too ([6560b24](https://github.com/anthropics/anthropic-sdk-java/commit/6560b247049c02f2e79d5a7cda12244c8cf5602d))
* **client:** fix profile config parsing under ProGuard with older Jackson versions ([#338](https://github.com/anthropics/anthropic-sdk-java/issues/338)) ([a5c7977](https://github.com/anthropics/anthropic-sdk-java/commit/a5c7977fcd7190b8bd3ed39838d11be0bdd9981a))
* **client:** fix requests failing under ProGuard and R8, and keep much less code ([8dd88f3](https://github.com/anthropics/anthropic-sdk-java/commit/8dd88f3e7ff7fd6fee74e2f7a526ffc3d4adc9c1))
* **client:** handle mcp tool listing blocks in structured content blocks ([#340](https://github.com/anthropics/anthropic-sdk-java/issues/340)) ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **client:** send array header params as a single comma-separated header ([a012009](https://github.com/anthropics/anthropic-sdk-java/commit/a012009076aa31993bedbf591d61f846e20c2e00))
* **client:** send default and caller-provided array header values in a single header ([83c1432](https://github.com/anthropics/anthropic-sdk-java/commit/83c1432eac855a114ca7b8e797cc78a623f2b899))
* **client:** throw an error when a path parameter is "." or ".." ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **docs:** omit empty doc comments for blank descriptions ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))


### Chores

* **api:** mark the Text Completions API as deprecated ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **ci:** generate the Javadoc in the same Gradle run as the compile ([d1f3a63](https://github.com/anthropics/anthropic-sdk-java/commit/d1f3a6329c42ae06d486291c2194f3b0cbb09a59))
* **docs:** correct example groups in rate limit list description ([ddb499a](https://github.com/anthropics/anthropic-sdk-java/commit/ddb499a6fa826ea874114243b990d77ad47889a2))
* **docs:** correct when usage and cost report data becomes final ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **docs:** describe a federation rule's target by its type ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **docs:** fix example IDs in sessions, agents and vault credentials ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **docs:** update Managed Agents multiagent and thread descriptions ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **docs:** update the activity summaries endpoint description ([00de508](https://github.com/anthropics/anthropic-sdk-java/commit/00de508f05be834859c73b646c4c7e697206352c))
* **docs:** update the description of the Model line field ([1c424bf](https://github.com/anthropics/anthropic-sdk-java/commit/1c424bff639f9ed48adf4294e8b204217e62bd49))
* **internal:** add REVIEW.md with review instructions ([9de8343](https://github.com/anthropics/anthropic-sdk-java/commit/9de83439a4f684c5231f3596f4d0cdb8606550aa))
* **internal:** run detekt on the core module in eight parallel tasks ([c355f1a](https://github.com/anthropics/anthropic-sdk-java/commit/c355f1ad3c3d66b0fc55e46507f317a605938f06))
* **tests:** run tests skipped for a query param bug that is now fixed ([9231cff](https://github.com/anthropics/anthropic-sdk-java/commit/9231cffafe40bdae1b7d42759d2ee632656c417a))
* **tests:** run tests that an older mock server could not serve ([d50ce89](https://github.com/anthropics/anthropic-sdk-java/commit/d50ce890160b0289b4cd572dfb83f7a2bbf15684))
* **tests:** run the tests skipped for incomplete example responses ([d21d76f](https://github.com/anthropics/anthropic-sdk-java/commit/d21d76f11274bbeb3b23949eadc9cf922d2143a1))


### Documentation

* **api:** state the agent tools limit as 256 ([537fae7](https://github.com/anthropics/anthropic-sdk-java/commit/537fae7f7e37537a5bf8ba0599544c8d5aff8bae))

## 2.68.0 (2026-09-30)

Full Changelog: [v2.67.0...v2.68.0](https://github.com/anthropics/anthropic-sdk-java/compare/v2.67.0...v2.68.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Full documentation is available at **[platform.claude.com/docs/en/api/sdks/java]
### Gradle

```kotlin
implementation("com.anthropic:anthropic-java:2.68.0")
implementation("com.anthropic:anthropic-java:2.69.0")
```

### Maven
Expand All @@ -24,7 +24,7 @@ implementation("com.anthropic:anthropic-java:2.68.0")
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java</artifactId>
<version>2.68.0</version>
<version>2.69.0</version>
</dependency>
```

Expand Down
24 changes: 24 additions & 0 deletions REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Review instructions

## Report these as Important, as well as functional bugs

- A violation of this repository's `CLAUDE.md`. Quote the rule
- A new public name, parameter or option that the PR description does not list
- A behavior change that still applies with the PR's feature switched off
- A new runtime check of an API response, or a client-side copy of validation
that the API does
- Code that validates, reorders, defaults or drops part of a request the caller
built
- Code that fails on an enum member, union variant or field this version does
not know
- A fix made to one copy of logic that exists more than once
- A behavior change with no test that fails before it and passes after
- A hand-written list of fields, variants or names that generated code also
carries, with no tripwire test
- A comment that restates the code, or that runs past three lines on a symbol
that is not public

## Don't report these

- A missing runtime check of an API response, or missing client-side validation
- What an application can do to its own process, credentials or telemetry
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ProGuard narrows the return types of these methods but leaves the casts to their original return types in place, so
# the class fails verification on the first request. This only stops ProGuard from optimizing the methods.
-keepclassmembers,allowshrinking,allowobfuscation class okio.Okio__JvmOkioKt { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AnthropicClientAsyncImpl(private val clientOptions: ClientOptions) : Anthr
else
clientOptions
.toBuilder()
.putHeader("User-Agent", "${javaClass.simpleName}/Java ${getPackageVersion()}")
.putHeader("User-Agent", "AnthropicClientAsyncImpl/Java ${getPackageVersion()}")
.build()

// Pass the original clientOptions so that this client sets its own User-Agent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AnthropicClientImpl(private val clientOptions: ClientOptions) : AnthropicC
else
clientOptions
.toBuilder()
.putHeader("User-Agent", "${javaClass.simpleName}/Java ${getPackageVersion()}")
.putHeader("User-Agent", "AnthropicClientImpl/Java ${getPackageVersion()}")
.build()

// Pass the original clientOptions so that this client sets its own User-Agent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.anthropic.config

import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.json.JsonMapper
Expand All @@ -14,6 +15,7 @@ enum class AuthenticationType {

@JsonIgnoreProperties(ignoreUnknown = true)
class IdentityTokenConfig
@JsonCreator
private constructor(
@JsonProperty("source") private val source: String?,
@JsonProperty("path") private val path: String?,
Expand Down Expand Up @@ -52,6 +54,7 @@ private constructor(

@JsonIgnoreProperties(ignoreUnknown = true)
class AuthenticationConfig
@JsonCreator
private constructor(
@JsonProperty("type") private val type: AuthenticationType?,
@JsonProperty("federation_rule_id") private val federationRuleId: String?,
Expand Down Expand Up @@ -156,6 +159,7 @@ private constructor(

@JsonIgnoreProperties(ignoreUnknown = true)
class ProfileConfig
@JsonCreator
private constructor(
@JsonProperty("authentication") private val authentication: AuthenticationConfig?,
@JsonProperty("base_url") private val baseUrl: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,28 @@ private constructor(
is JsonBoolean -> put(name, value.value.toString())
is JsonNumber -> put(name, value.value.toString())
is JsonString -> put(name, value.value)
is JsonArray -> value.values.forEach { put(name, it) }
is JsonArray ->
if (value.values.isNotEmpty())
put(
name,
value.values
.asSequence()
.mapNotNull {
when (it) {
is JsonMissing,
is JsonNull -> null
is JsonBoolean -> it.value.toString()
is JsonNumber -> it.value.toString()
is JsonString -> it.value
is JsonArray,
is JsonObject ->
throw IllegalArgumentException(
"Cannot comma separate non-primitives in headers"
)
}
}
.joinToString(","),
)
is JsonObject ->
value.values.forEach { (nestedName, value) -> put("$name.$nestedName", value) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ private constructor(
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())

fun addPathSegment(pathSegment: String) = apply { pathSegments.add(pathSegment) }
fun addPathSegment(pathSegment: String) = apply {
pathSegments.add(checkPathSegment(pathSegment))
}

fun addPathSegments(vararg pathSegments: String) = apply {
this.pathSegments.addAll(pathSegments)
this.pathSegments.addAll(pathSegments.onEach { checkPathSegment(it) })
}

fun replaceAllPathSegments(vararg pathSegments: String) = apply {
Expand Down Expand Up @@ -195,3 +197,12 @@ private constructor(
)
}
}

// Throws on a "." or ".." segment: HTTP clients collapse them ("/cards/.." becomes "/"), so the
// request would go to a different path.
private fun checkPathSegment(segment: String): String =
segment.also {
check(it != "." && it != "..") {
"Path segment \"$it\" is a dot-segment and can't be safely passed as a path parameter"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,16 @@ private constructor(
override fun _headers(): Headers =
Headers.builder()
.apply {
betas?.forEach { put("anthropic-beta", it.toString()) }
betas?.let {
if (it.isNotEmpty()) {
put(
"anthropic-beta",
it.map { it.toString() }
.let { it + (listOf("managed-agents-2026-04-01") - it) }
.joinToString(","),
)
}
}
workspaceId?.let { put("anthropic-workspace-id", it) }
putAll(additionalHeaders)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ private constructor(
fun metadata(): Optional<Metadata> = body.metadata()

/**
* Multiagent orchestration configuration. Currently supports the `coordinator` topology with a
* roster of 1-20 agents.
* Multiagent orchestration configuration.
*
* @throws AnthropicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand All @@ -128,7 +127,7 @@ private constructor(
fun system(): Optional<String> = body.system()

/**
* Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed.
* Tool configurations available to the agent. Maximum of 256 tools across all toolsets allowed.
*
* @throws AnthropicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand Down Expand Up @@ -389,10 +388,7 @@ private constructor(
*/
fun metadata(metadata: JsonField<Metadata>) = apply { body.metadata(metadata) }

/**
* Multiagent orchestration configuration. Currently supports the `coordinator` topology
* with a roster of 1-20 agents.
*/
/** Multiagent orchestration configuration. */
fun multiagent(multiagent: BetaManagedAgentsMultiagentParams?) = apply {
body.multiagent(multiagent)
}
Expand Down Expand Up @@ -494,7 +490,7 @@ private constructor(
fun system(system: JsonField<String>) = apply { body.system(system) }

/**
* Tool configurations available to the agent. Maximum of 128 tools across all toolsets
* Tool configurations available to the agent. Maximum of 256 tools across all toolsets
* allowed.
*/
fun tools(tools: List<Tool>) = apply { body.tools(tools) }
Expand Down Expand Up @@ -686,7 +682,16 @@ private constructor(
override fun _headers(): Headers =
Headers.builder()
.apply {
betas?.forEach { put("anthropic-beta", it.toString()) }
betas?.let {
if (it.isNotEmpty()) {
put(
"anthropic-beta",
it.map { it.toString() }
.let { it + (listOf("managed-agents-2026-04-01") - it) }
.joinToString(","),
)
}
}
workspaceId?.let { put("anthropic-workspace-id", it) }
putAll(additionalHeaders)
}
Expand Down Expand Up @@ -792,8 +797,7 @@ private constructor(
fun metadata(): Optional<Metadata> = metadata.getOptional("metadata")

/**
* Multiagent orchestration configuration. Currently supports the `coordinator` topology
* with a roster of 1-20 agents.
* Multiagent orchestration configuration.
*
* @throws AnthropicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand All @@ -818,7 +822,7 @@ private constructor(
fun system(): Optional<String> = system.getOptional("system")

/**
* Tool configurations available to the agent. Maximum of 128 tools across all toolsets
* Tool configurations available to the agent. Maximum of 256 tools across all toolsets
* allowed.
*
* @throws AnthropicInvalidDataException if the JSON field has an unexpected type (e.g. if
Expand Down Expand Up @@ -1059,10 +1063,7 @@ private constructor(
*/
fun metadata(metadata: JsonField<Metadata>) = apply { this.metadata = metadata }

/**
* Multiagent orchestration configuration. Currently supports the `coordinator` topology
* with a roster of 1-20 agents.
*/
/** Multiagent orchestration configuration. */
fun multiagent(multiagent: BetaManagedAgentsMultiagentParams?) =
multiagent(JsonField.ofNullable(multiagent))

Expand Down Expand Up @@ -1187,7 +1188,7 @@ private constructor(
fun system(system: JsonField<String>) = apply { this.system = system }

/**
* Tool configurations available to the agent. Maximum of 128 tools across all toolsets
* Tool configurations available to the agent. Maximum of 256 tools across all toolsets
* allowed.
*/
fun tools(tools: List<Tool>) = tools(JsonField.of(tools))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,16 @@ private constructor(
override fun _headers(): Headers =
Headers.builder()
.apply {
betas?.forEach { put("anthropic-beta", it.toString()) }
betas?.let {
if (it.isNotEmpty()) {
put(
"anthropic-beta",
it.map { it.toString() }
.let { it + (listOf("managed-agents-2026-04-01") - it) }
.joinToString(","),
)
}
}
workspaceId?.let { put("anthropic-workspace-id", it) }
putAll(additionalHeaders)
}
Expand Down
Loading
Loading