Commit Graph

473 Commits

Author SHA1 Message Date
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 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
Arvin Xu
0d8188c60b ️ perf: improve db query performance (#10036)
* improve db query performance

* Remove query timing log from hasMoreThanN

Removed timing log from hasMoreThanN method.
2025-11-04 14:29:11 +08:00
Arvin Xu
4ee4590630 ♻️ refactor: remove deperated code (#10001)
* remove

* improve

* remove chatModels

* remove user model list slice

* improve lab image

* remove deprecated code

* remove clerk_sign_up

* fix tests
2025-11-03 13:14:35 +08:00
Rylan Cai
78df7a7e86 ♻️ Refactor(V2): Remove deprecate envs to reserve Namespace for better-auth (#9954) 2025-11-02 16:45:46 +08:00
sxjeru
efb4c22aff ♻️ refactor: Migrating Firecrawl to v2 (#9850)
*  feat: 更新 Firecrawl API 版本,增强搜索功能和结果映射

*  feat: 更新 FirecrawlMetadata 和 FirecrawlResults 接口,添加可选字段并增强错误处理

* fix typo (native -> naive)

*  feat: 更新模型配置,移除 Claude 3.5 Sonnet 相关条目,添加 MiniMax M2 和 KAT-Dev 32B 模型

*  feat: 添加 MiniMax M2 模型并更新代理 URL

* fix test
2025-10-31 12:41:14 +08:00
Arvin Xu
8abfdecd54 ️ perf: improve db query performance (#9946)
* fix db performance issue

* fix tests
2025-10-31 12:39:59 +08:00
Neko
6c5caf9184 👷 build(database): improve user memory schema (#9822)
chore(database): improve user memory schema
2025-10-28 15:50:15 +08:00
René Wang
bf53c116dd 👷 build: Add editorData column on document table (#9899)
feat: Add rawData column
2025-10-27 17:12:55 +08:00
bbbugg
26533b4938 📝 docs: update "ENABLED_COMFYUI" and remove "ENABLED_BFL" "ENABLED_VERCELAIGATEWAY" in docs (#9858)
* add ENABLED_COMFYUI, ENABLED_AWS_BEDROCK, ENABLED_OPENAI and remove ENABLED_BFL and ENABLED_VERCELAIGATEWAY

* 🐛 fix: update AiHubMix links and API key documentation

* revert change AiHubMix url
2025-10-24 16:15:56 +08:00
René Wang
28245be7f3 💄 style: Improvement for Agent Team After Alpha Launch [LOB-517] (#9748)
* feat: Create group member shortcut

* feat: Hide sub topic mode in group chat

* fix: persist stop thinking tag

* feat: ALlow quick

* fix: No fallback header

* feat: Control in lab

* fix: tag style

* fix: Hide virtual in the member add modal

* fix: Ts error

* feat: Replace string

* feat: Update strings

* fix: Cannot turn off host

* feat: Delete member after remove group

* feat: Rename varibles and files

* fix: Update test snap
2025-10-23 16:18:18 +08:00
Maple Gao
15ffe289f5 feat: add ComfyUI integration Phase1(RFC-128) (#9043)
Co-authored-by: YuTengjing <ytj2713151713@gmail.com>
2025-10-21 15:34:57 +08:00
Arvin Xu
d99a3a80f8 🐛 fix: pass threadId to messages in sendMessageInServer (#9808)
* fix dev hydration

* 🐛 fix: pass threadId to messages in sendMessageInServer

- Add threadId parameter to CreateMessageParams interface
- Pass threadId when creating user and assistant messages in aiChat router
- Add comprehensive tests for threadId handling and outputJSON method

This ensures thread context is properly maintained across message creation.

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

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

*  test: add comprehensive tests for addUserMessage

- Test early return when activeId is undefined
- Test message creation with files
- Test threadId propagation when activeThreadId is set
- Test input message clearing after message creation
- Test handling messages without fileList

This ensures the addUserMessage action correctly handles all scenarios including thread context.

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



* fix thread fix

* move

* baseline

*  test: fix and improve message integration tests

- Mock FileService to avoid S3 initialization issues
- Mock getServerDB to use test database instance
- Add test for threadId parameter in message creation
- Fix pagination test to handle variable message counts
- Fix batchCreate test to skip rowCount assertion (undefined in PGlite)
- Skip topicId validation test (not currently enforced)

All 15 integration tests now passing.

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


* refactor

* improve
2025-10-21 12:54:52 +08:00
Arvin Xu
eb708e04fe 📝 docs: fix outdated server-side database documentation (#9806)
- Update environment file setup instructions to use docker-compose/local/.env.example instead of .env.example.development
- Fix references to environment file locations in both English and Chinese documentation
- Align documentation with actual Docker Compose configuration that uses env_file: .env in docker-compose/local/ directory

Fixes #9525

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

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-21 11:24:12 +08:00
Arvin Xu
846a7a5986 🔨 chore: support Feishu OAuth Provider (#9745)
* feat: 添加 Feishu 作为新的 OAuth 认证提供者,并更新相关配置

* docs: 添加 Feishu 应用的环境变量配置说明

* refactor: 移除 Feishu 相关的环境变量配置,对齐 auth.js 环境变量规范

* improve docs

* add feishu

---------

Co-authored-by: 赵远景 <zhaoyuanjing@shouqianba.com>
2025-10-17 00:17:19 +08:00
René Wang
03c28385e5 feat: support Group Chat, Mention, and Multi-Agent Orchestration with feature flag (#8976)
* feat: implement group chat functionality

* fix

* update

* revert pglite mock

* fix: Add missing test

* fix mention

* fix mention

* lint: Clear unused varibles

* fix: type check

* fix: Coverage

* build: Add missing test

* fix: add mention back

* fix: Add missing test

* fix: Add test for topic

* feat: Group chat fallback style

* fix: Revert unncessary files

* fix: circular deps

* feat: tool usage

* fix: Replace debug info

* feat: Update i18n

* opti: Better prompr

* fix claude

* feat: Filter model without function calling

* fix: DM reduction

* lint: Address build error

* fix: Test error

* feat: Store model info

* style: Clean up welcome messaeg

* feat: Use new welcome message

* fix: inbox not working

* fix: inbox not working

* fix: type error

* feat: Optimize prompt

* fix: Revert unintentional changes

* lint: Remove unused code

* fix: better test

* fix: Use debug

* refact: Move normalization postion

* opti: Better prompt

* opti: Better prompt

* opti: Better prompt

* lint: Clear console.log

* fix: Update test snap

* fix: test error

* fix: Unexpectly test fail

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-10-16 22:16:40 +08:00
YuTengjing
de7368bc25 feat: add new setting for default image num (#9618) 2025-10-12 23:56:17 +08:00
Neko
23d61aebc9 🔨 chore(database): add user memory db schemas (#9371)
*  feat(database): user memory db schemas

* feat: migrations

* fix: id

* fix: syntax id

* update

* revert

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-10-10 17:41:14 +08:00
sxjeru
9cceaad241 feat: Add new provider Cerebras (#9559)
*  feat: 添加 Cerebras 模型支持,包括模型定义和配置

*  feat: 添加 Cerebras 模型支持,包括环境变量和模型描述

*  feat: 在 OllamaCloud 模型中添加 GLM-4.6,增强推理和编码能力

*  feat: 移除过时的 Grok 模型定义,优化模型列表
2025-10-09 15:27:12 +08:00
Daniel Hofheinz
7ce0d1fbc4 📝 docs(dev): clarify feature organization patterns in tutorial (#9608)
- Distinguish between global (src/features/) and page-specific features
- Update code example to show page-specific pattern
- Add explanatory note on when to use each pattern

Fixes #9585
2025-10-09 10:48:52 +08:00
Daniel Hofheinz
219250c7bb 📝 docs: remove outdated nextauth server database warning (#9593) 2025-10-07 06:20:17 +02:00
Arvin Xu
c83d7afbe6 📝 docs: update app directory structure documentation (#9582)
- Update folder-structure.mdx and zh-CN version to reflect current Next.js 13+ App Router architecture
- Replace outdated simple desktop/mobile structure with actual complex structure
- Add documentation for (backend), [variants], @modal, and desktop route groups
- Include API architecture explanation with tRPC and REST endpoints
- Document platform organization and deployment targets

Fixes #9522

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

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-06 12:13:28 +08:00
Daniel Hofheinz
210a41bb8b 📝 docs: update Zustand import syntax for v5 compatibility (#9581) 2025-10-06 05:53:44 +02:00
Arvin Xu
af274190a8 🔨 chore: add group-messages database schema (#9543)
* add group messages

* update

* add migrations

* ♻️ refactor: refactor message group

* fix

* fix

* update schema
2025-10-05 23:49:27 +08:00
René Wang
b0cb96e5c2 👷 build: Add virtual column to agent table (#9464) 2025-09-29 10:07:19 +02:00
Arvin Xu
273e0277d1 🔨 chore: pre-merge group chat relative implement (#9432)
* pre-merge code

* fix tests

* fix circular

* remove redirectUri

* fix types

* improve sql

* fix docs

* fix lint

* update model runtime
2025-09-26 03:47:25 +08:00
Guanyu Zhang
a21e71833b 📝 docs: add missing environment variables in online-search docs (#9424)
docs: add missing environment variables in online-search docs (en & zh-CN)

Co-authored-by: evan <evancodeforfun@gmail.com>
2025-09-26 03:12:02 +08:00
peerless-hero
dd9bbdc362 🔨 chore(config): add assetPrefix to nextConfig for environment variable support (#9427)
*  feat(config): add assetPrefix to nextConfig for environment variable support

*  feat(docs): add NEXT_PUBLIC_ASSET_PREFIX environment variable for CDN support
2025-09-26 02:57:18 +08:00
Jim Seiwert
78a2f9e874 💄 style: Added AUTH_MICROSOFT_ENTRA_ID_BASE_URL routing (#9293)
Added AUTH_MICROSOFT_ENTRA_ID_BASE_URL routing
2025-09-22 01:05:58 +08:00
Arvin Xu
cee555a0f0 ♻️ refactor: improve db sql performance (#9283)
* improve sql

* improve db index

* improve db index

* improve db index
2025-09-16 19:33:35 +08:00
WangYK
5a4b0fd344 feat: support Vercel AI Gateway provider (#8883)
*  feat: support Vercel AI Gateway provider

* fix: add `vercelaigateway` to package.json.exports

* chore: 把 runtime 挪到 providers 目录下
2025-09-16 16:49:54 +08:00
Arvin Xu
c21c14e715 🐛 fix: fix azure ai runtime error (#9276)
* fix azure ai

* improve agent schema

* improve agent schema

* improve header size

* remove sentry

* remove sentry

* fix

* clean

* fix tests
2025-09-16 15:19:55 +08:00
Arvin Xu
b73d0972b2 ️ perf: fix search agent slow (#9261)
* try to fix search agent issue

* Update session.ts
2025-09-15 10:56:03 +08:00
Neko
9089e2683e 📝 docs: added docs for deploying production level Grafana stack (#9072)
* docs: added docs for deploying production level Grafana stack

* fix: use absolute path
2025-09-11 11:25:52 +08:00
Maple Gao
3eaeb6c531 📝 docs: consolidate image generation docs with server database setup (#9096)
♻️ refactor: consolidate image generation docs with server database setup

- Merge image-generation-setup content into work-with-server-side-database docs
- Remove duplicate image-generation-setup documentation files
- Add server-side database links to setup-development guides
- Add missing .env.development copy step to setup instructions
- Add .env.development to .gitignore for security

The setup script approach has been replaced by Docker Compose configuration
with .env.example.development file, eliminating documentation duplication
and providing a unified server-side development workflow.
2025-09-11 01:16:58 +08:00
YuTengjing
26a743f3bd feat: Seedream 4.0 (#9198) 2025-09-10 19:51:43 +08:00
Maple Gao
a66856dc83 🐛 fix: enhance NewAPI with environment variables and fix routers compatibility (#9110)
 feat: enhance NewAPI with environment variables and fix routers compatibility

- Add NEWAPI_API_KEY and NEWAPI_PROXY_URL environment variable support
- Update documentation for NewAPI configuration options
- Fix routers baseURL handling to prevent duplicate version paths
- Remove /v1 baseURL requirement to avoid SDK compatibility issues
- Auto-detect model capabilities based on provider detection
- Support dynamic routing to correct provider endpoints

This resolves URL duplication issues like /v1beta/v1beta/ and ensures
proper routing to Anthropic, Google, OpenAI, and XAI endpoints.
2025-09-06 11:30:12 +08:00
Asuka109
d1c5645517 🔨 chore: add docker compose to setup local services for development (#8608)
* 👷 build: add docker compose to setup local services for development

* 👷 build: setup dotenv-expand for all the npm scripts

* 🐛 fix: remove useless comments

* 📚 docs: add server-side database setup guide with i18n support

- Add comprehensive server-side database setup documentation
- Include step-by-step Docker service configuration
- Add Chinese localization for better developer experience
- Cover environment setup, database migration, and verification steps
2025-09-02 17:06:01 +08:00
Arvin Xu
2a5f8d712f ♻️ refactor: remove base path (#9015)
* clean

* remove

* fix

* move config to envs

* remove envs
2025-09-01 00:30:13 +08:00
Arvin Xu
0924d98f5e ♻️ refactor: remove webrtc sync feature flag (#9002)
* refactor to clean code

* clean yjs

* upgrade icons

* Update package.json

* fix tests

* fix tests

* fix tests
2025-08-31 01:28:44 +08:00
René Wang
17472aa7a5 👷 build: add group chat db schema (#8916)
* feat: merge database changes from group-chat feature

* fix

* fix

* fix

* fix tests

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-08-27 23:49:22 +08:00
YuTengjing
2eeab57c1e docs: update bfl doc cover image url (#8951) 2025-08-27 22:20:18 +08:00
YuTengjing
9a6657e52e 📝 docs(workflow): optimize documentation structure and development setup (#8934) 2025-08-26 18:21:22 +08:00