Go: add OceanBase /system/oceanbase/status endpoint with live health probe - #1
Open
kinjitakabe wants to merge 666 commits into
Open
Go: add OceanBase /system/oceanbase/status endpoint with live health probe#1kinjitakabe wants to merge 666 commits into
kinjitakabe wants to merge 666 commits into
Conversation
### What problem does this PR solve? Fix: - Use @ to avoid split by `_` in model_name. - Verify api_key when add instance. - Pop api_key in list intances response. - Remove useless index. - Sort providers, instances and models by name. - Get `is_tools` from llm_factories.json ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve? This PR aligns `POST /api/v1/system/tokens` in Go with the Python implementation. ### Type of change - Keep the token creation flow under the system API route. - Preserve the owner-tenant authorization check. - Generate and persist API tokens consistently with the current Go service flow. - Return the created token payload in the standard API response format. Co-authored-by: Jin Hai <haijin.chn@gmail.com>
## Summary - Harden `NewN1NModel` to avoid panics when `http.DefaultTransport` is a custom non-`*http.Transport` RoundTripper. - Fallback to a safe transport (`ProxyFromEnvironment`) while preserving existing pooling/timeout settings. - Add `n1n_test.go` with coverage for name/factory plus `TestN1NNewModelWithCustomDefaultTransport`. Co-authored-by: Cursor <cursoragent@cursor.com>
### What problem does this PR solve? mark mysql migrations as applied ### Type of change - [x] New Feature (non-breaking change which adds functionality)
…nses are not truncated (infiniflow#15380) ### What problem does this PR solve? Closes infiniflow#15379 Around 29 Go model providers in `internal/entity/models/` share an `http.Client` configured with `Timeout: 120 * time.Second`, and reuse that same client for `ChatStreamlyWithSender`. Go's `http.Client.Timeout` is a hard ceiling on the whole request that also covers reading the response body, so it behaves as a wall clock on streaming. Any streamed chat response that lasts longer than 120 seconds gets cut off in the middle with a timeout error. Long generations, reasoning model outputs, and slow or overloaded upstreams are the common victims. The providers that already behave correctly (`groq`, `mistral`, `voyage`, `anthropic`) set no client `Timeout` and instead wrap each request in a `context.WithTimeout`. This change converges the affected providers onto that same pattern. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
## What infiniflow#15240 implementation for PUT /api/v1/mcp/servers/:mcp_id ## Changes - Adds the Go implementation for `PUT /api/v1/mcp/servers/:mcp_id`. - Wires MCP service and handler into the Go server/router for the update route. - Preserves Python-style behavior for ownership checks, partial update fields, MCP type/name/URL validation, `headers`/`variables` normalization, and tool metadata scrubbing.
Feature: Add MiniMax M3
add the newanthropic and voyage models. Strip opus 4.7 and 4.8 of certain usnspported keys Co-authored-by: Idriss Sbaaoui <112825897+6ba3i@users.noreply.github.com>
### What problem does this PR solve? Fix: - Handle siliconflow and siliconflow_intl api_key ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
…iflow#15475) ### What problem does this PR solve? **Verified from PostMan** GET http://127.0.0.1:9384/api/v1/providers/gitee/connection ```json body: { "api_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", "region": "default" } resp: { "code": 0, "message": "success" } ``` GET http://127.0.0.1:9384/api/v1/providers/gitee/connection ```json body: { "api_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", "region": "deprecated" } resp: { "code": 0, "message": "success" } ``` GET http://127.0.0.1:9384/api/v1/providers/gitee/connection ```json body: { "api_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", "region": "china" } resp: { "code": 0, "message": "success" } ``` GET http://127.0.0.1:9384/api/v1/providers/lmstudio/connection ```json body: { "api_key": "", "region": "test" } resp: { "code": 0, "message": "success" } ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality)
…ow#15512) ### What problem does this PR solve? As title, all test are passed ### Type of change - [x] New Feature (non-breaking change which adds functionality)
## Summary - add CLI command `CHECK PROVIDER 'provider_name' REGION 'region_name' KEY 'api_key';` - route the command through CLI parser and command dispatcher - call `GET /api/v1/providers/:provider_name/connection` with `region` and `api_key` ## Testing - `go test ./internal/cli/...` - manually verified CLI command parsing and request flow
Fix: model provider orders
…hunks (infiniflow#15488) ## Problem When uploading `.md` files with `parser=naive` and `delimiter="\n"`, markdown headers (e.g., `## Quick Travel`) become separate chunks with very short content (16-18 characters). This causes retrieval issues: when the header is matched, the corresponding body text is not included in the chunk. ## Related Issues Closes infiniflow#15487 ## Checklist - [x] Code changes are minimal and focused - [x] Unit tests added (12/12 passed) - [x] No breaking changes
…w#15366) Fixes [infiniflow#15365](infiniflow#15365) — `get_document_image()` and document preview call `make_response(None)` when storage returns no bytes, causing HTTP 500.
### What problem does this PR solve? Closes infiniflow#15388. Chat completion routes did not reliably honor per-request generation settings: - `/api/v1/chat/completions` copied generation settings with a truthiness check, so valid zero values such as `temperature: 0`, `top_p: 0`, `frequency_penalty: 0`, `presence_penalty: 0`, and `max_tokens: 0` were dropped. - `/api/v1/openai/{chat_id}/chat/completions` did not forward standard generation settings into the request-specific dialog LLM settings before calling `async_chat`. This PR preserves explicitly supplied generation parameters, including zero values, and merges request-level overrides into existing dialog settings where appropriate. The supported generation parameter keys and merge behavior live in a shared REST API helper to keep both completion routes aligned. Validation: - `git diff --check` - `python3 -m py_compile api/apps/restful_apis/_generation_params.py api/apps/restful_apis/chat_api.py api/apps/restful_apis/openai_api.py test/testcases/test_http_api/test_session_management/test_session_sdk_routes_unit.py` - `uv run ruff check api/apps/restful_apis/_generation_params.py api/apps/restful_apis/chat_api.py api/apps/restful_apis/openai_api.py test/testcases/test_http_api/test_session_management/test_session_sdk_routes_unit.py` - `ZHIPU_AI_API_KEY=dummy uv run pytest test/testcases/test_http_api/test_session_management/test_session_sdk_routes_unit.py -q -k generation_params` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve? refine mysql migration version workflow ### Type of change - [x] Refactoring
…issue (infiniflow#15520) ### What problem does this PR solve? Fix: Model provider add verify and fixed form in modal not resetting issue ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
``` RAGFlow(user)> create provider 'gitee' instance 'intl' key 'api-token' url 'https://ai.gitee.com/v1' region 'intl'; SUCCESS ``` --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
…out llms in json (infiniflow#15550) ### What problem does this PR solve? As title. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
…w#15565) ### What problem does this PR solve? agent template smart_customer_service_specialist.json ### Type of change - [x] Refactoring
### What problem does this PR solve? remove old and add latest cohere models ### Type of change - [x] Refactoring - [x] Other (please describe): update models
…e. (infiniflow#15401) ### What problem does this PR solve? Fix: Switching pagesize on a chunk page did not reset the current page. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
Fix: no more @token_required
### What problem does this PR solve? 1. Add license announcement 2. Add sanity check on API config 3. Add base class: BaseModel 4. Add GetBaseURL ### Type of change - [x] Refactoring --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
…hensive test suite (infiniflow#15471) ## Summary Decomposes the monolithic `task_executor.py` (1945 lines) into a 6-layer architecture with clear separation of concerns. The refactored code is functionally equivalent to the original, verified through 400 passing tests and a production-vs-dry-run comparison framework. ## Architecture ``` entry (task_manager) └─ orchestration (task_handler) ├─ services (chunk_service, embedding_service, dataflow_service, raptor_service, post_processor) │ └─ utilities (chunk_builder, chunk_post_processor, embedding_utils) └─ infrastructure (task_context, recording_context, interceptor) ``` Key design decisions: - **TaskContext** — typed facade over raw task dict, injects rate limiters + callbacks via composition - **RecordingContext + Comparator** — enables side-by-side production vs dry-run execution for safe migration - **NullRecordingContext** — zero-allocation no-op for production, uses `__slots__` - **WriteOperationInterceptor** — FIFO replay of previous runs function returns for comparison mode ## Migration Strategy The original `handle_task()` in `task_executor.py` uses a 3-way switch via `TE_RUN_MODE`: - `TE_RUN_MODE=0` (default) → runs refactored code - `TE_RUN_MODE=1` → runs both original + refactored, compares all intermediate results - `TE_RUN_MODE=2` → runs original code (fallback) The comparison mode (`TE_RUN_MODE=1`) records ~40 intermediate values (chunks, vectors, token counts, func return values) from the production run and replays them during dry-run, then uses `ContextComparator` to report mismatches. ## Functional Equivalence Fixes All divergences between original and refactored code were identified and fixed: - Timeout decorators (handle/build_chunks/raptor/embedding) - NullRecordingContext leak in finally block causing RuntimeError - MinIO None-binary check with proper FileNotFoundError - Dataflow dispatch after embedding binding + init_kb - Memory task missing return after processing - RAPTOR checkpoint progress reporting - Tag cache (get_tags_from_cache/set_tags_to_cache) restoration - dataflow_id correction in _load_dsl - Language default Chinese, dead code guard removal - embed_chunks made async with proper thread_pool_exec - Full GraphRAG default configuration (10 parameters) - Hardcoded q_768_vec fallback removal in RAPTOR ## Test Changes - 20 new tests covering table parser manual mode, tag cache, embedding edge cases, RAPTOR checkpoint, dataflow_id correction, storage binary None, cancel cleanup, metadata=None boundary - Unified `make_task_context`/`make_task_dict` factories eliminated 10+ duplicated helpers - DataflowService tests migrated from internal method mocks to IO boundary mocks (real orchestration code executes) - Parametrized duplicate build_chunks post-processor tests - 7 raptor tests modernized to @pytest.mark.asyncio - Mock count per test reduced through boundary-level mocking strategy **Test count: 400 passing, 0 warnings, 0 skips** ## Files Changed | File | Change | |------|--------| | `rag/svr/task_executor.py` | +1 line (NullRecordingContext fix) | | `rag/svr/task_executor_refactor/task_handler.py` | Orchestration layer, 8 logic fixes | | `rag/svr/task_executor_refactor/chunk_service.py` | +timeout + None-check | | `rag/svr/task_executor_refactor/embedding_service.py` | sync→async rewrite | | `rag/svr/task_executor_refactor/dataflow_service.py` | dataflow_id fix + timeout | | `rag/svr/task_executor_refactor/raptor_service.py` | checkpoint fix + assert | | `rag/svr/task_executor_refactor/chunk_post_processor.py` | tag cache restore | | `rag/svr/task_executor_refactor/task_context.py` | language default fix | | `test/.../conftest.py` | +294 lines shared helpers | | `test/.../*.py` | 15 test files refactored, 20 new tests | --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
### What problem does this PR solve? Remove unused code. ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
…niflow#15536) ## Summary Fixes infiniflow#15534 — `update_document_name_only()` crashes with `AttributeError` when `File2Document` exists but the linked `File` row was deleted. `update_document_name_only()` in `document_api_service.py` called `FileService.get_by_id()` when a `File2Document` row existed, then accessed `file.id` without checking the lookup result. An orphan `File2Document` link (file deleted, mapping left behind) caused document rename via `PATCH /api/v1/datasets/{dataset_id}/documents/{document_id}` to return HTTP 500. This PR mirrors guards used in `file2document_api.py` and `file_api_service.py`: skip the optional file rename when the file is missing, and still update the document record and search index. ## Changes - `api/apps/services/document_api_service.py` — check `e and file` before `FileService.update_by_id` - `test/unit_test/api/apps/services/test_update_document_name_only.py` — regression tests (orphan link + happy path) ## Test plan - [x] `pytest test/unit_test/api/apps/services/test_update_document_name_only.py -v` - [ ] Manual: PATCH document `name` when `File2Document` points to a non-existent `file_id` → 200, document/index renamed, no 500
…iflow#15941) ### What problem does this PR solve? - Update version tags in README files (including translations) from v0.25.6 to v0.26.0 - Modify Docker image references and documentation to reflect new version - Update version badges and image descriptions - Maintain consistency across all language variants of README files ### Type of change - [x] Documentation Update
infiniflow#15940) ### What problem does this PR solve? As title ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [x] Refactoring
…r Go model drivers (infiniflow#15821) ### What problem does this PR solve? The Go model-driver layer () has ~38,700 lines across 109 files. Roughly 74% of that is boilerplate duplicated into every driver: identical HTTP client setup, the same 65-line SSE scanner loop, and 10-11 one-line "not supported" stub methods per driver. Any fix must be manually propagated to every file. Closes infiniflow#15820. This PR establishes the three shared utility files that form the foundation for incremental driver migration: --- ### Type of change - [x] New Feature (non-breaking change which adds functionality) - [x] Refactoring --------- Co-authored-by: Haruko386 <tryeverypossible@163.com>
…iniflow#15678) ## Summary Improves the responsiveness of the User Settings layout by converting the left navigation sidebar into a compact icon-only rail on mobile devices. Previously, the sidebar retained its full desktop width on narrow viewports, reducing the available space for settings content and making pages such as **Data Sources** difficult to use on phones and smaller tablets. With this change: - Desktop layouts retain the existing full sidebar experience - Mobile layouts (<768px) display a compact 64px icon-only navigation rail - Main content receives significantly more horizontal space - Navigation and logout actions remain fully accessible on mobile ## Type of Change - [x] Bug fix ## Screenshots | Before | After | |---------|---------| | <img width="557" height="760" alt="image" src="https://github.com/user-attachments/assets/fb0d6a90-2d57-464c-90c6-9097418c7c13" /> | <img width="557" height="760" alt="image" src="https://github.com/user-attachments/assets/8db36d0f-7070-41e1-b7b2-0fe9d0cceefb" /> | ## What Changed ### Mobile Sidebar Optimization - Added responsive mobile behavior using `useIsMobile()` - Displays avatar and navigation icons only on mobile - Hides user email, navigation labels, version information, theme switcher, and logout text on smaller screens - Preserves navigation and logout functionality through icon actions ### Layout Improvements - Updated settings page grid layout to use fixed sidebar widths: - Mobile: `4rem` (64px) - Desktop: `303px` - Uses `minmax(0, 1fr)` for the content panel to prevent overflow and allow proper shrinking - Prevents sidebar width from expanding based on content ## Impact - Improves usability of User Settings pages on phones and small tablets - Increases available space for settings content - Reduces horizontal crowding and overflow issues - Maintains the existing desktop experience ## Test Plan ### Desktop (≥768px) - Verify the full sidebar is displayed - Confirm email, navigation labels, version information, theme switch, and logout text are visible - Ensure all navigation items function correctly ### Mobile (<768px) - Verify the sidebar collapses to a 64px icon-only rail - Confirm main content remains readable without horizontal crowding - Verify navigation icons route correctly: - Data Sources - Model Providers - MCP - Team - Profile - API - Confirm logout works from the icon button ### Verification - Run `npm run build` - Hard refresh when testing production or Docker deployments - Verify responsive behavior using browser device emulation
… embedding providers (infiniflow#15424) ### Summary Closes infiniflow#15423 `rag/llm/embedding_model.py` hosts about 40 embedding providers that shared several defects affecting indexing reliability, cost accounting, and error visibility. This PR fixes four concrete bugs. **Masked, inconsistent errors (27 sites).** Nearly every provider ran `log_exception(_e, res)` followed by `raise Exception(f"Error: {res}")`. Because `log_exception` always raises, the second line was dead code, and the surfaced exception varied with whether the SDK response exposed a `.text` attribute. Every failure path now raises a single `EmbeddingError` that includes the underlying response detail, so the cause of a failed embedding is consistent and visible. **Fabricated token counts.** `LocalAIEmbed` returned a hardcoded `1024` and `OllamaEmbed` added `128` per text. These values feed `used_tokens` and therefore billing and usage tracking. Both now report the real count from the API (Ollama `prompt_eval_count`, LocalAI `usage`) and fall back to a local token count only when the server omits it. **Truncation overshoot.** The `8196` limit used by Mistral and Bedrock exceeded the standard `8192` ceiling and could push boundary sized inputs past the model limit. Limits are corrected to `8192` and made intentional per provider, and providers that rely on server side truncation now request it explicitly (Ollama `truncate=True`, Cohere `truncate="END"`). **Missing batching on Zhipu and Ollama.** Both issued one request per text. They now batch like the other OpenAI compatible providers, turning N round trips into `ceil(N / batch_size)`. Batched results are realigned by response `index` so a chunk always keeps its own vector. A shared `Base._batched_encode` helper owns the batch loop, optional truncation, result accumulation, and the single error path. It is the mechanism that lets these fixes live in one place instead of across 27 duplicated sites. The public `encode()` and `encode_queries()` contract stays the same, so existing callers are unaffected. Tests covering all four fixes are added under `test/unit_test/rag/llm/test_embedding_model.py`. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
## Summary Fixes infiniflow#15695. The Python GraphRAG path already accumulates similarity when several N-hop paths produce the same edge, but PageRank was overwritten by the last path. That makes ranking depend on path order for repeated edges. This keeps the strongest PageRank seen for a repeated edge in the Python implementation: - `rag/graphrag/search.py` The similarity score still accumulates exactly as before. ## To verify - `python -m py_compile rag\graphrag\search.py` - `git diff --check` - `git diff --stat upstream/main` -> only `rag/graphrag/search.py` I originally included the Go implementation too, but removed it after maintainer feedback because the Go version is still under development and not released yet.
…w#15679) ## Summary This PR passes `session_id` into Langfuse trace observations so multi-turn chat messages can be grouped under the same session in Langfuse. Changes include: - Propagate `session_id` from chat/session APIs into `dialog_service.async_chat`. - Pass `session_id` into Langfuse `start_observation(...)`. - Share Langfuse `trace_context` with chat, embedding, rerank, and TTS model bundles where applicable. - Add unit coverage to verify Langfuse observations receive `session_id`. - Update affected test stubs for the new optional Langfuse context arguments. ## Related Issue Closes: infiniflow#15636 ## Change Type - [x] Feature - [x] Bug fix - [x] Test - [ ] Refactor - [ ] Documentation - [ ] Breaking change ## Real Behavior Proof Before this change: - Langfuse observations were created without `session_id`. - Multi-turn chat traces could not be grouped by session in Langfuse. After this change: - Chat/session flows pass `session_id` into `async_chat`. - Langfuse observations include `session_id`. - Related model bundles receive shared trace context and session metadata. Validation result: ```bash uv run python -m py_compile \ api/db/services/tenant_llm_service.py \ api/db/services/llm_service.py \ api/db/services/dialog_service.py \ api/db/services/conversation_service.py \ api/apps/restful_apis/chat_api.py \ test/unit_test/api/db/services/test_dialog_service_final_answer.py \ test/unit_test/api/db/services/test_dialog_service_use_sql_source_columns.py ``` Passed. ```bash uv run pytest \ test/unit_test/api/db/services/test_dialog_service_final_answer.py \ test/unit_test/api/db/services/test_dialog_service_use_sql_source_columns.py -q ``` Result: ```text 11 passed in 16.89s ``` ```bash git diff --check ``` Passed. ## Checklist - [x] Analyzed the issue requirement. - [x] Checked existing Langfuse trace integration. - [x] Implemented only the requested session grouping behavior. - [x] Added/updated unit tests. - [x] Ran focused tests successfully. - [x] Ran Python compile validation. - [x] Ran whitespace diff validation.
…nfiniflow#15694) ### What problem does this PR solve? The Profile **Name** field currently lacks application-level validation and allows users to save excessively long names and unsupported special characters. While the database enforces a maximum length of 100 characters, neither the frontend nor backend validates nickname format before persistence. This can result in inconsistent user data, poor user experience, and UI layout issues when long names wrap across multiple lines. This PR introduces consistent frontend and backend validation for profile names, enforces length and character constraints, provides clear validation feedback, and prevents invalid values from being saved. Fixes infiniflow#15693 ### Type of change * [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve? As title ### Type of change - [x] Other (please describe): add models
…commercial models and provider aliases (infiniflow#15929) ### What problem does this PR solve? - Add Z.ai model definitions to `conf/all_models.json`. - Add missing Qwen / DashScope commercial API-only models, including: - Qwen3.7 / Qwen3.6 / Qwen3.5 Max, Plus, Flash families - Qwen Coder and Math commercial models - Qwen VL, OCR, Omni, ASR, TTS, translation, image generation, and image editing models - Add verified provider-specific aliases for supported Qwen models: - DashScope / Alibaba Cloud Model Studio model IDs - OpenRouter `qwen/...` aliases - Amazon Bedrock `qwen.qwen3-*` model IDs - Add `thinking` metadata for Qwen models that officially support thinking mode. - Remove aliases that exactly duplicate their own canonical `name`.
### What problem does this PR solve? ``` RAGFlow(admin)> mq publish 'msg2'; SUCCESS RAGFlow(admin)> mq publish 'msg3'; SUCCESS RAGFlow(admin)> mq list; +---------+---------------+ | message | subject | +---------+---------------+ | msg1 | tasks.RAGFLOW | | msg2 | tasks.RAGFLOW | | msg3 | tasks.RAGFLOW | +---------+---------------+ RAGFlow(admin)> mq pull 2; +---------+---------------+ | message | subject | +---------+---------------+ | msg1 | tasks.RAGFLOW | | msg2 | tasks.RAGFLOW | +---------+---------------+ RAGFlow(admin)> mq pull noack; +---------+---------------+ | message | subject | +---------+---------------+ | abc | tasks.RAGFLOW | +---------+---------------+ RAGFlow(admin)> mq show +-------------------+----------------+--------+---------------+---------------+-------------------+---------------+ | ack_pending_count | consumer_count | memory | message_count | pending_count | redelivered_count | waiting_count | +-------------------+----------------+--------+---------------+---------------+-------------------+---------------+ | 2 | 1 | 0 | 2 | 0 | 1 | 0 | +-------------------+----------------+--------+---------------+---------------+-------------------+---------------+ RAGFlow(admin)> list ingestors; +--------------+-------------------------------------------+--------+ | host | name | status | +--------------+-------------------------------------------+--------+ | 192.168.1.38 | ingestor-8f0e4bd5650a4ac58b0151969fbf6935 | alive | +--------------+-------------------------------------------+--------+ RAGFlow(admin)> list ingestion tasks; +----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+ | document_id | id | status | step | user | user_id | +----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+ | ffe64fae423411f1a2d938a74640adcc | 90d3d0f6528941c1ac8eb0360effccc4 | COMPLETED | 5 | aaa@aaa.com | 2ba4881420fa11f19e9c38a74640adcc | +----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+ RAGFlow(admin)> remove ingestion tasks '90d3d0f6528941c1ac8eb0360effccc4'; +---------+----------------------------------+ | delete | task_id | +---------+----------------------------------+ | success | 90d3d0f6528941c1ac8eb0360effccc4 | +---------+----------------------------------+ RAGFlow(admin)> stop ingestion tasks 'e89e20d9a25848a1b79bd9345ddbfe1d'; +----------+----------------------------------+ | status | task_id | +----------+----------------------------------+ | STOPPING | e89e20d9a25848a1b79bd9345ddbfe1d | +----------+----------------------------------+ # Publish a message RAGFlow(admin)> mq publish 'cdd'; SUCCESS # List current tasks in the message queue RAGFlow(admin)> mq list +----------------------------------+---------------+ | message | subject | +----------------------------------+---------------+ | 7ce392a3c1624cd2be4b5276e8825059 | tasks.RAGFLOW | +----------------------------------+---------------+ # Consume a task from the message queue RAGFlow(admin)> mq pull +------+-----+----------------+ | ack | id | type | +------+-----+----------------+ | true | cdd | ingestion_test | +------+-----+----------------+ # User mode # List ingestion tasks, followed by dataset id RAGFlow(user)> list ingestion tasks from '0abe79f9423311f1ad8d38a74640adcc'; +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | 2026-05-30T20:21:06+08:00 | 1780143666289 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | 8d758cd14a8b4ba8ab505003fb52017d | | COMPLETED | 2026-05-30T20:21:26+08:00 | 1780143686431 | 2ba4881420fa11f19e9c38a74640adcc | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ RAGFlow(user)> list ingestion tasks; +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | 2026-06-02T19:02:31+08:00 | 1780398151417 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | e89e20d9a25848a1b79bd9345ddbfe1d | | COMPLETED | 2026-06-02T19:02:52+08:00 | 1780398172208 | 2ba4881420fa11f19e9c38a74640adcc | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ # Create an ingestion task # First argument is document id, second argument is dataset id RAGFlow(user)> start ingestion 'ffe64fae423411f1a2d938a74640adcc' from '0abe79f9423311f1ad8d38a74640adcc'; +----------------------------------+-------------------------------------------+ | document_id | result | +----------------------------------+-------------------------------------------+ | ffe64fae423411f1a2d938a74640adcc | task_id: 8d758cd14a8b4ba8ab505003fb52017d | +----------------------------------+-------------------------------------------+ # Pause an ingestion task, first argument is ingestion id RAGFlow(user)> stop ingestion '8d758cd14a8b4ba8ab505003fb52017d'; +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ | 2026-05-30T20:21:06+08:00 | 1780143666289 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | 8d758cd14a8b4ba8ab505003fb52017d | | COMPLETED | 2026-05-30T20:21:26+08:00 | 1780143686431 | 2ba4881420fa11f19e9c38a74640adcc | +---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+ # Delete an ingestion task RAGFlow(api/default)> remove ingestion tasks 'f366450a27d54677aec1c7090add30f0'; +---------+----------------------------------+ | remove | task_id | +---------+----------------------------------+ | success | f366450a27d54677aec1c7090add30f0 | +---------+----------------------------------+ ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? Refs infiniflow#15743 Some Go API handlers return raw `err.Error()` strings in `CodeServerError` responses. Those errors can include internal backend details such as database, storage, search engine, or host information. This PR adds a small shared `jsonInternalError` helper for handler-level internal failures. The helper logs the raw error server-side with request method/path context, then returns the existing generic `common.CodeServerError.Message()` to API clients. This first slice migrates the existing `jsonError(c, common.CodeServerError, err.Error())` production call sites in agent, dataset graph, file, and system handlers. It intentionally does not close the full issue because direct `c.JSON` error responses in other handlers remain for follow-up PRs. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): ### Tests - `/root/go/bin/go test ./internal/handler -count=1` --------- Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
…iflow#15948) ### What problem does this PR solve? Fix: chat/agent -- Default avatar is not displaying correctly. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
PR infiniflow#15938 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? Make skill space independent of Python filesystem API ### Type of change - [x] Refactoring
…nfiniflow#15850) ### What problem does this PR solve? infiniflow#15844 Adds a **Chat channels** capability so a RAGFlow assistant (Dialog) can be exposed as a bot on external messaging platforms (Feishu/Lark, Discord, Telegram, Slack, WeCom, LINE, etc.). An admin configures a bot in the UI, connects it to an assistant, and inbound messages are answered from that assistant's knowledge base — replies are delivered back on the channel. **Feishu/Lark is implemented and tested end-to-end.** Discord, Telegram, LINE, and WeCom are scaffolded against the same interface; the remaining listed channels are tracked as follow-ups. ### Design **Backend** - New `chat_channel` table (`tenant_id`, `name`, `channel`, `config` JSON holding `{credential: {...}}`, `dialog_id`, `status`) + `ChatChannelService` and RESTful CRUD under `/api/v1/chat_channels`. - Channel framework under `api/channels/`: a `core` registry + per-channel packages that self-register a builder and implement a common `Channel` interface (`start`/`stop`/`send` + inbound normalization) over `IncomingMessage`/`OutgoingMessage`. - Embedded **reconcile loop** in `ragflow_server` (`api/channels/bootstrap.py`): loads enabled bots, and starts/stops/restarts them as rows change (no server restart needed). Inbound messages run the connected dialog via the non-streaming completion path, keeping per-end-user conversation history. - Missing optional channel SDKs degrade gracefully (channel skipped with a warning; others unaffected). Channel-level errors are logged, not crashed. - Feishu's WebSocket client runs in a dedicated thread with its own event loop to avoid cross-loop/contextvars conflicts with the channel runtime. **Frontend** - **Settings → Chat channels** panel: available-channels grid + configured-bots list with add/edit/delete and a **Connect assistant** popup that binds a bot to a dialog. - Brand icons via simple-icons / reused shared data-source assets, with colored fallbacks for brands not available. - Route, sidebar entry, i18n (en/zh), and a top-nav segment-boundary fix so the settings page no longer highlights the Chat tab. ### Type of change - [x] New Feature (non-breaking change which adds functionality) ### Notes - DB: new `chat_channel` table is auto-created; `chat_channel.dialog_id` is also covered by a `migrate_db` `alter_db_add_column` for existing installs. - Channel SDKs (`lark-oapi`, `discord.py`, `python-telegram-bot`, `line-bot-sdk`, `wechatpy`, `aiohttp`) added to dependencies. - Screenshots / per-channel credential docs to follow. <img width="1338" height="1290" alt="Image" src="https://github.com/user-attachments/assets/042cb2f9-0dad-4e6a-bcf7-43ced4bbd704" /> <img width="1344" height="738" alt="Image" src="https://github.com/user-attachments/assets/373cd08e-ec40-4c67-9c51-4d948b1ba617" /> <img width="672" height="887" alt="Image" src="https://github.com/user-attachments/assets/5a34953f-a9a3-4c1e-869e-5eff0dc64c84" /> ---------
…flow#15969) ### What problem does this PR solve? As title ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] Documentation Update
infiniflow#15970) ### What problem does this PR solve? As title ### Type of change - [x] Other (please describe): add models
### What problem does this PR solve? As title. ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? Fixes infiniflow#15840. The Go HTTP server sets `WriteTimeout: 120s`, which also applies to long-lived SSE responses. Existing Go streaming handlers did not clear the per-response write deadline, so streams that run longer than the server timeout can be terminated mid-response. This PR adds a small handler helper that clears the response write deadline for SSE requests and calls it only in existing Go streaming branches: - conversation completion streaming - provider chat streaming - provider transcription streaming - provider speech streaming The global server `WriteTimeout` remains unchanged for non-streaming requests. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ### Test plan - `/root/go/bin/go test ./internal/handler -run TestDisableWriteDeadlineForSSEAllowsLongLivedStream -count=1` - `/root/go/bin/go test ./internal/handler -count=1`
…ints (infiniflow#15952) Ports the agent canvas subsystem from Python to Go. ## What's included ### Canvas Engine (Phase 0/1) - State engine, scheduler, variable resolver, Redis checkpoint store, cancel protocol - **209 tests** across canvas / component / io packages ### 22 Components (P0–P4) | Tier | Components | |---|---| | P0 T1+T2+T3 | LLM, Agent, ExitLoop, Switch, Categorize, Begin, Message, Invoke | | P1 T3 | VariableAggregator, VariableAssigner, StringTransform, ListOperations, DataOperations | | P2 T3 | Iteration, IterationItem, Loop, LoopItem | | P3 T3 | UserFillUp, Fillup | | P4 T5 | Browser, ExcelProcessor, DocsGenerator | ### DSL v2 Schema (Phase 2.5) - Typed v2 in-memory model with v1-to-v2 auto-detect converter - v1 legacy field stripping per plan §2.11.7 ### HTTP Endpoints & Bug Fixes (Plans PR1–PR3) - **DELETE SQL bug fix**: gorm v2 `Where("id = ?", id).Delete(...)` pattern - **CreateAgent validation**: title/DSL required, duplicate check, 103 envelope - **13 new endpoints**: templates, prompts, tags, sessions CRUD, chat/completions (SSE + non-stream stubs), rerun, test_db_connection, logs, webhook/logs - **756 Go unit tests** (745 → 756, +18) - **17 → 0 Python integration test failures** (test_agents.py + test_session_management/) ### Tools 21 eino tools: HTTPHelper, search tools, financial/data tools, mandatory stubs ### Infrastructure OTel observability, NATS message queue, DeepDoc gRPC client, SSRF guards, IDOR mitigation
### What problem does this PR solve? Now we can parse 'pptx', 'ppt', 'doc', 'xls', 'xlsx' ``` RAGFlow(api/default)> parse file 'test.pptx'; Parsing PPTX file: test.pptx Document format: pptx ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: Jin Hai <haijin.chn@gmail.com>
## Summary Adds missing French (`fr.ts`) translations that were present in `en.ts` but absent in the French locale file. ### LLM provider settings - `openaiBaseUrlPlaceholder`, `anthropicBaseUrlPlaceholder`, `siliconflowBaseUrlPlaceholder` - `groupId`, `providerOrder` ### PaddleOCR (settings section) - Validation messages: `paddleocrApiUrlMessage`, `paddleocrAccessTokenMessage`, `paddleocrAlgorithmMessage` - Labels/placeholders duplicated in the settings context ### MinerU configuration - `mineruApiserver*`, `mineruOutputDir*`, `mineruBackend*`, `mineruServerUrl*`, `mineruDeleteOutput*`, `mineruSelectBackend` ### OpenDataLoader - `opendataloaderApiserver*` (3 keys) ### Model management UI - `listModels`, `allModels`, `listModelsSearchPlaceholder`, `listModelsEmpty`, `listModelsLoading` - `selectModelBeforeVerify`, `addCustomModel`, `addCustomModelTitle` - `modelMaxTokens`, `modelFeatures`, `modelFeatureToolCall`, `modelFeatureFunctionCall` - `modelNameRequired`, `modelNameDuplicate`, `modelTypeRequired`, `modelMaxTokensMessage`, `modelMaxTokensMinMessage` ### Data source connector tips - **Microsoft Teams**: `teamsTenantIdTip` - **Slack**: `slackBotTokenTip`, `slackChannelsTip` - **SharePoint**: `sharepointSiteUrlTip` - **OneDrive**: `onedriveTenantIdTip`, `onedriveClientIdTip`, `onedriveClientSecretTip`, `onedriveFolderPathTip` - **Outlook**: `outlookTenantIdTip`, `outlookClientIdTip`, `outlookClientSecretTip`, `outlookFolderTip`, `outlookUserIdsTip` - **Salesforce**: `salesforceInstanceUrlTip`, `salesforceClientIdTip`, `salesforceClientSecretTip`, `salesforceObjectsTip`, `salesforceApiVersionTip` - **Azure Blob Storage**: `azureBlobAuthModeTip`, `azureBlobAccountNameTip`, `azureBlobAccountKeyTip`, `azureBlobConnectionStringTip`, `azureBlobContainerUrlTip`, `azureBlobSasTokenTip`, `azureBlobContainerNameTip`, `azureBlobPrefixTip` ## Test plan - [ ] Verify the French locale displays correctly in the RAGFlow UI with language set to French - [ ] Check that all new keys render without `[missing translation]` placeholders - [ ] TypeScript build passes (`npx tsc --noEmit` — no errors in `fr.ts`) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
### What problem does this PR solve? Add parser config ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Fix last login time
### What problem does this PR solve? Not not only model_name@instance_name@provider_name is acceptable, but also model_id is acceptable. ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Port the Python /system/oceanbase/status endpoint to the Go server. Adds a database/sql MySQL-wire probe (internal/service/oceanbase_probe.go) that reports OceanBase health (uri, version_comment) and performance metrics (latency, active/max connections, slow queries, storage) — mirroring Python OBConnection.health() + get_performance_metrics(). - handler.OceanbaseStatus: auth-gated handler returning the Python-parity envelope (HTTP 200 with code 0 on success; code 500 "OceanBase is not in use." when unconfigured). - service.GetOceanbaseStatus: runs the probe, gated on the `oceanbase` config section being present (rather than DOC_ENGINE==oceanbase) so it works while ES/Infinity remain the doc engine. - router: register GET /api/v1/system/oceanbase/status. Each metric query is isolated so a missing OB-specific table/variable falls back gracefully instead of failing the whole probe.
kinjitakabe
force-pushed
the
go-oceanbase-status
branch
from
June 15, 2026 11:53
900c85f to
6257532
Compare
…ow#16038 review) The error envelope set top-level message "success" alongside code 500, which is misleading. Set it to "Failed to get OceanBase status" (CodeRabbit review). The meaningful Python parity (HTTP 200, code 500, error nested in data) is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go: add OceanBase /system/oceanbase/status endpoint with live health probe
What
Ports the Python
GET /api/v1/system/oceanbase/statusendpoint to the Go server. The endpoint connects to OceanBase over the MySQL wire protocol and reports live health + performance metrics.Changes
internal/service/oceanbase_probe.go(new) — adatabase/sqlMySQL-wire probe gathering health (uri,version_comment) and performance metrics (latency_ms,active_connections,max_connections,slow_queries,storage_used/total). Mirrors PythonOBConnection.health()+get_performance_metrics(). Each metric query is isolated so a missing OB-specific table/variable degrades gracefully instead of failing the whole probe.internal/service/system.go—GetOceanbaseStatus()runs the probe, gated on theoceanbaseconfig section being present (rather thanDOC_ENGINE==oceanbase), so health is observable while ES/Infinity remain the active doc engine. No config → the Python-parity"OceanBase is not in use."path.internal/handler/system.go—OceanbaseStatushandler returning the Python-parity envelope: HTTP 200 /code 0on success, HTTP 200 /code 500withdata.status="error"when unconfigured.internal/router/router.go— registersGET /api/v1/system/oceanbase/statusin the authenticatedsystemgroup.Verification
Deployed the full Go stack locally (ES + MySQL + Redis + MinIO +
admin_server+ragflow_server) against a running OceanBase (SeekDB)4.3.5.3instance, logged in through the web UI, and hit the endpoint from the live session:{ "code": 0, "data": { "status": "alive", "message": { "health": { "uri": "localhost:2881", "version_comment": "OceanBase 4.3.5.3 seekdb (r1.3.0.0)" }, "performance": { "connection": "connected", "latency_ms": 9.759, "active_connections": 2, "max_connections": "2147483647", "slow_queries": 0, "storage_used": "N/A", "storage_total": "N/A" } } }, "message": "success" }Live response rendered from the logged-in RAGFlow browser session → Go backend → OceanBase:
Also verified: unauthenticated requests return
401; missing config returns thecode 500"not in use" envelope.Notes
conf/service_conf.yaml,web/package-lock.json) are intentionally excluded from this PR.storage_*reportsN/Aagainst SeekDB (empty doc DB + nooceanbase.__all_disk_stat); full OceanBase populates these — the graceful fallback matches the Python reference.