openclaw/extensions/anthropic-vertex
pick-cat e72dadbb3b
fix(anthropic): resolve thinking as disabled when legacy budget is below 1024 (#101415)
* fix(anthropic): resolve thinking as disabled when legacy budget is below 1024

When adjustMaxTokensForThinking collapses the thinking budget below the
Anthropic minimum (1024), option resolution now sets thinkingEnabled to
false instead of always forcing it to true. This keeps every downstream
consumer (payload, replay, temperature, tool-choice) consistent — they
all see the same disabled state instead of an enabled flag with a
missing or API-rejected thinking block.

|| → ?? in both builders is defensive: the resolution layer already
prevents invalid budgets from reaching the builder through the normal
path, but ?? preserves an explicit zero when the builder is called
directly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(anthropic): guard raw streamAnthropic builder path against sub-minimum budgets

Add budget guards in both Anthropic payload builders so direct
streamAnthropic and bundled-plugin callers (e.g. Mantle) that bypass
option resolution also get the disabled-state rule instead of producing
API-rejected { type: "enabled", budget_tokens: < 1024 } requests.

Add proof-anthropic-thinking-budget.mts driving real production
functions with terminal output and negative control.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(anthropic): normalize legacy thinking budgets

Co-authored-by: Pick-cat <huang.ting3@xydigit.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-07 08:42:40 +01:00
..
api.test.ts docs: document small extension sources 2026-06-04 21:02:07 -04:00
api.ts refactor(shared): consolidate provider and utility lazy loaders (#98749) 2026-07-02 21:16:26 -07:00
index.test.ts feat(models): add Claude Mythos 5 support (#101238) 2026-07-06 17:19:49 -07:00
index.ts feat(anthropic): support Claude Fable 5 adaptive thinking (#91882) 2026-06-10 08:08:35 -07:00
npm-shrinkwrap.json chore: update dependencies (#100027) 2026-07-04 14:56:50 -04:00
openclaw.plugin.json fix(plugins): remove simpleicons icon color paths (#95987) 2026-06-23 12:16:02 -07:00
package.json chore: update dependencies (#100027) 2026-07-04 14:56:50 -04:00
provider-catalog.ts feat(models): add Claude Mythos 5 support (#101238) 2026-07-06 17:19:49 -07:00
provider-discovery.import-guard.test.ts docs: document small extension sources 2026-06-04 21:02:07 -04:00
provider-discovery.ts docs: document anthropic vertex plugin 2026-06-04 07:13:17 -04:00
provider-policy-api.test.ts feat(models): add Claude Mythos 5 support (#101238) 2026-07-06 17:19:49 -07:00
provider-policy-api.ts feat(anthropic): support Claude Fable 5 adaptive thinking (#91882) 2026-06-10 08:08:35 -07:00
README.md docs(plugins): add npm readmes for channel providers 2026-05-31 20:02:45 +01:00
region.adc.test.ts docs: document small extension sources 2026-06-04 21:02:07 -04:00
region.test.ts docs: document small extension sources 2026-06-04 21:02:07 -04:00
region.ts docs: document anthropic vertex plugin 2026-06-04 07:13:17 -04:00
setup-api.ts docs: document anthropic vertex plugin 2026-06-04 07:13:17 -04:00
stream-runtime.test.ts fix(anthropic): resolve thinking as disabled when legacy budget is below 1024 (#101415) 2026-07-07 08:42:40 +01:00
stream-runtime.ts fix(anthropic): resolve thinking as disabled when legacy budget is below 1024 (#101415) 2026-07-07 08:42:40 +01:00
tsconfig.json

OpenClaw Anthropic Vertex Provider

Official OpenClaw provider plugin for Claude models hosted through Google Vertex AI.

Install from OpenClaw:

openclaw plugin add @openclaw/anthropic-vertex-provider

Configure Google Cloud credentials and the target Vertex project/region in OpenClaw, then select Claude models with the Anthropic Vertex provider.