Commit Graph

664 Commits

Author SHA1 Message Date
Mario Zechner
876a197b19 Add [Unreleased] section for next cycle 2026-04-22 21:38:11 +02:00
Mario Zechner
3dacaa8ed9 fix(coding-agent,tui): drop typebox compiler shim and fix progress 2026-04-22 21:12:20 +02:00
Armin Ronacher
35ff2689ee fix(typebox): migrate to v1 with extension compat (#3474)
* fix(typebox): migrate to v1 with extension compat

Replace AJV-based validation with TypeBox-native validation, keep legacy extension imports working (including @sinclair/typebox/compiler), and restore coercion for serialized/plain JSON schemas.

This change closes #3112.

* fix(typebox): use canonical imports and harden coercion

Switch first-party code to canonical typebox imports while retaining legacy extension aliases in the loader.

Remove obsolete runtime codegen guards, expand serialized JSON-schema coercion coverage, and update related tests and fixtures.

Fixes #3112.

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-22 19:59:33 +02:00
Mario Zechner
a23fab4693 fix(ai): synthesize trailing orphaned tool results closes #3555 2026-04-22 19:41:55 +02:00
Mario Zechner
6553141f69 fix(ai): add gemini 3.1 flash lite cloud code assist model
closes #3545
2026-04-22 19:13:51 +02:00
Mario Zechner
9f91276a42 Add [Unreleased] section for next cycle 2026-04-22 02:15:04 +02:00
Mario Zechner
0bb0a58466 feat(ai): add Fireworks provider support closes #3519 2026-04-22 01:09:11 +02:00
Mario Zechner
b0217ca6f8 fix(ai): drop deprecated fine-grained-tool-streaming beta header, use eager_input_streaming per-tool
Replace the deprecated global anthropic-beta header with per-tool
eager_input_streaming: true. Fix empty anthropic-beta header causing
400 errors on models with no beta features.

fixes #3175
2026-04-21 23:53:23 +02:00
Mario Zechner
e58d631c89 Reapply "fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures"
This reverts commit fc9220d2de.
2026-04-21 23:42:19 +02:00
Mario Zechner
fc9220d2de Revert "fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures"
This reverts commit 4b926a30a2.
2026-04-21 23:19:52 +02:00
Mario Zechner
4b926a30a2 fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures
Bypass the Anthropic SDK streaming parser entirely. Use
client.messages.create().asResponse() and decode the SSE stream
ourselves with defensive JSON parsing that repairs invalid escape
sequences and control characters inside string literals.

- Switch from SDK .stream() to .asResponse() + pi-owned SSE decoder
- Add repairJson() / parseJsonWithRepair() to json-parse.ts
- Add anthropic-sse-parsing.test.ts regression for malformed tool deltas
- Update github-copilot-anthropic.test.ts mock to match new call path
- Update deprecated claude-3-5-haiku-20241022 refs to claude-haiku-4-5
- Remove stale non-reasoning model test

fixes #3175
2026-04-21 23:00:56 +02:00
Mario Zechner
a0a16c7762 fix(amazon-bedrock): restore regional endpoint resolution
closes #3481
closes #3485
closes #3486
closes #3487
closes #3488
2026-04-21 13:20:10 +02:00
Mario Zechner
19013265a8 Add [Unreleased] section for next cycle 2026-04-20 23:55:47 +02:00
Mario Zechner
1d488626d9 fix(ai): preserve requiresThinkingAsText replay semantics closes #3387 2026-04-20 19:44:38 +02:00
Mario Zechner
3054fd7a3b fix(ai,coding-agent): support anthropic-style cache control for openai compatibles closes #3392 2026-04-20 17:12:05 +02:00
Mario Zechner
4b2caf43a8 fix(ai): add completions session affinity compat closes #3430 2026-04-20 16:55:16 +02:00
Mario Zechner
2f4f283cc2 fix(ai,coding-agent): preserve non-vision image placeholders closes #3429 2026-04-20 16:52:27 +02:00
Mario Zechner
aa1b587b10 fix(ai): add direct OpenAI completions prompt caching closes #3426 2026-04-20 15:37:29 +02:00
Michael
ebc60aa825 feat(ai): allow overriding oauth callback bind host closes #3396 (#3409) 2026-04-20 13:43:08 +02:00
Vladyslav Tkachenko
f732f5e858 fix(ai): strip JSON Schema meta keys for Cloud Code Assist (#3412) 2026-04-19 16:54:49 +02:00
wirjo
a5fac1ef09 feat(amazon-bedrock): conditionally omit maxTokens from inferenceConfig (#3400)
When model.maxTokens is 0 (unset/unknown), omit maxTokens from the
Bedrock ConverseStream inferenceConfig instead of sending 0.

Bedrock's inferenceConfig.maxTokens is optional — when omitted, the
model uses its own internal default. This is optimal for Bedrock's
token quota management:

- At request start, Bedrock reserves input_tokens + max_tokens from
  your TPM quota
- For Claude 3.7+ models, output tokens have a 5x burndown rate
- Sending an unnecessarily high maxTokens wastes TPM capacity during
  the reservation window, reducing concurrent request throughput
- Omitting it lets Bedrock use the model default (~4096 for Claude),
  matching expected output sizes and maximizing quota utilization

Also applies the same conditional pattern to temperature — only
include it in inferenceConfig when explicitly set.

Changes:
- simple-options.ts: Use ?? instead of || so explicit 0 is preserved;
  return undefined when model.maxTokens is 0 (unset)
- amazon-bedrock.ts: Spread maxTokens and temperature into
  inferenceConfig only when defined

Fixes #3399
2026-04-19 08:48:43 +02:00
wirjo
5a889ef58b fix(amazon-bedrock): pass model.baseUrl as endpoint to BedrockRuntimeClient (#3402)
BedrockRuntimeClient was constructed without the endpoint option,
causing model.baseUrl to be silently ignored. This meant custom
Bedrock endpoints (VPC endpoints, proxy setups, custom routing)
were never used — requests always went to the default regional
endpoint.

Pass model.baseUrl as the endpoint config when set. When not set
(the default), the SDK falls back to the standard regional endpoint
constructed from the region config, preserving existing behavior.

Fixes openclaw/openclaw#47899
2026-04-19 08:47:10 +02:00
Mario Zechner
00887125c0 Add [Unreleased] section for next cycle 2026-04-18 01:32:50 +02:00
Mario Zechner
454b9619c7 fix(ai): use SDK token auth and omit Bedrock display in GovCloud closes #3359 2026-04-18 01:24:13 +02:00
Mario Zechner
2dddc5ba25 fix(ai): sanitize Mistral tool schemas closes #3361 2026-04-18 00:54:46 +02:00
Mario Zechner
62778a82d5 fix(ai): use reasoning_effort for Mistral Small 4 closes #3338 2026-04-17 22:44:27 +02:00
Mario Zechner
e3f6912d49 fix(ai): preserve qwen chat-template thinking closes #3325 2026-04-17 16:59:00 +02:00
Markus Ylisiurunen
2cdac7382a fix(ai): trust requested Codex service tier (#3307) 2026-04-17 01:50:04 +02:00
Armin Ronacher
b789900570 fix(ai): type bedrock bearer auth middleware 2026-04-16 23:50:29 +02:00
wirjo
22085a9a17 feat(bedrock): support Bearer token auth for Converse API (#3125)
Adds bearer token authentication for the Bedrock Converse API, enabling
users to authenticate with an API key instead of SigV4/IAM credentials.

When a bearer token is available (via `options.bearerToken` or the
`AWS_BEARER_TOKEN_BEDROCK` env var), the provider:
1. Sets dummy credentials to prevent SDK credential resolution errors
2. Injects middleware after SigV4 signing that replaces the Authorization
   header with `Bearer <token>` and removes SigV4-specific headers

This uses the official `bedrock:CallWithBearerToken` IAM action, which
is a documented AWS feature for API key auth on Bedrock endpoints.

Use case: users who receive a Bedrock API key (bearer token) from the
AWS console or their admin, without having IAM access keys or instance
roles. Similar to how ANTHROPIC_API_KEY works for direct Anthropic API.

Required IAM permission on the token's identity:
  bedrock:CallWithBearerToken

Tested: Bearer token successfully authenticates against Bedrock Converse
API (returns correct 403 for missing IAM permission, not auth format error).
SigV4 path is unchanged when no bearer token is set.
2026-04-16 23:34:18 +02:00
Mario Zechner
5476b56e41 Add [Unreleased] section for next cycle 2026-04-16 23:26:44 +02:00
Vegard Stikbakke
45f1a2cd00 fix(ai): set session id headers for all OpenAI compatible responses (#3264) 2026-04-16 22:38:40 +02:00
Mario Zechner
acbf8eca06 feat(ai): add thinkingDisplay option for Anthropic and Bedrock Claude
Exposes the new ThinkingConfig.display field on Anthropic and Bedrock
Claude providers. Defaults to 'summarized' so Claude Opus 4.7 and Mythos
Preview keep returning thinking text despite Anthropic's silent default
change to 'omitted'. Set to 'omitted' explicitly to skip thinking
streaming for faster time-to-first-text-token.
2026-04-16 22:12:06 +02:00
Mario Zechner
a5f9f47d13 fix(ai): restore changelog and sdk type compatibility 2026-04-16 20:32:23 +02:00
Mario Zechner
d131fcd4ba feat(coding-agent): add after_provider_response hook closes #3128 2026-04-16 20:28:08 +02:00
Armin Ronacher
aa78fa91fe Add [Unreleased] section for next cycle 2026-04-16 20:06:43 +02:00
Armin Ronacher
54bbaece5c fix(ai): rebuild models 2026-04-16 19:58:40 +02:00
Markus Ylisiurunen
d1c6cb1e0f fix(ai): Fix a configuration bug with Opus 4.7 adaptive thinking (#3286) 2026-04-16 19:57:19 +02:00
Armin Ronacher
a91978cf19 fix(ai): add temporary Anthropic Opus 4.7 model override 2026-04-16 17:06:23 +02:00
Mario Zechner
eb1cf80b10 fix(ai,coding-agent): replace deprecated kimi k2p5 model closes #3242 2026-04-16 12:06:24 +02:00
Mario Zechner
1c016cb018 fix(ai): cache Anthropic tools separately from transcript closes #3260 2026-04-16 11:31:58 +02:00
Mario Zechner
e0918a627b Add [Unreleased] section for next cycle 2026-04-15 23:41:16 +02:00
Mario Zechner
b920622110 refactor(ai): extract synthetic tool result helper 2026-04-15 20:53:21 +02:00
deepkilo
3a13fa80c8 fix(ai): treat gcp vertex marker as ADC auth (#3221) 2026-04-15 16:20:45 +02:00
Mario Zechner
94f24f2102 Add [Unreleased] section for next cycle 2026-04-14 23:42:08 +02:00
Mario Zechner
018b40c30c fix: align OpenAI cache affinity and use uuidv7 session ids 2026-04-14 23:20:13 +02:00
Armin Ronacher
e2b40dfc81 fix(ai): strip partialJson from responses tool calls
Mutate persisted tool-call blocks in place on function_call completion,
remove partialJson, and emit the same reference on toolcall_end.
Add regression coverage for persisted block cleanup and event identity.

fixes #3078
2026-04-14 18:56:53 +02:00
Mario Zechner
852efe9596 Add [Unreleased] section for next cycle 2026-04-14 00:23:18 +02:00
Markus Ylisiurunen
f829f80885 fix(ai): support service tier in codex responses (#2996) 2026-04-13 11:04:11 +02:00
Aadish Verma
4f7fc9de7e fix: bump antigravity User-Agent header version (#2901)
resolves #2815

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-09 03:10:05 +02:00