Commit Graph

1152 Commits

Author SHA1 Message Date
Mario Zechner
f70d041e71 feat(ai): add GPT-5.5 Codex model 2026-04-23 21:36:16 +02:00
Armin Ronacher
e97051313d fix(coding-agent,ai): show env auth source in /login 2026-04-23 21:19:53 +02:00
Mario Zechner
01509156b3 fix(ai): coalesce malformed streamed tool calls closes #3576 2026-04-23 16:05:21 +02:00
Mario Zechner
f0ebb327f2 fix(ai): set default Kimi Coding user agent closes #3586 2026-04-23 12:12:54 +02:00
Mario Zechner
876a197b19 Add [Unreleased] section for next cycle 2026-04-22 21:38:11 +02:00
Mario Zechner
85a9ce3024 Release v0.69.0 2026-04-22 21:36:47 +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
8234ebf9ee feat(coding-agent,tui): add stacked autocomplete providers closes #2983 2026-04-22 15:44:08 +02:00
Mario Zechner
9f91276a42 Add [Unreleased] section for next cycle 2026-04-22 02:15:04 +02:00
Mario Zechner
a2c183db0f Release v0.68.1 2026-04-22 02:14:13 +02:00
Mario Zechner
0bb0a58466 feat(ai): add Fireworks provider support closes #3519 2026-04-22 01:09:11 +02:00
Mario Zechner
6480b734c1 docs(ai): add changelog entry for Anthropic SSE parsing fix (#3175) 2026-04-22 00:00:26 +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
6f345b78d5 Release v0.68.0 2026-04-20 23:54:54 +02:00
Mario Zechner
639da8a602 docs(changelog): audit unreleased entries 2026-04-20 23:53:53 +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
Ramiz Wachtler
cbe0e8304f fix(ai): replace stale OpenRouter Llama 4 Maverick test model with Llama 4 Scout (#3421)
* fix(ai): replace stale OpenRouter Llama 4 Maverick test model

- Switch OpenRouter Meta test model from `meta-llama/llama-4-maverick` to `meta-llama/llama-4-scout` in AI tests.

- CI failure body:
  - packages/ai/test/context-overflow.test.ts(531,41): error TS2345: Argument of type "meta-llama/llama-4-maverick" is not assignable to parameter of type "...".
  - packages/ai/test/total-tokens.test.ts(520,40): error TS2345: Argument of type "meta-llama/llama-4-maverick" is not assignable to parameter of type "...".

* chore(ai): add changelog entry for OpenRouter test model swap

- Add Unreleased Fixed entry for switching OpenRouter Meta test model to llama-4-scout

- Reference PR #3421 attribution
2026-04-20 13:21:29 +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
a1edb8a463 Release v0.67.68 2026-04-18 01:31:38 +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
cbf0d1fbfa Add [Unreleased] section for next cycle 2026-04-17 23:06:48 +02:00
Mario Zechner
1c0b628882 Release v0.67.67 2026-04-17 23:06:48 +02:00
Mario Zechner
b0c2579fd7 chore(changelog): update unreleased entries 2026-04-17 22:54:02 +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
Mario Zechner
8404fbafdb test(ai): align adaptive thinking payload assertions 2026-04-17 00:35:07 +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
Mario Zechner
2a356dca4d Release v0.67.6 2026-04-16 23:25:54 +02:00
Mario Zechner
f84c4c89f5 fix(ai): restore FakeOpenAI mock .withResponse() so openai-completions tests pass
The openai-completions provider now calls .withResponse() on the
create() result to surface HTTP status/headers for the new onResponse
hook (d131fcd4). The FakeOpenAI test mock only returned an async
iterable, so 4 tests in openai-completions-tool-choice.test.ts that
actually consume the stream failed with "withResponse is not a function".

Updated the mock to return a Promise augmented with .withResponse()
resolving to { data: <async iterable>, response: { status, headers } }.

closes #3304
2026-04-16 22:57:30 +02:00
Mario Zechner
ab518d8651 docs(ai): changelog for openai-responses session header fix
closes #3196
2026-04-16 22:42:40 +02:00