Commit Graph
1143 Commits
Author SHA1 Message Date
chengyongru e6957de622 fix(webui): drop legacy automation setup state 2026-06-16 00:26:06 +08:00
chengyongru 03c79817ac test(websocket): expect session refresh after turn end 2026-06-15 18:25:00 +08:00
chengyongru 848378d0db Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	webui/src/components/settings/SettingsView.tsx
2026-06-15 18:11:22 +08:00
chengyongru 167a53dc45 fix(webui): sort sessions by transcript activity 2026-06-15 17:44:26 +08:00
chengyongru cbb4c0bad2 fix(webui): polish automation layout and session updates 2026-06-15 17:30:06 +08:00
chengyongru f8bf6aea51 fix(webui): encode automation update values 2026-06-15 15:14:24 +08:00
9814a3b9fe fix(api): forward real LLM usage in /v1/chat/completions response (#4310)
* fix(api): forward real LLM usage in /v1/chat/completions response

_chat_completion_response() hardcoded prompt_tokens/completion_tokens
to zero.  Now reads agent_loop._last_usage (set by process_direct
after every LLM call) and forwards the actual prompt/completion counts.

Streaming path is unchanged; usage is only surfaced in non-streaming
responses for now.

Fixes #4309

* fix: use defensive getattr for _last_usage and add it to all test mock agents

- Use getattr(agent_loop, '_last_usage', None) in server.py for safety
- Add _last_usage = {} to mock agents in test_api_attachment.py and test_api_stream.py
- Prevents AttributeError/500 when mock agents don't have the attribute

* fix(api): preserve provider total usage

---------

Co-authored-by: michaelxer <michaelxer@users.noreply.github.com>
Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
2026-06-15 15:13:11 +08:00
Stellar鱼andGitHub f85101f017 fix(memory): ignore malformed history entries (#4315) 2026-06-15 15:13:07 +08:00
Stellar鱼andGitHub a54e56c69e fix(runner): ignore empty injected payloads (#4337) 2026-06-15 15:13:03 +08:00
chengyongruandXubin Ren 44ce220af6 fix: preserve file tool toggle for subagents
Maintainer edit: subagents rebuilt their scoped ToolsConfig without carrying tools.file, which re-enabled built-in file tools after the parent agent disabled them. Preserve the file config and add loader/subagent coverage for the disabled path.
2026-06-15 02:55:18 +08:00
Nir AdlerandXubin Ren df0f9f4d5c tools: add tools.file.enable to toggle built-in filesystem tools (default true) 2026-06-15 02:55:18 +08:00
chengyongru 5892c6913b fix(webui): allow content-only automation edits
Avoid resubmitting unchanged schedules from the automation edit dialog so completed one-time automations can still have their content updated. Treat unchanged schedules as already-valid on the backend while preserving validation for actual schedule changes.
2026-06-15 00:59:23 +08:00
chengyongru 8b42d0760e fix(webui): harden automation management API
Maintainer edit: redact external channel chat identifiers from the WebUI automation payload and reject malformed or unschedulable automation updates before they mutate cron jobs.
2026-06-14 22:19:28 +08:00
chengyongru 747f0a08c7 fix(webui): improve automation management 2026-06-14 18:24:59 +08:00
qcypggsandXubin Ren cb2620c877 Fix Codex image SSE handling 2026-06-14 12:52:40 +08:00
axelray-devandXubin Ren ad89cbb24f test(providers): use real Fable model ID claude-fable-5 in tests
Replace placeholder claude-fable-1 with the actual API model ID.
2026-06-14 12:52:07 +08:00
axelray-devandXubin Ren 29d7186853 fix(providers): widen omit_temperature to cover opus-4-8 and fable
The temperature suppression was hardcoded to only match opus-4-7. Newer
Anthropic models (opus-4-8, fable) also reject the parameter with a 400.

Normalize model_name to lowercase before matching so mixed-case configs
do not fall through.  Add tests for opus-4-8 and fable across adaptive,
enabled, and no-thinking paths, plus a negative test confirming ordinary
models still send temperature.

Fixes #4333
2026-06-14 12:52:07 +08:00
chengyongru 17e3183598 fix(webui): simplify automation source display 2026-06-14 00:32:53 +08:00
chengyongru 5b10102629 fix(webui): avoid fake automation origins 2026-06-14 00:04:15 +08:00
chengyongru 43830b7162 fix(webui): localize automation runtime labels 2026-06-13 23:06:28 +08:00
chengyongru e08462ca30 feat(webui): add automation management view 2026-06-13 23:06:28 +08:00
tangtaizhong666andXubin Ren 0863e6e5ab fix(memory): summarize full session tail during idle compaction (#4264)
Idle compaction summarized only the dropped prefix, excluding the recent
suffix it retains. On a finished conversation a late user correction or
final result lands in that kept suffix, so it never reached the persisted
summary and history kept the stale pre-correction conclusion — which, for
idle sessions that are rarely resumed, is never fixed.

Summarize over the full unconsolidated tail instead, while still removing
(and raw-dumping on LLM failure) only the dropped messages. Adds an opt-in
summary_context argument to Consolidator.archive so the summarization
window and the archived set can differ without affecting other callers.
2026-06-13 22:24:30 +08:00
chengyongruandXubin Ren af0e3441d7 Fix WebUI startup blocking on slow gateway routes 2026-06-13 21:59:36 +08:00
chengyongruandXubin Ren 3a221d74cf Break tool config schema import cycle 2026-06-13 21:59:07 +08:00
Xubin Ren 7ff8e02eaf chore(repo): remove desktop app from core repo 2026-06-13 00:14:21 +08:00
Xubin RenandGitHub dac4e39bcf Merge PR #4299: feat(cron): bind scheduled automations to sessions
feat(cron): bind scheduled automations to sessions
2026-06-13 00:07:55 +08:00
Xubin RenandGitHub 1b3b322674 Merge PR #4226: feat(bridge): WhatsApp forwarded message detection, startup guard, and contact handling
feat(bridge): WhatsApp forwarded message detection, startup guard, and contact handling
2026-06-13 00:05:58 +08:00
chengyongruandXubin Ren d72d0102d9 style: trim orphan toolcall comments
maintainer edit: keep the invariant comments in production code but remove repeated issue background from tests.
2026-06-13 00:05:03 +08:00
chengyongruandXubin Ren 33e6da14d8 fix: drop tool results missing call ids
maintainer edit: treat tool messages without tool_call_id as orphaned during session persistence so malformed results cannot survive into history.
2026-06-13 00:05:03 +08:00
tangtaizhong666andXubin Ren eb25df9b49 fix(session): never persist tool results without a declared tool call 2026-06-13 00:05:03 +08:00
tangtaizhong666andXubin Ren 2ebf7e2eef fix(session): keep placeholder for tool results filtered to empty 2026-06-13 00:05:03 +08:00
tangtaizhong666andXubin Ren df832a37e9 test(session): reproduce orphaned tool results from save-boundary overshoot (#4006) 2026-06-13 00:05:03 +08:00
chengyongruandXubin Ren af9f9ebfd7 fix: reject custom provider alias conflicts
maintainer edit: reject arbitrary custom provider keys that normalize to built-in provider names so runtime and WebUI settings cannot disagree about whether a provider is dynamic or built in.
2026-06-13 00:04:13 +08:00
chengyongruandXubin Ren b2d00a4ce0 fix: strip dynamic custom provider route prefixes
maintainer edit: preserve provider-prefix CLI routing for named custom providers by stripping only the matched dynamic route prefix before sending the model id to OpenAI-compatible endpoints. This keeps ordinary namespaced model ids intact when the provider is selected explicitly.
2026-06-13 00:04:13 +08:00
chengyongruandXubin Ren 09d24e6c25 fix: validate named custom provider endpoints 2026-06-13 00:04:13 +08:00
chengyongruandXubin Ren 57ced7930d refactor: simplify dynamic provider settings tests
maintainer edit: keep the WebUI dynamic-provider behavior unchanged while reducing repeated test setup and tightening the small dynamic-provider helper.
2026-06-13 00:04:13 +08:00
chengyongruandXubin Ren 37ae655fa6 fix: expose dynamic custom providers in WebUI settings
maintainer edit: WebUI settings still treated non-registry custom providers as unknown, so users could not select them in model configurations or fetch their model list. Reuse dynamic provider specs for settings payloads, model-list requests, and provider updates.
2026-06-13 00:04:13 +08:00
chengyongruandXubin Ren 68c6844c0b fix: preserve dynamic custom provider semantics
maintainer edit: treat arbitrary custom provider names as direct OpenAI-compatible providers, validate their api_type consistently, and avoid Pydantic instance-field warnings in fallback routing.
2026-06-13 00:04:13 +08:00
chengyongru e1ff0f37d9 fix: preserve WhatsApp forwarded metadata
maintainer edit: carry the bridge isForwarded flag into channel metadata so forwarded voice messages remain distinguishable after transcription.
2026-06-12 18:21:47 +08:00
chengyongru 32d8a1dd7b fix: hide internal cron prompts from webui 2026-06-12 18:17:28 +08:00
chengyongru a50b3ac0f2 fix: harden cron session automation flows 2026-06-12 18:13:25 +08:00
chengyongru 8335554894 refactor: migrate legacy cron payloads to bound sessions 2026-06-12 16:51:20 +08:00
chengyongru af8192dc38 refactor: move bound cron execution out of gateway 2026-06-12 15:50:36 +08:00
chengyongru 5ae907bc2f refactor: store cron origin delivery context 2026-06-12 15:07:25 +08:00
chengyongru c4b64a4caf refactor: preserve origin session routing for cron 2026-06-12 14:21:09 +08:00
chengyongru 80524e9e88 refactor: bind cron jobs to origin sessions 2026-06-12 14:00:53 +08:00
chengyongru 271b3651d7 refactor: use cron turn naming internally 2026-06-12 11:57:35 +08:00
chengyongru d9d481bc15 refactor: centralize cron session metadata keys 2026-06-12 11:43:23 +08:00
chengyongru 0ff8cd0cb3 fix: honor unified session for webui automations 2026-06-12 10:19:12 +08:00
chengyongru 1ad9d77bc7 fix: avoid completed cron tail pending state 2026-06-12 00:54:32 +08:00