Aleksandrs Tihenko
c52b2ad5c3
fix(cache): inject cache_control into system prompt for OpenRouter Anthropic ( #15151 ) ( #17473 )
...
* fix(cache): inject cache_control into system prompt for OpenRouter Anthropic
Add onPayload wrapper that injects cache_control: { type: "ephemeral" }
into the system/developer message content for OpenRouter requests routed
to Anthropic models. The system prompt is typically ~18k tokens and was
being re-processed on every request without caching.
Fixes #15151
* Changelog: add OpenRouter note for #17473
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-02-22 12:27:01 -05:00
Joly0
ded9a59f78
OpenRouter: allow any model ID instead of restricting to static catalog ( #14312 )
...
* OpenRouter: allow any model ID instead of restricting to static catalog
OpenRouter models were restricted to a hardcoded prefix list in the internal model catalog, preventing use of newly added or less common models. This change makes OpenRouter work as the pass-through proxy it is -- any valid OpenRouter model ID now resolves dynamically.
Fixes https://github.com/openclaw/openclaw/issues/5241
Changes:
- Add OpenRouter as an implicit provider in resolveImplicitProviders so models.json is populated when an API key is detected (models-config.providers.ts)
- Add a pass-through fallback in resolveModel that creates OpenRouter models on-the-fly when they aren't pre-registered in the local catalog (
model.ts
)
- Remove the static prefix filter for OpenRouter/opencode in isModernModelRef (live-model-filter.ts)
* Apply requested change for maxTokens
* Agents: remove dead helper in live model filter
* Changelog: note Joly0/main OpenRouter fix
* Changelog: fix OpenRouter entry text
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-02-22 12:21:20 -05:00
Robby
99cfb3dab2
fix(openrouter): pass reasoning.effort based on thinking level ( #14664 ) ( #17236 )
...
* fix(openrouter): pass reasoning.effort to OpenRouter API (#14664 )
* Agents: pass thinkLevel to extra-params wrapper
* Changelog: note fix/openrouter-reasoning-effort-14664 OpenRouter fix
* Changelog: fix OpenRouter entry text
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-02-22 12:14:12 -05:00
Mitsuyuki Osabe
415686244a
feat: pass through OpenRouter provider routing params ( #17148 )
...
extraParams.provider was silently dropped by createStreamFnWithExtraParams().
This change injects it into model.compat.openRouterRouting so pi-ai's
buildParams includes params.provider in the API request body.
Enables OpenRouter provider routing options (only, order, allow_fallbacks,
data_collection, ignore, sort, quantizations) via model config:
```jsonc
"openrouter/model-name": {
"params": {
"provider": {
"only": ["deepinfra", "fireworks"],
"allow_fallbacks": false
}
}
}
```
Closes #10869
✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
2026-02-22 12:11:04 -05:00
Ayaan Zaidi
6268ed57ea
fix(agents): stop param shadowing in auth failure marker
2026-02-22 21:00:17 +05:30
Peter Steinberger
d0b59270a7
refactor: dedupe auth-profile failure marking and rotation test setup
2026-02-22 15:44:10 +01:00
Glucksberg
53adae9cec
fix(telegram): add dnsResultOrder=ipv4first default on Node 22+ to fix fetch failures ( #5405 )
...
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 71366e9532
Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com >
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com >
Reviewed-by: @obviyus
2026-02-22 20:07:51 +05:30
Peter Steinberger
3e2849c578
fix: align timeout cooldown behavior docs/tests ( #22622 ) (thanks @vageeshkumar)
2026-02-22 15:34:20 +01:00
Vageesh Kumar
71d0b86352
fix(agents): skip auth profile cooldown for timeout failures
...
A timeout is model/network-specific, not an auth issue. Marking the
auth profile as failed on timeout poisons fallback models on the same
provider (e.g. gpt-5.3 timeout would block gpt-5.2 via shared profile
cooldown). The prompt-phase path already guards against this; this
aligns the post-response timeout path to match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-22 15:34:20 +01:00
Peter Steinberger
4c355a28a3
refactor: centralize tool-error visibility policy
2026-02-22 15:30:53 +01:00
Peter Steinberger
835be4392e
fix: gate tool error details behind verbose
2026-02-22 15:26:47 +01:00
Peter Steinberger
d116bcfb14
refactor(runtime): consolidate followup, gateway, and provider dedupe paths
2026-02-22 14:08:51 +00:00
Peter Steinberger
5b23159c4c
test: create homedir before sandbox image mkdtemp
2026-02-22 12:35:38 +00:00
Peter Steinberger
fcb86408fd
test: move embedded and tool agent suites out of e2e
2026-02-22 11:17:47 +00:00
Peter Steinberger
713e2928b2
test: move duplicate local scenario suites out of agents e2e
2026-02-22 10:56:58 +00:00
Peter Steinberger
6c2e999776
refactor(security): unify secure id paths and guard weak patterns
2026-02-22 10:16:19 +01:00
Peter Steinberger
4985fb7f05
test(agents): remove overflow compaction mock reset dependency
2026-02-22 09:02:24 +00:00
Peter Steinberger
c99e7696e6
fix: decouple owner display secret from gateway auth token
2026-02-22 09:35:07 +01:00
Vignesh Natarajan
6ceadaa41f
Agents: add fallback reply for tool-only completions
2026-02-22 00:23:31 -08:00
Peter Steinberger
b967687e55
test(agents): keep targeted resets minimal in overflow retry spec
2026-02-22 08:19:00 +00:00
Vignesh Natarajan
6bf5e76be6
Agents: drop stale pre-compaction usage snapshots
2026-02-21 23:47:15 -08:00
Peter Steinberger
185fba1d22
refactor(agents): dedupe plugin hooks and test helpers
2026-02-22 07:44:57 +00:00
Peter Steinberger
f41be7159c
test(pi): share overflow-compaction test setup
2026-02-22 07:44:57 +00:00
Vignesh Natarajan
cdfe45eeb8
Agents: validate persisted tool-call names
2026-02-21 23:06:44 -08:00
Vignesh Natarajan
7f611f0e13
chore: widen hook-runner test mock signatures for tsgo
2026-02-21 22:35:55 -08:00
Vignesh Natarajan
542fc169d2
Plugins/Hooks: avoid duplicate before_agent_start executions
2026-02-21 22:31:51 -08:00
Peter Steinberger
c8466e516f
fix(agents): raise dynamic retry cap budget
2026-02-21 15:41:30 +01:00
Peter Steinberger
b25d3652e7
fix(agents): cap embedded runner retry loop
2026-02-21 15:35:45 +01:00
fanziqing
559736a5a0
feat(volcengine): integrate Volcengine & Byteplus Provider
2026-02-21 15:05:09 +01:00
Peter Steinberger
b577228d6b
test(security): add overflow compaction truncation-budget regression
2026-02-21 12:59:10 +01:00
Aether AI Agent
084f621025
fix(security): OC-65 prevent compaction counter reset to enforce context exhaustion limit — Aether AI Agent
...
Remove the `overflowCompactionAttempts = 0` reset inside the inner loop's
tool-result-truncation branch. The counter was being zeroed on each truncation
cycle, allowing prompt-injection attacks to bypass the MAX_OVERFLOW_COMPACTION_ATTEMPTS
guard and trigger unbounded auto-compaction, exhausting context window resources (DoS).
CWE-400 / GHSA-x2g4-7mj7-2hhj
2026-02-21 12:59:10 +01:00
Vincent Koc
9abab6a2c9
Add explicit ownerDisplaySecret for owner ID hash obfuscation ( #22520 )
...
* feat(config): add owner display secret setting
* feat(prompt): add explicit owner hash secret to obfuscation path
* test(prompt): assert owner hash secret mode behavior
* Update src/agents/system-prompt.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-21 03:13:56 -05:00
Glucksberg
1410d15c5e
fix: compaction safeguard extension not loading in production builds (openclaw#22349) thanks @Glucksberg
...
Verified:
- pnpm build
- pnpm check
- pnpm test:macmini (local run had unrelated baseline failures; Tak approved proceed)
Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-20 21:21:09 -06:00
jackheuberger
feccac6723
fix: sanitize thinking blocks for GitHub Copilot Claude models (openclaw#19459) thanks @jackheuberger
...
Verified:
- pnpm build
- pnpm check
- pnpm test:macmini
Co-authored-by: jackheuberger <12731288+jackheuberger@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-20 19:48:09 -06:00
mudrii
7ecfc1d93c
fix(auth): bidirectional mode/type compat + sync OAuth to all agents ( #12692 )
...
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 2dee8e1174
Co-authored-by: mudrii <220262+mudrii@users.noreply.github.com >
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com >
Reviewed-by: @obviyus
2026-02-20 16:01:09 +05:30
Sean McLellan
86f207adb0
fix: clean tool schemas and thinking blocks for google-antigravity (openclaw#19732) thanks @Oceanswave
...
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini
Co-authored-by: Oceanswave <760674+Oceanswave@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-19 22:49:57 -06:00
Ephraim Moss
59e58bf81c
fix: strip unsupported JSON Schema keywords for Claude via Cloud Code Assist (openclaw#20124) thanks @ephraimm
...
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check (fails on existing unrelated type error: src/agents/subagent-announce.format.e2e.test.ts:71)
- pnpm test:e2e src/agents/pi-embedded-runner/google.e2e.test.ts
- pnpm test:macmini (fails on existing unrelated test: src/agents/subagent-registry.steer-restart.test.ts)
Co-authored-by: ephraimm <2803669+ephraimm@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-19 22:31:20 -06:00
Tak Hoffman
c1ac37a641
Config: expose Pi compaction tuning values (openclaw#21568) thanks @Takhoffman
...
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini
Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-19 21:41:09 -06:00
Dale Babiy
10dab4f2c7
fix(anthropic): preserve pi-ai default betas when injecting anthropic-beta header (openclaw#19789) thanks @minupla
...
Verified:
- pnpm build
- pnpm check
- pnpm test:macmini
Co-authored-by: minupla <42547246+minupla@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-19 21:23:00 -06:00
Vishal
f1e1cc4ee3
feat: surface cached token counts in /status output (openclaw#21248) thanks @vishaltandale00
...
Verified:
- pnpm build
- pnpm check
- pnpm test:macmini
Co-authored-by: vishaltandale00 <9222298+vishaltandale00@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-19 21:06:13 -06:00
Peter Steinberger
745068a597
test(agents): share overflow retry compaction fixture
2026-02-19 08:55:33 +00:00
Peter Steinberger
b41fd20741
test(agents): share assistant error message test fixture
2026-02-19 08:55:33 +00:00
Ayaan Zaidi
6b05916c14
fix: gate Telegram exec tool warnings behind verbose mode ( #20560 )
...
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 7ce94931f0
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com >
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com >
Reviewed-by: @obviyus
2026-02-19 09:05:49 +05:30
青雲
3d4ef56044
fix: include provider and model name in billing error message ( #20510 )
...
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 40dbdf62e8
Co-authored-by: echoVic <16428813+echoVic@users.noreply.github.com >
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com >
Reviewed-by: @gumadeiras
2026-02-18 21:56:00 -05:00
Peter Steinberger
8b17a369e9
refactor(agents): share agent entry and block reply payload types
2026-02-19 00:06:19 +00:00
Peter Steinberger
2d0ce40ed6
test(agents): dedupe tool-result overflow and telegram account helpers
2026-02-18 13:34:03 +00:00
Peter Steinberger
c90b09cb02
feat(agents): support Anthropic 1M context beta header
2026-02-18 03:29:48 +01:00
Peter Steinberger
b8b43175c5
style: align formatting with oxfmt 0.33
2026-02-18 01:34:35 +00:00
Peter Steinberger
31f9be126c
style: run oxfmt and fix gate failures
2026-02-18 01:29:02 +00:00
Peter Steinberger
6dcc052bb4
fix: stabilize model catalog and pi discovery auth storage compatibility
2026-02-18 02:09:40 +01:00