Skip to content

fix(anthropic): default client timeout when unset - #2800

Merged
geoand merged 1 commit into
quarkiverse:mainfrom
CryoThrust:fix/anthropic-client-default-timeout
Sep 14, 2026
Merged

geoand merged 1 commit into
quarkiverse:mainfrom
CryoThrust:fix/anthropic-client-default-timeout

Conversation

@CryoThrust

@CryoThrust CryoThrust commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

QuarkusAnthropicClient dereferenced builder.timeout unconditionally, so programmatically built Anthropic models failed with a NullPointerException when no timeout was configured. The LangChain4j Anthropic client contract defines a 15-second default when no timeout is provided; this change applies the same fallback before configuring the Quarkus REST client.

A focused runtime test verifies that the client builder can be constructed without an explicit timeout.

Local Maven verification is currently blocked because the configured internal repository resets while resolving the parent artifact io.quarkiverse:quarkiverse-parent:21.

@CryoThrust
CryoThrust requested a review from a team as a code owner September 2, 2026 07:38
@quarkus-bot

This comment has been minimized.

@CryoThrust

Copy link
Copy Markdown
Contributor Author

The failing CI test was exercising QuarkusRestClientBuilder outside a Quarkus CDI container, unrelated to the timeout fix. I isolated the regression test around the timeout defaulting logic and pushed 686b27c; this keeps the test deterministic and independent of REST client bootstrapping.

@quarkus-bot

This comment has been minimized.

@geoand
geoand force-pushed the fix/anthropic-client-default-timeout branch from 686b27c to fe4ef62 Compare September 4, 2026 08:14
@quarkus-bot

This comment has been minimized.

@geoand

geoand commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Can you please build with Java 25 and ensure the changed docs are committed?

Thanks

QuarkusAnthropicClient dereferenced builder.timeout unconditionally, so
programmatically built Anthropic models threw a NullPointerException when
no timeout was configured. Apply the same 15-second fallback that
DefaultAnthropicClient uses, before configuring the Quarkus REST client.

Fixes: quarkiverse#2798
@CryoThrust
CryoThrust force-pushed the fix/anthropic-client-default-timeout branch from fe4ef62 to 1e664e9 Compare September 14, 2026 05:57
@CryoThrust

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and dropped the hand-edited quarkus-all-config.adoc change — the two module-name headings it touched (A2A Apicurio Registry, MCP Apicurio Registry) are already correct on main since QUARKUS-9022, and regenerating the config docs now produces no diff, which is what the Documentation check was failing on.

The branch is now a single commit on top of main, still just the Anthropic timeout fix plus its test. Built with Temurin 25 (same as the documentation-check job) and ran model-providers/anthropic/runtime:

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0  -- BUILD SUCCESS

The MCP Conformance failure on the previous head looks unrelated: its log ends at npm error audit endpoint returned an error / { error: 'Service Unavailable' }, i.e. an npm registry hiccup rather than a test assertion.

@quarkus-bot

quarkus-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

Status for workflow Build (on pull request)

This is the status report for running Build (on pull request) on commit 1e664e9.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@geoand
geoand merged commit 5c075df into quarkiverse:main Sep 14, 2026
99 checks passed
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.

QuarkusAnthropicClient NPEs when the builder sets no .timeout(…)

2 participants