Commit Graph

8344 Commits

Author SHA1 Message Date
Charles-Henri ROBICHE
0ebe2b6724
Merge branch 'main' into feat/litellm-provider
Resolved conflicts in src/cli/program/register.onboard.ts by including
both litellm-api-key and xiaomi-api-key in the auth choice list.
2026-01-29 23:47:57 +01:00
Shakker
4583f88626 fix: preserve reasoning tags inside code blocks (#4118) (thanks @vinaygit18) 2026-01-29 18:53:05 +00:00
Peter Steinberger
c9fe062824 chore: update clawtributors 2026-01-29 17:31:39 +00:00
Peter Steinberger
78b9876641 feat: add Xiaomi MiMo provider onboarding (#3454)
Thanks @WqyJh.

Co-authored-by: Qiying Wang <15232241+WqyJh@users.noreply.github.com>
2026-01-29 17:29:58 +00:00
Vibe Kanban
50d44d0bd9 feat: support xiaomi/mimo-v2-flash 2026-01-29 17:15:51 +00:00
Peter Steinberger
cb4b3f74b5 chore(release): bump versions to 2026.1.29 2026-01-29 16:48:13 +00:00
Peter Steinberger
5152060121 docs(changelog): rewrite 2026.1.29 notes 2026-01-29 16:48:05 +00:00
Peter Steinberger
06289b36da fix(security): harden SSH target handling (#4001)
Thanks @YLChen-007.

Co-authored-by: Edward-x <YLChen-007@users.noreply.github.com>
2026-01-29 16:33:36 +00:00
Josh Palmer
4b5514a259 Tests: default-disable plugins in VITEST 2026-01-29 17:14:14 +01:00
Josh Palmer
5f4715acfc fix flaky gateway tests in CI
What:
- resolve shell from PATH in bash-tools tests (avoid /bin/bash dependency)
- mock DNS for web-fetch SSRF tests (no real network)
- stub a2ui bundle in canvas-host server test when missing

Why:
- keep gateway test suite deterministic on Nix/Garnix Linux

Tests:
- not run locally (known missing deps in unit test run)
2026-01-29 12:14:27 +01:00
Charles-Henri ROBICHE
327e82da5d
fix(litellm): add error handling in onboarding wizard
The AUTH_CHOICE_CANCELLED error was showing to users during onboarding
because the applyAuthChoice call in onboarding.ts wasn't wrapped in
error handling. This adds the same try-catch loop pattern used in
configure.gateway-auth.ts and agents.commands.add.ts to properly
handle the cancellation and re-prompt for auth method selection.
2026-01-29 11:15:09 +01:00
Josh Palmer
c41ea252b0 fix flaky web-fetch tests + lock cleanup
What:
- stub resolvePinnedHostname in web-fetch tests to avoid DNS flake
- close lock file handles via FileHandle.close during cleanup to avoid EBADF

Why:
- make CI deterministic without network/DNS dependence
- prevent double-close errors from GC

Tests:
- pnpm vitest run --config vitest.unit.config.ts src/agents/tools/web-tools.fetch.test.ts src/agents/session-write-lock.test.ts (failed: missing @aws-sdk/client-bedrock)
2026-01-29 11:05:11 +01:00
Charles-Henri ROBICHE
ce8fd694ae
fix(litellm): handle AUTH_CHOICE_CANCELLED to retry auth selection
- Add retry loops in configure.gateway-auth and agents.commands.add
- Catch AUTH_CHOICE_CANCELLED error and re-prompt for auth method
- Users can now go back to auth method selection when LiteLLM setup fails
- Import AuthChoice type for proper typing

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:59:30 +01:00
Charles-Henri ROBICHE
d531f7d9a4
fix(litellm): update cancel option label and behavior
- Change label from 'Go back to provider selection' to 'Go back to auth method selection'
- Throw AUTH_CHOICE_CANCELLED error to signal proper navigation level
- More accurate description of where user will be taken

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:48:16 +01:00
Charles-Henri ROBICHE
9b8625b9d6
fix(litellm): remove manual model entry fallback option
- Remove 'Enter model name manually' from error recovery menu
- Only allow retry with different credentials or cancel
- Ensures users fix the actual connection issue rather than bypass it

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:33:19 +01:00
Charles-Henri ROBICHE
aa0d7563ff
fix(litellm): ensure API key retry prompts for new key
- Clear CLI-provided API key and token options when retrying
- Forces fresh prompt instead of reusing old credentials
- Consistent behavior with base URL retry

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:32:10 +01:00
Charles-Henri ROBICHE
f901884913
fix(litellm): improve retry flow for API key and base URL
- Extract promptForApiKey and promptForBaseUrl as helper functions
- Use recursive retry instead of throwing errors
- Re-enter API key now retries the entire flow with new key
- Re-enter base URL now properly prompts for new URL and retries
- Both options maintain full onboarding flow instead of crashing

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:31:11 +01:00
Charles-Henri ROBICHE
6faae80ad4
fix(litellm): add graceful fallback when model fetch fails
- Add options to retry with different API key or base URL
- Allow manual model entry as fallback
- Option to return to provider selection instead of crashing
- Show helpful error context about why fetch might have failed

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 10:14:07 +01:00
Claude
629c25c0e4
fix(litellm): simplify onboarding by removing manual prompts
- Remove manual context window prompt when not auto-detected
- Remove 'Enter custom model name' option from model selection
- Throw error if model fetch fails instead of prompting for manual entry
- Strip litellm/ prefix from API-returned model IDs to fix double prefix
2026-01-29 07:58:12 +00:00
Tyler Yust
6372242da7
fix(ui): improve chat session dropdown and refresh behavior (#3682)
* refactor(ui): enhance loadSessions function to accept overrides for session loading parameters

- Updated loadSessions to include optional parameters for activeMinutes, limit, includeGlobal, and includeUnknown.
- Modified refreshChat to use the new activeMinutes parameter when loading sessions.
- Removed duplicate applySettingsFromUrl call in handleConnected function.

* feat(ui): implement session refresh functionality after chat

- Added `refreshSessionsAfterChat` property to `ChatHost` and `GatewayHost` types.
- Introduced `isChatResetCommand` function to identify chat reset commands.
- Updated `handleSendChat` to set `refreshSessions` based on chat reset commands.
- Modified `handleGatewayEventUnsafe` to load sessions when chat is finalized and `refreshSessionsAfterChat` is true.
- Enhanced `refreshChat` to load sessions with `activeMinutes` set to 0 for immediate refresh.
2026-01-28 23:24:46 -08:00
Ayaan Zaidi
718bc3f9c8
fix: avoid silent telegram empty replies (#3796) (#3796) 2026-01-29 11:34:47 +05:30
Conroy Whitney
c20035094d
fix: use & instead of <> in XML escaping test for Windows NTFS compatibility (#3750)
NTFS does not allow < or > in filenames, causing the XML filename
escaping test to fail on Windows CI with ENOENT.

Replace file<test>.txt with file&test.txt — & is valid on all platforms
and still requires XML escaping (&amp;), preserving the test's intent.

Fixes #3748
2026-01-29 05:46:50 +00:00
kiranjd
0761652701 fix(telegram): handle empty reply array in notifyEmptyResponse
Previous fix only checked skippedEmpty > 0, but when model returns
content: [] no payloads are created at all. Now also checks
replies.length === 0 to catch this case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:39 +05:30
kiranjd
a2d06e75b0 fix(telegram): notify users when agent returns empty response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:39 +05:30
Ayaan Zaidi
34291321b4 chore: update clawtributors (add @HirokiKobayashi-R) 2026-01-29 10:33:25 +05:30
Ayaan Zaidi
16a5549ec0 docs: update changelog for mention patterns (#3303) (thanks @HirokiKobayashi-R) 2026-01-29 10:31:47 +05:30
HirokiKobayashi-R
22b59d24ce fix(mentions): check mentionPatterns even when explicit mention is available 2026-01-29 10:31:47 +05:30
Ayaan Zaidi
fcc53bcf1b fix: include AccountId in telegram native command context (#2942) (thanks @Chloe-VP) 2026-01-29 10:17:25 +05:30
Chloe
6132c3d014 fix(telegram): include AccountId in native command context for multi-agent routing
When running multiple Telegram bot accounts bound to different agents,
the /new command (and other slash commands) would send confirmation
messages via the wrong bot because the context was missing AccountId.

The fix adds AccountId: route.accountId to the context payload in
registerTelegramNativeCommands, matching how bot-message-context.ts
handles regular messages.

Fixes #2537
2026-01-29 10:17:25 +05:30
Ayaan Zaidi
4ac7aa4a48 fix: handle telegram video notes (#2905) (thanks @mylukin) 2026-01-29 10:07:21 +05:30
Lukin
78722d0b4f fix(telegram): add video_note support to Telegram channel
- Add msg.video_note to media extraction chain in bot/delivery.ts
- Add placeholder detection for video notes in bot-message-context.ts
- Video notes (rounded square video messages) are now processed and downloaded like regular videos

Fixes issue where video note messages were silently dropped because they weren't in the media handling logic.
2026-01-29 10:07:21 +05:30
Clawdbot
c13c39f121 fix: exclude native slash commands from onToolResult
Native slash commands (e.g. /verbose, /status) should not emit tool
summaries. Gate onToolResult behind CommandSource !== 'native' in
addition to the existing ChatType !== 'group' check.

Add test for native command exclusion.
2026-01-29 09:50:39 +05:30
Clawdbot
e1ecfb25b8 test: add tests for onToolResult in DM vs group sessions
- provides onToolResult in DM sessions (ChatType=direct)
- does not provide onToolResult in group sessions (ChatType=group)
- sends tool results via dispatcher in DM sessions

Replaces the old cross-provider test that expected onToolResult to
always be undefined.
2026-01-29 09:50:39 +05:30
Clawdbot
f27a5030d8 fix: restore verbose tool summaries in DM sessions
875b018ea removed onToolResult from dispatch-from-config.ts to prevent
tool summaries leaking into group channels. However, this also broke
verbose tool summaries in DM/private sessions where they are expected.

This restores onToolResult but gates it behind ChatType !== 'group',
so group channels remain unaffected while DM verbose works again.

mirror=false is passed to sendPayloadAsync to avoid duplicating tool
summaries in the session transcript (matching the block reply behavior).

Fixes #2665
2026-01-29 09:50:39 +05:30
Gustavo Madeira Santana
699784dbee chore: remove stray package-lock.json 2026-01-28 22:00:55 -05:00
Gustavo Madeira Santana
a44da67069 fix: local updates for PR #3600
Co-authored-by: kira-ariaki <kira-ariaki@users.noreply.github.com>
2026-01-28 22:00:11 -05:00
Kira
0fd9d3abd1 feat(memory): add explicit paths config for memory search
Add a `paths` option to `memorySearch` config, allowing users to
explicitly specify additional directories or files to include in
memory search.

Follow-up to #2961 as suggested by @gumadeiras — instead of auto-following
symlinks (which has security implications), users can now explicitly
declare additional search paths.

- Add `memorySearch.paths` config option (array of strings)
- Paths can be absolute or relative (resolved from workspace)
- Directories are recursively scanned for `.md` files
- Single `.md` files can also be specified
- Paths from defaults and agent overrides are merged
- Added 4 test cases for listMemoryFiles
2026-01-28 22:00:11 -05:00
Shakker
b717724275
fix: add security hardening for media text attachments (#3700)
* fix: Prevent XML attribute injection by escaping special characters in file name and MIME type attributes.

* fix: text attachment MIME misclassification with security hardening (#3628)

- Fix CSV/TSV inference from content heuristics
- Add UTF-16 detection and BOM handling
- Add XML attribute escaping for file output (security)
- Add MIME override logging for auditability
- Add comprehensive test coverage for edge cases

Thanks @frankekn
2026-01-29 02:39:01 +00:00
Frank Yang
cb18ce7a85
Fix text attachment MIME misclassification (#3628)
* Fix text file attachment detection

* Add file attachment extraction tests
2026-01-29 02:33:03 +00:00
Gustavo Madeira Santana
a109b7f1a9 Update self message trust policy in WhatsApp docs
Clarified that self messages from the linked WhatsApp number bypass DM policy and allowFrom checks.
2026-01-28 20:31:33 -05:00
tewatia
4f554a1e31 docs(whatsapp): clarify self-message dmPolicy bypass
Self messages from the linked WhatsApp number bypass dmPolicy and allowFrom
checks automatically. Clarified that users don't need to add their own
number to the allowlist.

Self messages from the linked WhatsApp number bypass dmPolicy checks
entirely (via isSamePhone check in access-control.ts)...
2026-01-28 20:31:33 -05:00
jonisjongithub
fdcac0ccf4
fix: correct 'Venius' typo to 'Venice' in provider docs (#3638) - thanks (@jonisjongithub) 2026-01-28 23:51:43 +00:00
Shakker
3a9cfd787d
Merge pull request #3635 from moltbot/fix-token-input-trim
fix: trim whitespace from config input fields on change
2026-01-28 23:46:14 +00:00
Shakker
1c98b9dec8 fix(ui): trim whitespace from config input fields on change 2026-01-28 23:41:33 +00:00
Shakker
67f1402703 fix: tts base url runtime read (#3341) (thanks @hclsys) 2026-01-28 23:30:29 +00:00
Charles-Henri ROBICHE
2e0dd2ce72
fix(litellm): complete prompt caching support for Claude models
This commit completes the LiteLLM prompt caching implementation by:

1. Applying cacheControlTtl defaults to litellm/claude-* models in addition
   to anthropic/* models. Previously, only direct Anthropic models received
   the default 1h cache TTL, causing LiteLLM Claude models to skip caching.

2. Setting api: "anthropic-messages" for Claude models during onboarding.
   LiteLLM was using openai-completions API which doesn't support Anthropic's
   cache control headers. The anthropic-messages API is required for proper
   prompt caching functionality.

Result: 90% cost reduction for LiteLLM Claude usage (from $0.47 to $0.05 per
message with ~94K token conversations), matching direct Anthropic API costs.

Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
2026-01-29 00:26:44 +01:00
Charles-Henri ROBICHE
920fe168de
fix(litellm): use anthropic-messages API for Claude models
- Set api: 'anthropic-messages' for claude-* models through LiteLLM
- Add LiteLLM to resolveCacheControlTtl for cache parameter passthrough
- Enables proper Anthropic cache control headers for cost savings

This fixes the missing cache support by ensuring:
1. Claude models use the correct API format (anthropic-messages)
2. Cache control TTL is resolved and passed through for LiteLLM
2026-01-29 00:01:57 +01:00
Charles-Henri ROBICHE
c50d5c7f34
fix(litellm): enable prompt caching for Anthropic models
- Add LiteLLM + Claude model detection to isCacheTtlEligibleProvider
- Reduces cost by 90% for Claude models through LiteLLM proxy
- Add test coverage for cache eligibility detection
- Document prompt caching behavior and cost savings

Before: $0.47 per message (no caching)
After: $0.05 per message (90% cached)

Closes #2683
2026-01-28 23:44:44 +01:00
Tyler Yust
a7534dc223
fix(ui): gateway URL confirmation modal (based on #2880) (#3578)
* fix: adding confirmation modal to confirm gateway url change

* refactor: added modal instead of confirm prompt

* fix(ui): reconnect after confirming gateway url (#2880) (thanks @0xacb)

---------

Co-authored-by: 0xacb <amccbaptista@gmail.com>
2026-01-28 13:32:10 -08:00
Charles-Henri ROBICHE
ac464845a8
Merge branch 'main' into feat/litellm-provider 2026-01-28 20:35:39 +01:00