Commit Graph

305 Commits

Author SHA1 Message Date
Arvin Xu b0ef4b2ef1 ⬆️ chore: upgrade actions/checkout to v7 (#19656)
⬆️ chore: upgrade actions/checkout to v7 across all workflows

- Bump actions/checkout from v3/v4/v6 to v7 (latest release v7.0.1) in 36 files (61 references)
- Includes workflows, docs example, keeping version references consistent
- Note: v7 blocks checking out fork PRs for pull_request_target / workflow_run triggers by default (safer defaults); verified existing usages only checkout the base ref so no behavior change expected

Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2026-09-18 13:56:18 +08:00
YuTengjing 270a4a50cb ✨ feat(fts-search): add pg_like provider for plain PostgreSQL (#19188)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:14:27 +08:00
Arvin Xu c5ec20abab ✨ feat(docker): run self-hosted Compose chats in Gateway Mode by default (#19583)
* ✨ feat(docker): run self-hosted Compose chats in Gateway Mode by default

- Add the lobehub-gateway service to docker-compose and wire the lobe service
  to it; AGENT_GATEWAY_INTERNAL_URL keeps server pushes on the Compose network
  while browsers use AGENT_GATEWAY_URL.
- S3_INTERNAL_ENDPOINT routes the server's own S3 requests to rustfs:9000 while
  presigned URLs keep the browser-facing S3_ENDPOINT, which local mode sets to
  localhost and the container cannot reach.
- setup.sh generates a per-deployment JWKS_KEY and gateway token and writes the
  gateway URL for each deploy mode; the .env template drops the public JWKS key.
- Warn loudly at container startup when an upgraded stack lacks the gateway
  settings or still uses the public example JWKS_KEY, and document the upgrade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* 🔒 fix(docker): pass only the public JWK to the gateway container

The gateway only needs the public half of JWKS_KEY to verify browser
sessions, but it received the full private key set, so anyone able to read
the gateway environment could sign tokens LobeHub trusts. setup.sh now also
writes JWKS_PUBLIC_KEY (the same key without d/p/q/dp/dq/qi), Compose passes
only that to the gateway, and the startup check warns when it is missing,
still contains private fields, or does not match JWKS_KEY.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 00:33:26 +08:00
Arvin Xu 40f8f469cf 🐛 fix(docker): make the one-click Docker Compose install start on the released image (#19590)
- Apply a bucket CORS rule in rustfs-init so browser uploads to RustFS through
  presigned URLs are not blocked by the preflight.
- Preload pg_cron and pg_stat_statements alongside pg_search, matching the
  ParadeDB image default. Its first-start bootstrap creates pg_cron under set -e,
  so preloading only pg_search aborted initialization, restarted the container
  and failed the first docker compose up with an unhealthy database.
- Probe PostgreSQL health over TCP with a start period. During initialization the
  image runs a temporary socket-only server, so the socket probe passed early and
  LobeHub's migrations failed with ECONNREFUSED until it had restarted repeatedly.
- setup.sh downloads templates from lobehub/lobehub main, uses curl with a wget
  fallback, and detects the host IP on macOS where hostname -I is missing.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:46:07 +08:00
YuTengjing 41ce61b35d ⚡️ perf(search): skip ineligible message indexing with versioned capture (#19537) 2026-09-14 12:14:38 +08:00
YuTengjing 13ada65ad9 ✨ feat(fts-search): safe per-entity Elasticsearch mapping migrations (#19186) 2026-09-09 09:03:40 +08:00
YuTengjing 8d852279db ✨ feat(provider): add Unsloth provider support (#18339)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 23:28:17 +08:00
YuTengjing 8ea955ddc5 ✨ feat(model-runtime): add Meta AI provider with Muse Spark 1.3 (#19152)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-06 14:15:05 +08:00
YuTengjing 330c12a760 ✨ feat(self-host): add optional Elasticsearch to Docker Compose (#19028) 2026-09-02 17:37:38 +08:00
YuTengjing 1c7a711631 ✨ feat(auth): support additional trusted origins (#18925) 2026-08-31 20:00:29 +08:00
YuTengjing 321bfe8623 ⚡ perf: accelerate and harden Elasticsearch reindex recovery (#18902) 2026-08-31 12:42:02 +08:00
YuTengjing d74e897191 ✨ feat: add Elasticsearch full-text search provider (#18807) 2026-08-31 02:17:23 +08:00
YuTengjing 0387dc5808 🐛 fix: normalize multimodal fallback image formats (#18851) 2026-08-30 02:03:21 +08:00
YuTengjing 4ee99707fa ✨ feat(auth): support custom cookie prefixes (#18358) 2026-08-16 00:04:33 +08:00
Innei 50548e7d31 ✨ feat(next): unify asset base URL and namespace app static dirs (#18221)
* ✨ feat(next): unify asset base URL and add crossOrigin

- Derive assetPrefix from ASSET_BASE_URL, falling back to the
  deprecated NEXT_PUBLIC_ASSET_PREFIX so existing deploys keep working
- Set crossOrigin: 'anonymous' so a cross-origin asset host doesn't
  degrade module preload or turn Sentry frames into opaque errors

* ✅ test(next): cover trailing-slash strip on legacy asset prefix fallback

* ♻️ refactor(pwa): serve app icons from /app-icons instead of /icons

The PWA manifest icons and the default user avatar sat under the generic
/icons prefix. Namespacing them under /app-icons makes ownership explicit
and keeps them clear of any other path a deployment may serve at the root.
Every reference and the Cache-Control header rule move with the directory.

* 🐛 fix(next): gate crossOrigin on a configured asset prefix

crossOrigin: 'anonymous' was set unconditionally, so any self-hosted deployment whose asset host does not return Access-Control-Allow-Origin would go from working script tags to ones the browser refuses to execute. Apply it only when an asset prefix is actually configured, and document the ACAO requirement alongside the new ASSET_BASE_URL key.

* ♻️ refactor(assets): serve app images from /app-images instead of /images

Same change as /icons, for the same reason: /images is a generic root
prefix, and namespacing the App's own assets under /app-images makes
ownership explicit. Every reference goes through the imageUrl helper or a
literal path, and the Cache-Control header rule moves with them so the
images do not silently lose immutable caching.
2026-08-12 23:28:36 +08:00
YuTengjing a27dfaeda1 ✨ feat: support audio in multimodal understanding (#17904) 2026-08-05 11:08:46 +08:00
AmAzing- f29cc947f3 🧹 chore(analytics): remove legacy PostHog configuration (#17738) 2026-07-30 17:40:14 +08:00
René Wang aa56638fa0 📝 docs: add July 27 weekly changelog (#17635) 2026-07-27 10:15:38 +08:00
YOYO-do e698f8daf6 💄 style: refresh AIHubMix branding and links (#17540)
* 💄 style: refresh AIHubMix branding and links

- Correct brand casing to AIHubMix in all user-facing text (provider card,
  18 locale files, docs pages, READMEs)
- Update third-party proxy table: official logo, direct console token link
- Add the missing 'Obtain OpenAI API Key' section to the English README

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* 💄 style: update AIHubMix table model examples to GPT-5.6 and Claude Fable 5

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: YuTengjing <ytj2713151713@gmail.com>
2026-07-24 17:48:04 +08:00
LiJian a6a2642008 🐛 fix(tools): make TOOL_NAME_MAX_LENGTH=0 actually disable tool-name compression (#17530)
* 🐛 fix(tools): make TOOL_NAME_MAX_LENGTH=0 actually disable tool-name compression

`TOOL_NAME_MAX_LENGTH` (#17249) is read from `process.env` at module load in
`ToolNameResolver`, so it only ever applied to the gateway (server-run) path.
The default client-driven chat path builds the tool payload in the browser,
where the server env is invisible — deployments setting `0` still got opaque
`MD5HASH_…` tool names.

Ship the value to the client with the global server config and push it into the
context-engine module both on config load and at `createToolsEngine` (the client
mirror of `createServerToolsEngine`), before any tool name is generated.

Also adds the var to the `@lobechat/env` tools schema and documents it in the
self-hosting env docs (en + zh-CN).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ♻️ refactor(tools): parse TOOL_NAME_MAX_LENGTH through one shared function

Review follow-up: the env schema coerced the value with zod while
`ToolNameResolver` parsed `process.env` with `parseInt`, so the same env value
could mean two things on the two sides that generate tool names:

  raw      resolver (server)   shipped to client
  1e2      1                   100
  " "      64 (fallback)       0  → compression silently off on the client
  2048     2048                throws
  -5/abc   64 (fallback)       throws

The last row is the worst: `@t3-oss/env-core` throws on validation failure, so a
typo'd value would take `getServerGlobalConfig()` down entirely, where before it
just fell back to 64.

Move the parse into `parseToolNameMaxLength` (`@lobechat/const/plugin`, a leaf
module both sides can import cheaply — importing context-engine here would drag
the database module graph into the config path) and have the resolver and the
global config both use it. Unset / unparseable / negative reads as "not
configured" and falls back to the default; no upper bound, matching the
resolver. Env schema now passes the raw string through.

Covered by a table test in `ToolNameResolver.config.test.ts` (parse semantics)
and one in `getServerGlobalConfig.test.ts` (the shipped value matches, and a
typo no longer throws).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ♻️ refactor(tools): keep the tool-name config out of the app-shell bundle

The client-side sync lived in `serverConfig`'s SWR success handler, which put a
static `@lobechat/context-engine` import into a store that every page creates —
including the lightweight auth / popup shells — dragging the engine's module
graph (down to `@lobechat/database`) into bundles that never generate a tool
name.

Keep the value as plain data in the server config and push it into the engine
from the sites that actually generate names, via `applyToolNameMaxLength()`:
`createToolsEngine` (the tools payload) and the agent-profile mention list,
whose generated names are written into the system prompt and so must match the
names sent to the model. `src/store/serverConfig` is now byte-identical to
canary.

Verified: SPA vite build passes (the `@lobechat/const/plugin` subpath resolves
in the client bundle); context-engine 445 tests, client-side 286 tests, server
globalConfig/tool-engine suites, and the full type-check all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 11:49:44 +08:00
YuTengjing 191f3fe776 📝 docs: fix outdated content across the docs site (#16964)
* 📝 docs: fix outdated content across the docs site

Audited docs/ against the current codebase and fixed stale content that
drifted after major refactors (Clerk/NextAuth → Better Auth, src/server →
apps/server, src/{config,envs,locales} → packages/*, model-bank updates).

- self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation
  warnings; fix microsoft/zitadel alias claims and the Logto callback path
- environment-variables & advanced: correct wrong defaults (S3_SET_ACL,
  AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars
  and fictional feature flags, fix OIDC config guidance
- development: update refactored paths, Better Auth, .mjs configs, remove
  the MSW section (msw is not a dependency)
- providers & model examples: replace retired model ids with in-bank ones;
  fix comfyui frontmatter corruption
- usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys,
  channel capability tables, Feishu/Lark WebSocket mode
- platform/migration: fix dead links, docker service name, npx/npm → bun

EN and zh-CN pairs updated together.

* 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance

- Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match
  the runtime SSO redirectURI override
- Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth;
  mark NEXT_AUTH_SECRET as deprecated in zh-CN

* 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths

Align OSS agent guidance with post-refactor layout:
- packages/locales/src/default + bun run i18n
- packages/env/src for env schemas (@/envs alias)
- spa-auth shell + src/routes/auth segments
- chat agentRun/transports/hetero instead of aiChat

* 📝 docs: document APP_URL as required for Better Auth base URL

Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header
auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated.

* 📝 docs: note self-host search provider setup for web search

Built-in lobe-web-browsing needs no client plugin, but self-hosted
servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG).

* 📝 docs: point feature guide welcome UI at AgentHome

Opening message/questions on the agent chat page live in
src/features/AgentHome, not Onboarding WelcomeMessage.
2026-07-10 17:50:03 +08:00
Sui_Feng aefce3df3a 📝 docs: Upgrade some pages in documents (#16189)
* 📝 docs: Remove Langfuse docs; enable pg_search

Delete Langfuse observability guides (langfuse.mdx and langfuse.zh-CN.mdx). Update Docker self-hosting docs to add `-c shared_preload_libraries=pg_search` to the ParadeDB docker run command and clarify that the ParadeDB image includes pgvector and pg_search and that pg_search must be explicitly enabled; apply the same clarification to the Chinese documentation.

* 📝 docs: Document 'video' capability in model list

Add a `video` entry to the extension capabilities table in docs/self-hosting/advanced/model-list.mdx and its Chinese translation (model-list.zh-CN.mdx) to document Video Comprehension support.

* 📝 docs: Add agent feature flags & update thread text

Add documentation entries for new system agent feature flags: generationTopic (AI image automatic topic naming), inputCompletion (input auto-completion suggestions), and promptRewrite (prompt optimization before generation). Also reword the thread/branch conversation entry to clarify automatic title generation. Apply the same updates to the Chinese localization file.

* 📝 docs: Document AGENT_GATEWAY_SERVICE_TOKEN env var

Add documentation for the AGENT_GATEWAY_SERVICE_TOKEN environment variable to the self-hosting environment variables pages (English and Chinese). The new entries specify that the variable is optional, describe it as the authentication token used between Gateway Mode and a self-deployed Agent Gateway, and include default (-) and example (`dev-secret`). Files changed: docs/self-hosting/environment-variables/basic.mdx and basic.zh-CN.mdx.
2026-07-01 12:27:47 +08:00
YOYO-do 6d572f1759 ✨ feat(aihubmix): support configuring the base URL via AIHUBMIX_PROXY_URL (#16418)
* ✨ feat(aihubmix): allow configuring the base URL via AIHUBMIX_PROXY_URL

Follow-up to #16328, which made the AiHubMix gateway configurable per-user in the UI. This adds the server-side environment-variable path (as asked in the review), mirroring the New API provider.

- packages/env/src/llm.ts: declare AIHUBMIX_PROXY_URL (schema + value)
- Dockerfile: pass AIHUBMIX_PROXY_URL through
- .env.example: document AIHUBMIX_PROXY_URL

The runtime already reads options.baseURL and <PROVIDER>_PROXY_URL is injected generically, so no further wiring is needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* 📝 docs(aihubmix): document AIHUBMIX_PROXY_URL

Add the AIHUBMIX_PROXY_URL entry to the self-hosting model-provider env reference (EN + zh-CN), matching NEWAPI_PROXY_URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 10:54:24 +08:00
Arvin Xu bc9a7cfab8 ✨ feat(gateway): move gateway mode to chat config (#15714)
* ✨ feat(gateway): move gateway mode to chat config

* ✨ feat(gateway): add agent gateway env flag
2026-06-14 15:18:40 +08:00
Coooolfan a28fd30719 ✨ feat: suppport sandbox provider (#15184)
* ✨ feat(cloud-sandbox): add Onlyboxes provider support for self-hosted sandbox (#15136)

- Add `SANDBOX_PROVIDER` env var (market | onlyboxes) to select sandbox backend
- Add Onlyboxes-specific env vars: `ONLYBOXES_BASE_URL`, `ONLYBOXES_API_TOKEN`, `ONLYBOXES_LEASE_TTL_SEC`
- Create `SandboxService` abstraction layer with `MarketSandboxService` and `OnlyboxesSandboxService` implementations
- Add `createSandboxService` factory that routes to configured provider
- Migrate `execInSandbox` and `exportFile` t

* ✨ feat(sandbox): improve Onlyboxes export flow

* 🐛 fix(sandbox): pass presigned upload headers to Onlyboxes

* ✅ test(sandbox): import tool runtime package

* 🐛 fix(sandbox): preserve Market export errors

* 🐛 fix(sandbox): allow empty docker env defaults

* 🔒 fix: redact sandbox auth params in logs

* 🐛 fix: address sandbox provider review comments

* 🔐 feat: use onlyboxes jit tokens

* 📝 docs: clarify cloud sandbox provider config

* 🐛 fix: align cloud sandbox timeout defaults

* 🐛 fix(sandbox): lower default Onlyboxes lease TTL to 15 minutes

* 🐛 fix(sandbox): cap Onlyboxes task wait time

* ♻️ refactor: split sandbox env config
2026-06-07 12:18:39 +08:00
AnotiaWang 55452cdf42 🐛 fix(web-crawler): support Jina CN domains (#14916)
Co-authored-by: AnotiaWang <AnotiaWang@users.noreply.github.com>
2026-05-22 23:05:27 +08:00
YuTengjing fc088773bd 🐛 fix: configure anthropic client timeout (#15042) 2026-05-21 02:20:29 +08:00
Arvin Xu 3bcf6a8d72 ♻️ refactor(agent-settings): consolidate Chat tab into Params popover, drop dead auto-topic feature (#14885)
* 🔥 chore(agent-config): drop dead enableAutoCreateTopic feature

Drop enableAutoCreateTopic + autoCreateTopicThreshold end-to-end. No
business code consumed these fields anymore — only types, defaults,
locale copy, UI form items, agent-builder LLM prompts, and test
fixtures kept the dead config alive.

Sweep:
- types & zod schema (LobeAgentChatConfig, AgentChatConfigSchema, openapi)
- DEFAULT_AGENT_CHAT_CONFIG constant
- locale keys in default + 18 translations
- agent-builder system prompts & tool manifests
- AgentChat form items (auto-topic switch + threshold slider)
- test fixtures & integration tests (replaced sample boolean key in
  parser tests with enableHistoryCount)
- docs/self-hosting env-var examples
- settings.test snapshot

dataImporter JSON fixtures keep the legacy keys on purpose — they
simulate historical user exports and the zod schema strips unknowns.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ✨ feat(chat-input): move inputTemplate + autoScroll into Params popover

Surface the User Input Preprocessing template (inputTemplate) and
Auto-scroll During AI Response toggle (enableAutoScrollOnStreaming) in
the chat-input Params popover, alongside compression / history /
max_tokens. Drop the matching form items from AgentChat — the popover
is now the single entry point for these two agent-level preferences.

ControlRow's action prop becomes optional so inputTemplate can render
as a label + TextArea without a Switch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔥 refactor(agent-settings): drop AgentChat tab in favor of Params popover

Remove the now-redundant Chat Preferences tab from agent settings:

- delete src/features/AgentSetting/AgentChat/
- drop ChatSettingsTabs.Chat enum and its three registrations
  (useCategory, AgentSettingsContent, profile Content)
- drop agentTab.chat locale key in default + 18 translations
- drop MessagesSquare / MessagesSquareIcon imports that became unused

History/compression/auto-scroll/inputTemplate already live in the
chat-input Params popover, so this tab carried no unique
functionality.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ✨ feat(chat-input): surface enableStreaming + reasoning_effort + disabledParams in Params popover

Bring the Model tab's controls into the chat-input Params popover so the
popover can become the single entry point for agent-level params.

- enableStreaming Switch at the top of Advanced (treats undefined as on,
  matching `chatConfig.enableStreaming !== false` in chat service)
- reasoning_effort row after max_tokens (Select tied to
  chatConfig.enableReasoningEffort / params.reasoning_effort, matching
  the agentConfigResolver gating)
- per-model disabledParams filter on the 4 sampling sliders (e.g. Claude
  Opus 4.7 hides temperature/top_p), via aiModelSelectors.modelDisabledParams
- max_tokens defaults to 4096 on toggle-on (parity with AgentModal),
  matching the AgentModal UX
- drop the !enableAgentMode gate on Advanced so agent-mode users still
  reach the model params once the Model tab is gone

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔥 refactor(agent-settings): drop AgentModal tab in favor of Params popover

Now that the chat-input Params popover surfaces enableStreaming,
reasoning_effort, the 4 sampling params (model-aware via
disabledParams), and max_tokens, the Model Settings tab carries no
unique behavior. Remove it:

- delete src/features/AgentSetting/AgentModal/ (index + ModelSelect)
- drop ChatSettingsTabs.Modal enum and its three registrations
  (useCategory, AgentSettingsContent, profile Content)
- drop agentTab.modal locale key in default + 18 translations
- drop BrainCog / BrainIcon imports that became unused
- simplify the profile Content inbox-default fallback to Opening
  (Content menu no longer carried Modal at all)

settingModel.* locale keys are kept — Controls still reads them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(chat-input): keep !enableAgentMode gate on Advanced sampling params

Walk back the gate removal from the prior commit. Agent mode is meant
to manage temperature / top_p / penalties / reasoning_effort itself;
exposing user overrides there contradicts the design.

- Move enableStreaming out of Advanced into the common section so it
  stays visible in both modes (streaming is a UI behavior, not a
  sampling param).
- Re-wrap the SectionHeader + sampling sliders + max_tokens +
  reasoning_effort with `{!enableAgentMode && (...)}`, restoring the
  prior visibility rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 10:27:35 +08:00
YuTengjing df32dd4966 ✨ feat: support model defaults and DeepSeek pricing (#14379) 2026-05-02 23:21:09 +08:00
Arvin Xu a176288670 💄 style(conversation): persist per-topic chat scroll position (#14191)
* ✨ feat(conversation): persist per-topic chat scroll position to localStorage

Restores scroll position when switching back to a topic, keyed by
messageMapKey(context). Falls back to scroll-to-bottom for new topics or
when the user was already at the bottom. Storage is capped at 500 entries
with 30-day expiry and silent fallback on quota errors.

Fixes LOBE-8251

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔨 chore(conversation): rename scroll snapshot storage prefix to LOBEHUB

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔨 chore(conversation): use LOBEHUB_SCROLL as scroll snapshot key prefix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(conversation): preserve scroll across draft-to-topic key transition

When a draft conversation (`*_new` key) gets promoted to a real topic via
onTopicCreated, the contextKey changes mid-stream for the same logical
conversation. Treating it as a topic switch loaded a missing snapshot and
fell back to scrollToIndex(end), yanking users away from content they
were reading.

Now we detect the draft-promotion shape, migrate the snapshot to the new
key, and skip the restore pass while data is already on screen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔥 chore(settings): remove queryRewrite system agent

Removes the unused knowledge-base query rewrite system agent: settings UI in agent/service-model pages, type definition, default config, store selector, server env parser, locale strings across 18 languages, env-variable docs, and the now-orphan chainRewriteQuery prompt chain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 18:14:32 +08:00
CanisMinor 3c5249eae7 📝 docs: fix agent usage typo (#13198)
docs: fix agent usage
2026-03-23 14:14:58 +08:00
YuTengjing 1df5ae32f1 🐛 fix: distinguish SSRF block errors from network errors (#13103) 2026-03-18 18:16:19 +08:00
Arvin Xu adbf11dc11 📝 docs: update documents (#12982)
update document
2026-03-14 22:06:09 +08:00
Marcell Gu 023e3ef11a 📝 docs: Simplify docker compose network architecture & Remove broken links from docker compose docs (#12749)
* ♻️ refactor(docker): simplify network architecture and add admin port
- Remove unnecessary network-service (alpine) container
- Use dedicated lobe-network bridge for all services
- Add RUSTFS_ADMIN_PORT environment variable for admin console
- Update container-to-container communication to use Docker service names
- Use relative path volumes for better data persistence

* 📝 docs: update Docker Compose deployment guide
- Add single-domain deployment documentation
- Update INTERNAL_APP_URL guidance
- Clarify Port Mode vs Domain Mode behavior
- Add S3_ENDPOINT configuration tips
- Remove broken link to non-existent server-database documentation

* fix(docker): keep backward-compatible volume paths for existing deployments

- PostgreSQL: Keep ./data (not ./postgres_data)
- Redis: Keep redis_data named volume (not ./redis_data)
- RustFS: Keep rustfs-data named volume (not ./rustfs_data)

This ensures existing users can upgrade without data migration.

* fix(docker): correct Port Mode vs Domain Mode description

- Fix reversed explanation in comments
- Port Mode: Uses default ports (3210/9000/9001)
- Domain Mode: Custom ports via reverse proxy

This aligns with the actual deployment script behavior.
2026-03-10 09:55:56 +08:00
WangYK 473bc4e005 💄 style: support video input for SiliconCloud provider (#9988)
* ✨ feat: support video input for SiliconCloud models

* 🐛 fix: resolve SSRF issue in video fetching; move message transformation to `context-builders`

* 🐛 fix: update MiniMax M2 context size

* 🐛 fix: use ssrf-safe-fetch in `videoUrlToBase64` and `imageUrlToBase64`

* 🐛 fix: fix tests

* 🐛 fix: dynamically import ssrf-safe-fetch to prevent build failures

* Revert "🐛 fix: dynamically import ssrf-safe-fetch to prevent build failures"

This reverts commit 5de0829527ae6dbdc78d694ccc9dca86f46e3168.

* chore: move `videoToBase64` to the `util` package

* fix: fix tests

* chore: update siliconcloud models

* fix: deduplicate siliconcloud models

* fix: videoUrlToBase64 should determine runtime when fetching

* fix: fix tests

* chore: update siliconcloud models

* chore: remove deprecated models

* chore: update model info

* fix: fix tests
2026-03-10 00:02:29 +08:00
CanisMinor 43578a9bcc 📝 docs: Polishing and improving product documentation (#12612)
* 🔖 chore(release): release version v2.1.34 [skip ci]

* 📝 docs: Polish documents

* 📝 docs: Fix typo

* 📝 docs: Update start

* 📝 docs: Fix style

* 📝 docs: Update start

* 📝 docs: Update layout

* 📝 docs: Fix typo

* 📝 docs: Fix typo

---------

Co-authored-by: lobehubbot <i@lobehub.com>
2026-03-03 16:01:41 +08:00
YuTengjing 306c50704e 🐛 fix: improve crawler error handling and timeout cancellation (#12487) 2026-02-26 22:59:10 +08:00
sxjeru e51234443a ✨ feat: Add new provider Straico (#12219)
✨ feat: add Straico model provider integration and environment variable support
2026-02-19 20:02:07 +08:00
YuTengjing e2fd28eece 🐛 fix: hide password features when AUTH_DISABLE_EMAIL_PASSWORD is set (#12023) 2026-02-02 14:17:10 +08:00
BrandonStudio 98f93ef2f0 🐛 fix(auth): revert authority URL and tenant ID for Microsoft authentication. (#11930)
🔧 feat(auth): revert authority URL and tenant ID for Microsoft authentication
2026-02-02 13:35:54 +08:00
Arvin Xu 4a87b31246 📝 docs: improve docs (#12013)
Update docs
2026-01-31 19:46:44 +08:00
YuTengjing f3210a3f57 🐛 fix(auth): add AUTH_DISABLE_EMAIL_PASSWORD env to enable SSO-only mode (#12009) 2026-01-31 18:25:22 +08:00
Arvin Xu 7496511917 📝 docs: improve self-hosting documents (#11994)
* update document

* update documents

* update auth

* move

* update database

* move auth

* move auth

* update
2026-01-30 20:50:05 +08:00
Arvin Xu f17acd7f7e ♻️ chore(docker-compose): refactor docker compose (#11989)
* improve message content

* ♻️ refactor(docker-compose): 创建精简版 deploy 配置

- 新建 docker-compose/deploy 目录,包含最小化部署配置
- 仅保留核心服务:postgresql、redis、rustfs、searxng、lobe
- 移除 Casdoor 认证服务相关配置
- 移除可观测性服务(Grafana/Prometheus/Tempo/otel-collector)
- 使用 paradedb/paradedb:latest 镜像(支持 pgvector + pg_search)
- 更新 setup.sh 指向新的 deploy 目录
- 清理 .env 示例文件中的 Casdoor 相关配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* update document

* update content

* update content

* improve env

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:15:43 +08:00
YuTengjing 225b1f4b47 📝 docs: remove outdated auth docs and simplify deployment guide (#11916) 2026-01-28 01:14:53 +08:00
YuTengjing e6cb6cb592 🐛 fix: rename docker image and update docs for v2 (#11911) 2026-01-27 22:14:58 +08:00
YuTengjing 5b953b15cb ✨ feat: share page improvements and pg17 docs update (#11850) 2026-01-26 21:05:47 +08:00
Arthals b89fc0944e 📝 docs: add rustfs (#10630)
📝 docs: RustFS
2026-01-26 20:12:12 +08:00
René Wang 3dfc86fd0f feat: Update user guide & changelog (#11518)
* feat: Redesign doc

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* feat: Uopdate content

* chore: New doc

* chore: Update content

* chore: Update content

* chore: add images

* chore: add images

* chore: add images

* chore: add images

* feat: Add more images

* feat: Add more images

* fix: Cannot reach end

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* Revise README content and structure

Updated README to reflect changes in project description and removed outdated notes.

* Revise 'Getting Started' and TOC in README

Updated the 'Getting Started' section and modified the table of contents.

* chore: Update content

* Revise README structure and content

Updated the Getting Started section and removed the Table of Contents. Adjusted the Local Development instructions.

* Remove custom themes section from README

Removed section about custom themes from README.

* Update README.md

* Refine introduction and highlight cloud version

Updated wording for clarity and added recommendation for cloud version.

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* fix: add missing translation

* 🔀 chore: Move README changes to feat/readme branch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add missing translation

* chore: update cdn

* docs: add migration guide from v1.x local database to v2.x and update help sections

Signed-off-by: Innei <tukon479@gmail.com>

* fix: add missing translation

* fix: add missing images

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* style: update cdn

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: canisminor1990 <i@canisminor.cc>
Co-authored-by: Innei <tukon479@gmail.com>
2026-01-26 15:28:33 +08:00
YuTengjing a6bfaabdab 🐛 fix: webhook user service compatibility for old nextauth users (#11826) 2026-01-26 00:11:47 +08:00