Commit Graph

18436 Commits

Author SHA1 Message Date
Alexander Bunn
57e6aeca84 fix(agents): detect llama.cpp slot overflow as context overflow
Auto-compaction never triggered for self-hosted llama.cpp HTTP servers
(used directly or behind an OpenAI-compatible shim configured with
`api: "openai-completions"`) because llama.cpp's native overflow wording
isn't covered by any existing pattern in `isContextOverflowError()` or
`matchesProviderContextOverflow()`.

When the prompt overshoots a slot's `--ctx-size`, llama.cpp returns:

  400 request (66202 tokens) exceeds the available context size (65536 tokens), try increasing it

That message uses "context size" rather than "context length", says
"request (N tokens)" instead of "input/prompt is too long", and the
status code is 400 (not 413), so it slips past every existing string
check and every regex in `PROVIDER_CONTEXT_OVERFLOW_PATTERNS`. The
generic candidate pre-check passes, but the concrete provider regexes
all miss, so the agent runner reports `surface_error reason=...` and
the user gets the raw upstream error instead of compaction + retry.

This commit adds a llama.cpp-shaped pattern next to the existing Bedrock
/ Vertex / Ollama / Cohere ones in
`PROVIDER_CONTEXT_OVERFLOW_PATTERNS`, plus four test cases (three
parameterised messages exercising the new regex directly, and one
end-to-end assertion that `isContextOverflowError()` now returns true
for the verbatim message produced by llama.cpp's slot manager).

The pattern is anchored on llama.cpp's stable slot-manager wording
(`(?:request|prompt) (N tokens) exceeds (the )?available context size`)
so it won't accidentally swallow unrelated provider errors.

Closes #64180

AI-assisted: drafted with Claude Code (Opus 4.6, 1M context).
Testing: targeted tests pass via `pnpm vitest run
src/agents/pi-embedded-helpers/provider-error-patterns.test.ts`
(26/26). Broader vitest run shows 2 unrelated failures in
`group-policy.fallback.contract.test.ts` that are not touched by this
change.
2026-04-10 13:30:33 +01:00
Peter Steinberger
12ae2fa408 ci: parallelize full-suite project shards 2026-04-10 13:23:03 +01:00
Peter Steinberger
66ac5194f7 test: honor low-worker full-suite gate 2026-04-10 13:10:04 +01:00
Nimrod Gutman
7bb98ea12f fix(btw): drop hidden reasoning from side-question context 2026-04-10 15:03:51 +03:00
Nimrod Gutman
9553b402ee fix(btw): strip embedded tool blocks from side-question context 2026-04-10 15:03:51 +03:00
Nimrod Gutman
cc5cb496ad fix(btw): strip replayed tool calls from side-question context 2026-04-10 15:03:51 +03:00
Peter Steinberger
bf40baaa4d fix(gateway): improve websocket auth logging 2026-04-10 12:39:08 +01:00
Peter Steinberger
d350280fc2 test: fix latest type and lazy cli gates 2026-04-10 12:37:01 +01:00
Peter Steinberger
2ad451e91f test: fix parallel full-suite exposed gates 2026-04-10 12:34:53 +01:00
Peter Steinberger
644105bea6 fix: restore latest main typecheck 2026-04-10 12:20:04 +01:00
Peter Steinberger
8e242622e1 fix: stabilize rebased test gates 2026-04-10 12:14:36 +01:00
Peter Steinberger
444cdd055d fix: stabilize main test gates 2026-04-10 12:14:36 +01:00
Peter Steinberger
ef1694575d fix: restore main type gates 2026-04-10 12:14:36 +01:00
Pavan Kumar Gondhi
6517c700de fix(nostr): require operator.admin scope for profile mutation routes [AI] (#63553)
* fix: address issue

* fix: address review feedback

* fix: address review feedback

* fix: finalize issue changes

* fix: address PR review feedback

* fix: address review-pr skill feedback

* fix: address PR review feedback

* fix: address review-pr skill feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* docs: add changelog entry for PR merge
2026-04-10 16:38:41 +05:30
Vincent Koc
0e54440ecc fix(cycles): remove browser cli and tlon runtime seams 2026-04-10 11:45:28 +01:00
Peter Steinberger
10b26ed2ec test: restore full gate stability 2026-04-10 11:36:41 +01:00
Nimrod Gutman
35002cb6bb fix(btw): allow aws-sdk auth for bedrock side questions 2026-04-10 13:16:29 +03:00
Nimrod Gutman
90e784cab8 fix(btw): omit empty tool arrays for side questions (#64219) (thanks @ngutman) (#64219) 2026-04-10 13:12:38 +03:00
Mariano
46f8c4dfd5 fix(memory-core): harden request-scoped dreaming fallback (#64156)
* memory-core: harden request-scoped dreaming fallback

* memory-core: tighten request-scoped fallback classification
2026-04-10 12:11:57 +02:00
Peter Steinberger
0b0c062e97 fix: avoid Claude CLI subscription prompt classifier 2026-04-10 10:52:35 +01:00
Peter Steinberger
9714495797 test: keep plugin runtime symlink assertion on symlink path 2026-04-10 10:28:53 +01:00
Peter Steinberger
6c82a91d3d refactor: tighten device pairing approval types 2026-04-10 10:22:00 +01:00
Peter Steinberger
ae4817e0e0 test: align matrix acp delivery expectation 2026-04-10 10:15:51 +01:00
Peter Steinberger
bbede259b7 test(delivery): keep telegram parent channel target expectation 2026-04-10 10:12:07 +01:00
Peter Steinberger
feb3c7f823 fix(test): repair rebased gate failures 2026-04-10 10:12:07 +01:00
Peter Steinberger
c2e2b87f28 fix(acp): classify gateway chat error kinds 2026-04-10 10:12:07 +01:00
Mingkuan
005b629b6d fix(qqbot): allow extension fields in channel config schema (#64075)
* fix(qqbot): allow extension fields in channel config schema

Use passthrough() on QQBotConfigSchema, QQBotAccountSchema, and
QQBotStreamingSchema so third-party builds that share the qqbot
channel id can add custom fields without triggering
"must NOT have additional properties" validation errors.

tts and stt sub-schemas remain strict to preserve typo detection
for those sensitive fields.

* Update extensions/qqbot/openclaw.plugin.json

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* chore(qqbot): update changelog for config schema passthrough

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-10 17:01:00 +08:00
Peter Steinberger
ec5ef68b0c test: fix latest fast-lane boundaries 2026-04-10 09:53:17 +01:00
Peter Steinberger
b660493e54 fix: harden device pairing scope approval 2026-04-10 09:48:17 +01:00
Peter Steinberger
a5de4a1a50 test: align telegram delivery context expectation 2026-04-10 09:47:57 +01:00
Peter Steinberger
67ede66b3e test: refresh latest main expectations 2026-04-10 09:47:57 +01:00
Peter Steinberger
56cf1bd40c test: move image generation live sweep out of src 2026-04-10 09:47:57 +01:00
Peter Steinberger
1d310e2ab0 fix: restore main verification gates 2026-04-10 09:34:50 +01:00
Ayaan Zaidi
004781955c fix: restore model-scoped deprecation fallback matching 2026-04-10 13:57:00 +05:30
Neerav Makwana
75deed54f3 Agents: allow cooldown probe for timeout failover reason 2026-04-10 13:52:37 +05:30
Ted Li
d78d91f8c2 fix: continue fallback after OpenRouter no-endpoints 404 (#61472) (thanks @MonkeyLeeT)
* Fix OpenRouter no-endpoints fallback classification

* Restore bare model-not-found matcher coverage

* Preserve model does-not-exist fallback classification

* Narrow does-not-exist model-not-found matching

* Keep runtime model-not-found matcher strict

* style(agents): drop model matcher comment

* fix: continue fallback after OpenRouter no-endpoints 404 (#61472) (thanks @MonkeyLeeT)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-10 13:46:14 +05:30
Alex Alaniz
6bd64ca4a7 fix: stop marking Claude CLI runs as host-managed
Stop injecting CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST into Claude CLI runs and strip inherited/backend overrides before spawn.\n\nAlso repairs the Zalo setup allowlist prompt wiring needed by the current main check gate.\n\nThanks @Alex-Alaniz.
2026-04-10 09:14:15 +01:00
Neerav Makwana
0002982e52 fix: reset TUI footer activity on session switch (#63988) (thanks @neeravmakwana)
* TUI: reset activity to idle on session switch

* chore: remove redundant tui session comment

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-10 13:32:01 +05:30
Vincent Koc
dfdc281f55 fix(cycles): split small runtime seams 2026-04-10 09:00:19 +01:00
sudie-codes
828ebd43d4 feat(msteams): handle signin/tokenExchange and signin/verifyState for SSO (#60956) (#64089)
* feat(msteams): handle signin/tokenExchange and signin/verifyState for SSO (#60956)

* test(msteams): mock conversationStore.get in thread session fixture

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-10 02:38:01 -05:00
Frank Yang
360955a7c8 fix: preserve commands.list metadata (#64147)
Merged via squash.

Reviewed-by: @frankekn
2026-04-10 15:35:05 +08:00
Peter Steinberger
3218f8f4e5 chore: align release metadata for 2026.4.10 2026-04-10 08:19:47 +01:00
Vincent Koc
f654b5a424 test(boundary): remove last direct bundled plugin imports 2026-04-10 08:19:20 +01:00
Vincent Koc
78d2e9e2a8 fix(ci): repair main type drift 2026-04-10 08:13:02 +01:00
Peter Steinberger
7e7a8d6b0f fix(claude-cli): harden gateway auth env 2026-04-10 08:10:46 +01:00
Peter Steinberger
7e2a1db53b fix: recover silent LLM idle timeouts 2026-04-10 08:09:17 +01:00
Vincent Koc
3cea11d3b6 test(boundary): route helper imports through bundled plugin surfaces 2026-04-10 08:05:56 +01:00
samzong
0f0a192ecb [Fix] agents.create RPC: support model param, write identity to config (#61577)
* fix(gateway): support model on agents.create, write identity to config

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(gateway): sync agent identity file writes

* fix(gateway): preserve richer identity markdown

* fix(gateway): preserve destination identity on workspace moves

* fix(gateway): preserve source identity on workspace moves

---------

Signed-off-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-10 14:36:22 +08:00
samzong
723dec0432 [Feat] Gateway: add commands.list RPC method (#62656)
Merged via squash.

Co-authored-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
Reviewed-by: @frankekn
2026-04-10 14:28:47 +08:00
Tak Hoffman
4bf94aa0d6 feat: add local exec-policy CLI (#64050)
* feat: add local exec-policy CLI

* fix: harden exec-policy CLI output

* fix: harden exec approvals writes

* fix: tighten local exec-policy sync

* docs: document exec-policy CLI

* fix: harden exec-policy rollback and approvals path checks

* fix: reject exec-policy sync when host remains node

* fix: validate approvals path before mkdir

* fix: guard exec-policy rollback against newer approvals writes

* fix: restore exec approvals via hardened rollback path

* fix: guard exec-policy config writes with base hash

* docs: add exec-policy changelog entry

* fix: clarify exec-policy show for node host

* fix: strip stale exec-policy decisions
2026-04-10 01:16:03 -05:00