Commit Graph

514 Commits

Author SHA1 Message Date
YuTengjing
1eff8646f7 feat: remove NextAuth (#11732) 2026-01-23 23:57:08 +08:00
Neko
31d2f26b6e feat(database): extended async task with metadata and parent id, added index (#11712) 2026-01-23 21:49:56 +08:00
YuTengjing
395595a2c8 feat: remove Clerk authentication code (#11711) 2026-01-23 14:41:22 +08:00
YuTengjing
bfe387c027 📝 docs: add clerk to betterauth migration scripts and enhance auth docs (#11701)
* 🔧 chore: add clerk to betterauth migration scripts

* 🔧 chore: support node-postgres driver for migration scripts

* 🔥 chore: remove unnecessary chore scripts

* ♻️ refactor: reorganize migration scripts directory structure

* 📝 docs: add example column to email service configuration table

* 📝 docs: rename auth/better-auth to auth/providers

* 📝 docs: enhance email service configuration with detailed guides

* 📝 docs: add Clerk to Better Auth migration guide

- Add migration documentation (EN & CN) with step-by-step instructions
- Add dry-run environment variable for safe testing
- Enhance script output with success/failure emojis
- Add placeholder files for migration data directories
- Update .gitignore to exclude migration data files

*  feat(auth): add set password option for social-only users

- Add isSocialOnly state to detect users without password
- Show Alert with "set password" link when magic link is disabled
- Update migration docs to clarify Magic Link vs non-Magic Link scenarios
- Add profile page password management info to docs

* ♻️ refactor: improve migration safety and sign-in link styling

- Add production mode confirmation prompt requiring "yes" input
- Use createStaticStyles for setPassword link styling with theme token

* 📝 docs: clarify migration script requirements and remove invalid links

* 📝 docs: add clerk migration guide link to legacy auth docs

* ♻️ refactor: enforce strict validation for clerk external accounts

* 📝 docs: add step to disable new user registration before migration

* 🐛 fix: handle missing .env file in migration scripts
2026-01-22 19:54:08 +08:00
Neko
0160fbde83 feat(database): added user memory activity (#11680) 2026-01-22 10:24:50 +08:00
YuTengjing
3110e2c356 📝 docs: update Better Auth documentation (#11679) 2026-01-21 18:44:44 +08:00
YuTengjing
c0f9875195 ♻️ refactor(auth): remove NEXT_PUBLIC_AUTH_URL env variable (#11658) 2026-01-21 11:51:46 +08:00
Yee
38725da72f 🐛 fix: internlm provider base url and homepage (#11612)
fix: internlm provider base url and homepage
2026-01-19 20:13:21 +08:00
YuTengjing
2c1af8a728 feat(router-runtime): add fallback options (#11531) 2026-01-19 11:28:54 +08:00
YuTengjing
ddca1652bb feat(share): add topic sharing functionality (#11448) 2026-01-13 22:10:48 +08:00
Arvin Xu
a8c6b2cb92 ♻️ refactor(agentGroup): simplify LobeChatGroupChatConfig schema (#11431)
* ♻️ refactor(agentGroup): simplify LobeChatGroupChatConfig schema

- Remove unused config properties: enableSupervisor, orchestratorModel, orchestratorProvider, scene, maxResponseInRow, responseOrder, responseSpeed
- Keep only essential properties: allowDM, revealDM, openingMessage, openingQuestions, systemPrompt
- Delete GroupChatSettings feature component (no longer needed)
- Delete AgentTeamSettings mobile component
- Update InsertChatGroupSchema to use manual Zod schema instead of createInsertSchema
- Remove hostConfig and enableSupervisor parameters from GroupWizard and MemberSelectionModal interfaces
- Simplify callback signatures across the codebase
- Update all related tests to use new config structure

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

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

* update default provider

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-12 15:46:11 +08:00
Shinji-Li
eefb6cb185 feat: generate agent_cron_jobs in agents (#11349)
* feat: generate agent_cron_job in agents

* feat: update the db fields

* feat: add trigger/mode in topics table & add group id in cronjob

* feat: update sql

* fix: fixed db migration

* feat: update the test
2026-01-09 14:22:35 +08:00
Innei
8be32c2f32 feat: Add browser compatibility detection and fallback page (#11309)
*  feat: Add browser compatibility detection and fallback page

- Add automatic browser compatibility check in app layout
- Create standalone not-compatible.html fallback page with modern responsive design
- Support dark mode via prefers-color-scheme
- Include browser download links (Chrome, Firefox, Edge, Safari, Arc)
- Display minimum browser requirements
- Update feature development documentation

* 📝 docs(CLAUDE): Update PR Linear Issue Association guidelines

- Clarify the requirement to include magic keywords in PR body for Linear issues.
- Add instruction to summarize work done in the Linear issue comment and update the issue status to "In Review".

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

*  feat: Update browser compatibility page and layout

- Change favicon link to absolute path in not-compatible.html.
- Add Safari browser support with corresponding icon and link.
- Update minimum browser requirements to Chrome 99+, Safari 16.4+, and Edge 99+.
- Fix typo in layout.tsx comments from "serveral" to "several".

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-01-07 23:00:52 +08:00
YuTengjing
4fc03bbf66 feat(image): improve image generation with new models and bug fixes (#11311) 2026-01-07 19:16:24 +08:00
YuTengjing
ed811c51f8 📝 docs(self-hosting): add OAuth token exchange troubleshooting for Docker reverse proxy (#11240)
* 📝 docs(self-hosting): add OAuth token exchange troubleshooting for Docker reverse proxy

Add troubleshooting section for OAuth authentication failures when using Docker deployment behind reverse proxy. The issue occurs when MIDDLEWARE_REWRITE_THROUGH_LOCAL=1 (default) rewrites OAuth token exchange URLs to localhost.

Fixes #10166

*  feat(model-bank): add grok-4 model support

Add Grok 4 model to lobehub models with the following capabilities:
- Function call, reasoning, search, and vision support
- 256K context window
- Search implementation via params
2026-01-06 21:53:20 +08:00
Arvin Xu
46a58a83a1 ♻️ refactor: Convert glossary from JSON to Markdown table format (#11237)
* ♻️ refactor: Convert glossary from JSON to Markdown table format

- Migrate glossary.json to docs/glossary.md with table format
- Update .i18nrc.js to read glossary from Markdown file
- Add more terminology entries (agentGroup, thread)
- Improve readability with structured table layout

* update i18n

* update glossary

* 🐛 fix: fix file type
2026-01-05 23:33:55 +08:00
YuTengjing
7a532eee92 🔒 security: replace KEY_VAULTS_SECRET with JWT signing for async router auth
- Add JWKS_KEY env variable with fallback to OIDC_JWKS_KEY
- Add signInternalJWT() and validateInternalJWT() in internalJwt.ts
- Use short-lived JWT (3s) with purpose claim to authenticate lambda → async calls
- Remove KEY_VAULTS_SECRET from Authorization header transmission
- Update OIDC provider to use JWKS_KEY from authEnv
- Update documentation for JWKS_KEY and desktop sync
2025-12-31 18:06:02 +08:00
Arvin Xu
e05375f796 feat: support notebook tool (#10902)
* add notebook builtin tool

* document init workflow

* gtd support plan mode

* add notebook tools
2025-12-24 12:55:09 +08:00
Innei
86dd27b0e1 chore: update references from react-layout-kit to @lobehub/ui for Flexbox and Center components in documentation and rules
Signed-off-by: Innei <tukon479@gmail.com>
2025-12-24 12:54:44 +08:00
Arvin Xu
9be0893dba 👷 build: improve document db schema (#10892)
* add document db schema update

* update migration sql

* update migration sql
2025-12-23 18:54:48 +08:00
Rdmclin2
8c42a934b3 feat: mobile native better auth support (#10871)
* feat: mobile native better auth support

* chore: add android assetlinks

* chore: add android assetlinks

* chore: add expo fingerpoint

* chore: add relation

* chore: add android origin hash

* chore: update passkey table

* chore: optimize version

* chore: remove as any

* fix: sql not exits problem

* fix: passkey statement

* fix:  passkey origin null

* chore: remove strict peer dependencies

* fix: test case

* chore: remove local passkey origin
2025-12-23 15:19:42 +08:00
Arvin Xu
5c489bc971 ♻️ refactor: refactor database schema (#10860)
* update data schema

* update data schema
2025-12-20 20:20:07 +08:00
Arvin Xu
5cc9141b52 🔨 chore: update config (#10857)
chore update config
2025-12-19 23:13:22 +08:00
Arvin Xu
81e56d462a ️ perf: add more sql to improve performance (#10777)
* Update sql

* fix user tests
2025-12-15 01:06:34 +08:00
René Wang
ec3aa6ba3b ️ perf(database): optimize document queries with indexes and field exclusion (#10740)
* ️ perf(database): optimize document queries with indexes and field exclusion

- Add database indexes for source_type and compound query optimization
- Exclude large JSONB fields (content, pages, editorData) in list queries
- Improve queryDocuments performance for better list view rendering

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

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

* feat: Add migration

* ️ perf(database): missing user_id and user_memory_id index

* refac: Use select

* fix: migration

* fix: Test error

* Update sql

* feat(userMemories): added captured_at column

* fix: not null default now

* fix: not null default now

* Update sql

* Update sql

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Neko Ayaka <neko@ayaka.moe>
Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-12-12 20:09:08 +08:00
YuTengjing
458cbf4d5c 🔨 chore: track user last active time (#10733) 2025-12-11 17:14:25 +08:00
YuTengjing
f72a5e6cc1 feat: betterauth username signin (#10607) 2025-12-05 01:35:20 +08:00
Shinji-Li
c09f2474db 🔨 chore: add source type into user_install_plugins (#10603)
* chore: add source type into user_install_plugins

* fix: change the source type into varchar
2025-12-04 18:14:21 +08:00
Neko
d15c845213 feat(database): topic metadata for user memory extractor (#10569) 2025-12-03 19:14:29 +08:00
Arvin Xu
0d609d199a ♻️ refactor: refactor agent slug schema (#10561)
* fix agent schema

* fix snapshot
2025-12-02 23:23:42 +08:00
YuTengjing
7449b2913f feat: email provider support resend (#10557) 2025-12-02 19:05:08 +08:00
bbbugg
c5d1b0494a 📝 docs: add Vertex AI configuration options and update documentation (#10331)
💄 style: add Vertex AI configuration options and update documentation
2025-12-01 20:31:23 +08:00
YuTengjing
2ab88c5dcf 🐛 fix: drop user.phoneNumber and reuse user.phone (#10531) 2025-12-01 19:00:29 +08:00
YuTengjing
3be78f04e8 feat: integrate better-auth admin plugin (#10512) 2025-12-01 17:16:06 +08:00
Arvin Xu
dff82f4093 🔨 chore: update topic and message db (#10511)
* update topic and message db

* fix tests
2025-11-30 19:37:57 +08:00
YuTengjing
b5bf8ad407 🐛 fix: betterauth public url auto detect from VERCEL_URL (#10493) 2025-11-30 00:54:03 +08:00
Shinji-Li
1674cc94f2 🔨 chore: add market into userSettings & save the oidc token into db (#10481)
* feat: add market into userSettings & save the oidc token into db

* fix: update migrations
2025-11-28 23:19:42 +08:00
Arvin Xu
69898185f3 ♻️ refactor: refactor thread table and nextauth userId (#10475)
push update
2025-11-28 13:50:43 +08:00
YuTengjing
1375314555 🐛 fix: align docker auth defaults and better-auth docs (#10457) 2025-11-27 21:16:22 +08:00
YuTengjing
dc62cc969d feat: support better-auth (#10215) 2025-11-27 20:10:40 +08:00
Shinji-Li
3f95d1c34a 🔨 chore: add editor_data in agents db (#10448)
* feat: add editor_data in agents db

* fix: add if exists sql

* fix: change the schema
2025-11-27 13:09:05 +08:00
Arvin Xu
760105adb2 🐛 fix: fix db migration snapshot not align with db schema (#10399)
* fix db sql

* clean
2025-11-24 21:15:25 +08:00
René Wang
eea41dcb82 👷 build: Add slug to documents table (#10299)
* feat: Add SLUG

* fix: CI

* feat: Update constairnt

* fix: Remove slug from files

* fix: Test error
2025-11-21 17:56:08 +08:00
sxjeru
d0ee3df579 feat: New API support switch Responses API mode (#9776)
*  feat: 添加对新API和路由类型的支持,更新相关配置以启用Responses API

* fix: 更新测试文件中的console.error和console.debug实现,确保输出格式一致;在CreateNewProvider组件中调整provider图标映射逻辑

*  feat: 更新novita和qwen模型,调整定价策略,添加新模型及其功能

* 🐛 fix: OIDC error when connecting to self-host instance (#9916)

fix: oidc/consent redirect header

*  feat: 添加 MiniMax M2 和 Qwen3 VL 235B Instruct 模型,更新模型属性
🔧 fix: 修复免费标识逻辑,确保正确判断模型是否免费

*  feat: 添加 MiniMax-M2 模型,更新 SiliconCloud 和 Vercel AI Gateway 模型信息,调整 Kimi K2 的上下文窗口大小

* fix test

* 📝 docs: update ComfyUI documentation cover image URL (#9997)

* 🔖 chore(release): v1.142.9 [skip ci]

### [Version&nbsp;1.142.9](https://github.com/lobehub/lobe-chat/compare/v1.142.8...v1.142.9)
<sup>Released on **2025-11-02**</sup>

#### 🐛 Bug Fixes

- **misc**: OIDC error when connecting to self-host instance.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: OIDC error when connecting to self-host instance, closes [#9916](https://github.com/lobehub/lobe-chat/issues/9916) ([2e2b9c4](https://github.com/lobehub/lobe-chat/commit/2e2b9c4))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

* 📝 docs(bot): Auto sync agents & plugin to readme

* 优化 Responses API 处理逻辑,优化错误处理和流数据转换

---------

Co-authored-by: Aloxaf <bailong104@gmail.com>
2025-11-19 00:53:18 +08:00
René Wang
10e44dfb6b 👷 build: Update schema for incoming folder (#10217)
* feat: Update schema

* fix: Circular deps

* feat: Add more validate

* fix: Vercel build error

* fix: Duplicated import

* fix: Circular deps

* feat: Set varchar from 30 to 255

* feat: Regenerate migration file

* feat: Regenerate migration

* feat: Regenerate migration
2025-11-18 16:42:13 +08:00
Arvin Xu
656a33359b 👷 build: add intervention tool column (#10163)
* add intervention tool

* update sql
2025-11-12 10:25:03 +08:00
Shinji-Li
a15eda7fbf 🔨 chore: add market_identifier into agents table schema (#10164)
chore: add market_identifier into agents table schema
2025-11-11 22:37:47 +08:00
YuTengjing
4f7bc5acd2 🐛 fix: add SSRF protection (#10152) 2025-11-11 19:39:36 +08:00
XYenon
7eb78c43e6 👷 build: add INTERNAL_APP_URL for server-to-server calls (#9960)
*  feat: add INTERNAL_APP_URL for server-to-server calls

Add INTERNAL_APP_URL environment variable to bypass CDN/proxy for internal operations like embedding and file chunking. Falls back to APP_URL if not set.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* 📝 docs: add INTERNAL_APP_URL documentation

Add documentation for INTERNAL_APP_URL environment variable in:
- docker-compose .env.example
- Docker Compose deployment guide (English and Chinese)

Explains how to bypass CDN/proxy for server-to-server operations.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

*  test: add tests for INTERNAL_APP_URL feature

Add comprehensive test coverage for INTERNAL_APP_URL:
- Test fallback behavior to APP_URL when INTERNAL_APP_URL is not set
- Test explicit INTERNAL_APP_URL configuration
- Test localhost bypass for CDN/proxy
- Test createAsyncServerClient using INTERNAL_APP_URL
- Test authentication headers in async calls

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-11-06 13:28:54 +08:00
sxjeru
7e1dd02d7c ♻️ refactor: add settings (jsonb) column to ai_models table (#10042)
* Refactor code structure for improved readability and maintainability

* edit dbml

* feat: 更新 AiInfraRepos 以支持用户设置覆盖内置设置

* Revert "Refactor code structure for improved readability and maintainability"

This reverts commit 81453d8dc3.

* Refactor code structure for improved readability and maintainability

* 添加 IF NOT EXISTS 选项以避免重复列添加

* format
2025-11-04 21:02:40 +08:00