Skip to content

fix(ai): the claude provider sends what current Claude models accept, built by the anthropic SDK - #2285

Merged
dan-petty merged 1 commit into
mainfrom
fix/1428-claude-anthropic-sdk
Oct 26, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/1428-claude-anthropic-sdk

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Outbound requests to Anthropic models use the official anthropic SDK (version 1.12.1).
The SDK client binds directly to the factory-built shared HTTP client _shared_client().
Empty ai.model configuration for provider claude raises a ConfigurationError that names ai.model.
Model capabilities resolve through client.models.retrieve(model) and are cached per process.
When adaptive thinking is supported, requests emit thinking={"type": "adaptive"} and output_config.effort, and omit budget_tokens.
Sampling parameters (temperature, top_p) match between streamed and unstreamed requests and are only sent when the model capabilities declare sampling support.
Obsolete manual streaming frames and deprecated model strings are purged from the source tree.

Closes #1428

Change:
openspec/changes/archive/2026-10-26-1428-claude-anthropic-sdk/

Fail-to-Pass Verification

Verified with devops ci fail-to-pass --base origin/main:

1 failed on base (1 failed and 128 passed in tests/test_ai_client_finish_reasons.py, tests/test_ai_client_network.py, tests/test_ai_client_providers_and_embeddings.py, tests/test_ai_streaming.py, tests/test_claude_provider.py, tests/test_thinking_providers.py; 4 errored).

… built by the anthropic SDK

Outbound requests to Anthropic models use the official anthropic SDK (version 1.12.1).
The SDK client binds directly to the factory-built shared HTTP client.
Empty ai.model configuration for provider claude raises a ConfigurationError that names ai.model.
Model capabilities resolve through client.models.retrieve(model) and are cached per process.
When adaptive thinking is supported, requests emit thinking with type adaptive and output_config.effort, and omit budget_tokens.
Sampling parameters match between streamed and unstreamed requests and are only sent when model capabilities declare sampling support.
Obsolete manual streaming frames and deprecated model strings are purged from the source tree.

Closes #1428

Change:
openspec/changes/archive/2026-10-26-1428-claude-anthropic-sdk/

## Fail-to-Pass Verification

Verified with `devops ci fail-to-pass --base origin/main`:
```
1 failed on base (1 failed and 128 passed in tests/test_ai_client_finish_reasons.py, tests/test_ai_client_network.py, tests/test_ai_client_providers_and_embeddings.py, tests/test_ai_streaming.py, tests/test_claude_provider.py, tests/test_thinking_providers.py; 4 errored).
```
@dan-petty
dan-petty marked this pull request as ready for review October 26, 2026 04:27
@dan-petty
dan-petty merged commit 59471a4 into main Oct 26, 2026
17 checks passed
@dan-petty
dan-petty deleted the fix/1428-claude-anthropic-sdk branch October 26, 2026 12:32
dan-petty pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.2](v0.6.1...v0.6.2)
(2026-10-26)


### Bug Fixes

* **ai:** the claude provider sends what current Claude models accept,
built by the anthropic SDK
([#2285](#2285))
([59471a4](59471a4))
* **ai:** the openai provider without ai.api_base_url calls the OpenAI
API's /v1 routes, built by the openai SDK
([#2286](#2286))
([a7dd605](a7dd605)),
closes [#1427](#1427)
* **ci:** pin ty in the dev group so a new release cannot fail uv check
on main ([#2284](#2284))
([3936fe6](3936fe6)),
closes [#2281](#2281)
* **security:** query documented radar api with token and mark failed
lookups unverified
([#2289](#2289))
([c52af09](c52af09))
* **telemetry:** the project items gauge counts the items of the project
board by milestone, state, type and priority
([#2290](#2290))
([853296c](853296c))

---
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: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.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.

fix(ai): the claude provider sends what current Claude models accept, built by the anthropic SDK

1 participant