| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
✨Feat:Integrate openjiuwen's intelligent agent evaluation function close#3188 (#3356) * ✨Feat:add prompt optimization * 🐛Bugfix: dockerbuild failed when running pipefail in python3_11 * 🔨Optimize: Optimize prompt optimization display page and interaction methods * ✨Feat:add agent evaluator * 🐛Bugfix: fix fronted and report download * 🐛 Bugfix: Add xlrd dependency and improve openjiuwen SDK adapter to handle circular imports more effectively. Update import paths in frontend components for consistency. * ♻️Refactor: frontend style refact * 🔨Rename evaluator sql * ♻️ Refactor: Optimize the frontend page for agent evaluation * ♻️Refactor: update modal mask properties for consistency * ♻️ Refactor: Simplify locale handling and clean up imports in OAuthCompletePage and UserManageComp * ✨ Feature: Enhance agent evaluation with Chinese output directive and new database migrations * 🔧 Update: Change button variant from "outline" to "outlined" in EvaluationConfigCard and EvaluationReportCard components; enhance datetime handling in test_client.py to ensure correct timezone representation. * 🧪Test: Add unit tests for the jiuwen_sdk_adapter to verify module-level behavior and side effects. * 🔧 Update: Refactor the mock invocation in test_jiuwen_sdk_adapter to use an async function for better compatibility with asynchronous tests. * 🧪 Test: Add comprehensive unit tests for evaluation set functionality, including CRUD operations and Excel parsing, to ensure robust behavior and error handling. * 🧪 Test: Add extensive unit tests for Jiuwen SDK adapter and evaluation services, covering lazy imports, log envelope parsing, and case validation to enhance error handling and ensure robust functionality. * 🔧 Update: Consolidate judge_model_id addition into agent_evaluation_t migration, removing the separate migration file for improved installation simplicity and ensuring idempotency in existing environments. * 🔧 Update: Introduce a consolidated migration file for agent evaluation, combining previous separate migrations into a single idempotent script for improved installation simplicity and clarity. This includes the addition of evaluation tables and the pass_status column, ensuring all necessary structures are created in one step. | 2 个月前 | |
🐛 Bugfix: Added a configuration option to control the parallel_executor timeout. (#4021) | 4 小时前 | |
0930需求-feat: Nexent规格表- 增加租户知识库上限 + 知识库单文件大小上限 (#3730) * feat: enforce knowledge base resource limits * test: cover knowledge resource limit branches * fix: align knowledge resource limits with latest develop * config: expose knowledge resource limits via environment * test: improve knowledge limit patch coverage | 4 小时前 | |
fix(memory): 保留并热加载记忆插件 (#3890) * fix(memory): preserve and hot-reload container plugins * test(memory): cover plugin discovery edge cases | 19 天前 | |
bugfix:support model reasoning effort configuration (#3953) * bugfix:支持思考挡位配置 * bugfix: support model reasoning effort configuration * test: improve reasoning configuration coverage * test: complete reasoning coverage * fix: resolve CI quality gate failures * test: complete coverage for gate branches * bugfix: support configurable model reasoning effort * test: complete reasoning coverage * test: cover reasoning override branch * bugfix: support model reasoning effort settings * bugfix: complete reasoning capability matching * test: align reasoning capability assertions * test: close reasoning coverage gaps --------- Co-authored-by: hzw <hzw@qq.com> | 5 天前 | |
0930需求-feat: Nexent规格表- 增加租户知识库上限 + 知识库单文件大小上限 (#3730) * feat: enforce knowledge base resource limits * test: cover knowledge resource limit branches * fix: align knowledge resource limits with latest develop * config: expose knowledge resource limits via environment * test: improve knowledge limit patch coverage | 4 小时前 | |
🐛 Fix:In-Flight Knowledge-File and Knowledge-Base Deletion (#3842) * fix: coordinate in-flight knowledge file deletion * test: cover document deletion coordination * test: reduce coverage test duplication * fix: guard knowledge base deletion during ingestion * fix: finish knowledge-base deletion cleanup * fix: adapt knowledge-base deletion guard to management services * ci: exclude test fixtures from duplication gate * ci: document test fixture duplication exclusion * fix: preserve document deletion response messages * test: cover deletion response and cancellation branches * fix: propagate knowledge-base deletion errors * chore: remove unrelated Sonar config changes * chore: align Sonar config with develop | 20 天前 | |
0930需求-feat: Nexent规格表- 增加租户知识库上限 + 知识库单文件大小上限 (#3730) * feat: enforce knowledge base resource limits * test: cover knowledge resource limit branches * fix: align knowledge resource limits with latest develop * config: expose knowledge resource limits via environment * test: improve knowledge limit patch coverage | 4 小时前 | |
🐛 Fix(evaluation): remove broken file upload from case generation, support AIDP knowledge bases (#4012) * 🐛 Fix(evaluation): remove broken file upload from case generation, support AIDP knowledge bases Problem: - The generate-cases dialog sent FormData with an explicit Content-Type: application/json header, so every file upload failed (backend parsed the multipart bytes as JSON -> 500), and only a generic message was shown because the frontend read d?.detail while the backend returns {code, message, details}. - The KB selector and retrieval pipeline were ES-only: AIDP knowledge bases (ENABLE_AIDP_KNOWLEDGE=true) never appear in /api/indices and cannot be searched by the ES script_score path. Fix: - Remove the reference-document upload entirely (frontend UI, docx parsing, multipart branch, prompt template references); users attach documents through knowledge bases instead. The endpoint is now typed JSON-only. - Branch KB resolution and retrieval on ENABLE_AIDP_KNOWLEDGE: AIDP mode lists kds_id-keyed KBs from /aidp-mgmt (permission-filtered via resolve_current_aidp_access) and searches through the AIDP FusionSearch API (new fusion_search_impl shared helper), reusing the existing query planning and prompt assembly unchanged. - Fix the dead else-branch in _resolve_kb_info (ValueError now caught, unknown KBs skipped instead of failing the whole run). - Show the backend error message instead of the generic fallback. Verification: - pytest: test_evaluation_set_app 53 passed, test_evaluation_set_service 110 passed (12 new AIDP cases), agent_evaluation/delete/db suites green. - tsc --noEmit clean; ruff: zero new findings vs develop baseline. * 🐛 Fix(evaluation): address review findings on AIDP case-generation changes - Degrade gracefully when the AIDP KB catalog is unreachable (empty KB context + warning) instead of failing the whole generation run, matching the ES branch's tolerance. - Resolve AIDP display names through to the prompt fallback so raw kds_ids never surface in a prompt. - Report KB list load failures to the user in the case-generation dialog instead of silently showing an empty dropdown, and page through the AIDP KB list so KBs beyond the first 100 stay selectable. - Move consts.const imports to module level (no lazy-import benefit for a leaf config module); drop redundant score clamping, top_k re-slicing and the misused AIDP_CONFIG_INVALID guards. - const for the single fetch assignment; new i18n key genKbLoadFailed. Verification: pytest service 112 / app 53 passed; tsc --noEmit clean; ruff zero new findings vs develop baseline; prettier clean. * 🐛 Fix(evaluation): drop leftover uploaded-document mention in zh case-generation prompt The zh USER_PROMPT_INSTRUCTION still referenced 上传文档 after the upload removal; the en template was already updated. Prompt templates are read from disk per run, no service restart needed for deployments, though this branch's stack will pick it up on the next test request. * 🐛 Test(evaluation): cover fusion_search_impl and remaining AIDP branches for patch coverage - New test file for ext_components.aidp.services.aidp_service.fusion_search_impl (wire mapping, payload, response parsing, HTTP/auth/connection error translation) with a stubbed HTTP client and real imports — no sys.modules stubs, so it cannot pollute sibling test modules. - Cover _build_aidp_kb_descriptions, the AIDP early-return of _format_kb_name, and the remaining _do_kb_search AIDP arms (no-queries / no-results) that Codecov flagged as missing lines. Verification: pytest fusion 6 / service 118 / app 53 passed standalone. | 9 小时前 | |
Xyq/refactor card (#4014) * refactor(resource): unify repository resource cards Use the shared resource grid and card shell for Agent, MCP, and Skill repository listings while preserving their existing search, filtering, pagination, and actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): share resource create cards Route Agent, MCP, and Skill create-card entry points through the shared CreateResourceCard and use the shared grid for Agent and Skill mine lists. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): share mine resource card shells Apply the shared ResourceCard shell to Agent, MCP, and Skill mine-resource cards while retaining their existing content and actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): align public repository card actions Use the shared card's stacked footer layout for Agent, MCP, and Skill repository listings so metadata and actions remain consistent across resource types. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): split tab content components Move repository, my-agent, and review-center tab content behind same-level components and expand the card grids to four desktop columns.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): move my agent view Place the complete my-agent view beside the route page and preserve its resource-card grid behavior.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agent-space): resolve moved my agent imports Update relative component imports after moving the my-agent view and keep layout regression coverage aligned.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): remove legacy tab views Delete duplicate repository and review tab implementations after moving them into dedicated components.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): localize detail dialogs Move repository copy and detail dialogs into the repository tab and version detail into the my-agent tab.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): localize tab state and queries Move list, filter, pagination, detail, and mutation state into each tab view. Keep tab counts on the page and preserve filters across tab switches while disabling inactive queries. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): use shared cards and pagination Render repository listings with ResourceCard and delegate server pagination to ResourceCardGrid. Rename the view to space.tsx and remove the unused agent card adapter and pagination controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): streamline repository card actions Open repository details from the card, move copying into the action menu, show versions as title badges, and place authors in the card footer. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * feat(agent-space): adapt repository cards to the viewport Use Ant Design breakpoints and measured card-region height to select the server page size. Constrain ResourceCardGrid rows to the available viewport space. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): clamp card descriptions to available height Reduce repository-card description lines as card rows shrink and make the shared card description overflow-safe. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): fit repository cards within viewport Remove duplicate tab spacing and reserve the responsive page bottom padding when sizing the card grid. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): match repository card minimum height Use the shared card minimum height when calculating responsive rows so cards and pagination remain within the viewport. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): reposition repository card actions Move copying to the card footer and show download counts beside repository names. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): defer four-column repository layout Keep repository cards in three columns through xl and use four columns only at the xxl breakpoint. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): keep lg repository cards in two columns Limit the repository grid to two columns through lg, then use three columns at xl and four at xxl. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(resource-card): align small-screen grid breakpoint Start the two-column resource grid at 576px so CSS matches Ant Design responsive state and pagination capacity. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): emphasize repository copy action Use a bordered default button for copying repository agents from the card footer. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): strengthen repository copy button Increase the copy action size and use the primary button treatment for a clear visual affordance. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): simplify my agent toolbar Remove redundant import and create-agent toolbar actions, align tag filtering with search, and reuse the shared resource pagination component. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): reorganize my agent card actions Move evaluation into the card overflow menu and keep editing in the lower-right action area. Reposition version, lifecycle status, repository status, and creation date for clearer scanning. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): consolidate repository status badge Show the listed version status beside the agent name and remove the redundant Hub badge. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): use blue badge for listed agents Match the listed repository status badge to the former Hub blue styling. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): clarify current version label Change the agent card version label to Current Version and add a primary color indicator for the active version. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): align lifecycle badge with more menu Place the published or draft badge beside the card menu so both share the top-right header alignment. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): place lifecycle badge below more menu Stack the published or draft badge below the top-right menu to match the card header layout. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): unify repository version display Show the repository card version with the current-version label and typography used by my agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): unify my agent action button style Use the repository card text-button treatment for editable and read-only my agent card actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): fill my agent grid to viewport Measure the available viewport height and distribute my agent cards across responsive grid rows. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(mcp-space): split tab content into components Move MCP repository, mine, and review content into focused components and keep shared actions in a controller. Match agent-space page spacing and tab styling while preserving existing interactions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(mcp-space): keep three tab components Consolidate the MCP tab content into space, my-mcp, and review-center files while keeping the page focused on tab selection and preserving shared interactions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(skill-space): split three tab views Move repository, mine, and review state and actions into their corresponding components. Keep the route focused on tab selection and align its spacing and tabs with the other spaces. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(mcp-space): refine repository card actions Move downloads beside the more menu, show the publisher in the metadata row, and make installation the sole footer action. Open the detail modal when the card itself is clicked. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(mcp-space): align repository card footer Match the agent repository card layout by placing the publisher and install action in the same inline footer row. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(agent-space): align repository download action Place the repository download count in the top-right action area so it remains adjacent to the conditional more menu.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agent-space): align repository search height Use the default Ant Design input height so the repository search field matches the adjacent tag filter button. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): match repository copy button styling Use the same transparent text-button treatment as My Agent card actions for repository copy controls, and add a regression assertion. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(mcp-space): align search filter control heights Match the MCP search input and status select height to Ant Design's default tag filter button height. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol Co-authored-by: Cursor <cursoragent@cursor.com> * fix(mcp-space): match repository action button style Use the same borderless text-button treatment as the Agent repository card while keeping installed repository entries disabled. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * refactor(mcp-space): align responsive repository cards Align Agent and MCP repository layouts, and simplify My MCP card actions for direct editing and compact controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): align repository status badges Place the repository listing status beside the lifecycle state on My Agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(resource): top-align card header actions Align multi-line header action groups from their top edge so adjacent controls stay level. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): center repository header actions Keep the download indicator vertically aligned with the adjacent more menu in repository cards.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): align mine card header actions Keep the more menu beside the health-check action while the review badge stays below it.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): group mine card header actions Place health check and more actions on the first header row, with the review badge beneath them.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): right-align mine review badge Align the review status badge below the more action at the card header's right edge.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * refactor(mcp-space): unify card grid pagination Use ResourceCardGrid for repository and mine MCP cards so pagination follows the shared responsive layout.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(resource): always show card pagination Keep the shared pagination control visible for single-page card lists.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(resource): reserve space for card pagination Include the always-visible pagination area in responsive card grid height calculations.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * docs(skill-repository): document card design Document the approved Skill repository card layout and implementation plan. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(skill-repository): align cards with resource grid Use responsive ResourceCardGrid pagination and streamline Skill repository and My Skills card actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): refine card metadata layout Square Skill search controls, move filtering beside search, reserve tag space, and show repository authors. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): enforce card metadata layout Apply square controls without relying on CSS ordering and display the repository submitter when author is absent. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): match agent search controls Use the Agent repository search radius and default filter button styling in both Skill tabs. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): use default component radius Remove the Skill page radius override so Ant Design controls match the Agent repository. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): render listing tags directly Render repository tags as direct ResourceCard content while preserving empty tag space when no tags exist. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): show managed Skill tags Populate My Skill cards from structured tag assignments with a legacy tag fallback. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): use default description lines Remove the two-line override from Mine Skill cards so descriptions use the shared ResourceCard three-line default.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(resource-cards): align default action styles Use default small text-button styling in Agent and MCP cards, keep the Agent page full height, and rename the Chinese MCP page title.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(resource-cards): remove temporary layout tests Remove the Agent and Skill layout test files created during the refactor-card work.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(resource-cards): remove remaining temporary tests Remove the remaining Agent and MCP layout test files requested for the refactor-card branch.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * docs(skill-repository): remove temporary plans Remove the Skill repository design and implementation plans created for this branch.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(skill-repository): isolate managed tag lookup Mock tag assignment lookups in Skill repository service unit tests so they do not connect to PostgreSQL.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * docs(agents): add card editor design Document the approved Light-mode plan for the independent Agents card list and editor extraction. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): add card-based agent entry Split the Agents route into an independent card selector, centered detail modal, and selector-free editor. Keep agent actions and version management in the route shell. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): align card picker layout Use responsive Row and Col breakpoints for the Agents card picker, add the create card, and align card actions with My Agents. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * feat(agent-list): add filtered pagination Add a paginated agent-list endpoint with permission, tag, and search filters. Expose display metadata and evolve useAgentList with a parameter-object API while preserving legacy callers. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resources): share agent detail dialogs Move agent detail dialogs to a shared resource container and expose card actions through the Agent menu. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): simplify detail actions Keep management actions in the card menu and limit the detail dialog to resource information. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): enrich resource detail Present Agent metadata and related resources in the shared detail dialog. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): restyle agent detail dialog Align the agent detail dialog with the resource-card reference while keeping cancel and edit actions fixed in the footer.\n\nThe agents page already renders this component, so no page integration change is needed.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): align detail metadata Render agent metadata with stable label and value columns, show the available creation date, and remove the duplicate current-version row.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): truncate tool descriptions Keep built-in tool descriptions to a single line in the detail dialog and use an ellipsis for overflow.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agents): remove header config actions Remove AgentConfigActions from the agents header selector while preserving per-card actions.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): clarify unpublished version state Keep the agent configuration workspace white and reserve the current-version state for published versions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): whiten repository page padding Use a white page surface so the agent repository padding no longer appears gray. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): hide draft card version label Show the current-version subtitle only for published agent configuration cards and leave version management behavior unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): honor card-level delete permissions Use each agent card permission for menu deletion while preserving editor-level read-only behavior. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * style(agents): refine card edit hover state Keep the edit action background transparent and highlight its text and icon in blue on hover. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * style(repository): refine card action hover state Apply the transparent blue hover treatment to interactive footer buttons in agent, MCP, and skill repository cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(repository): preserve disabled card actions Skip custom hover styling when an installed MCP repository card action is disabled. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agent-space): use shared card footer Move my-agent card metadata and actions into ResourceCard so its footer layout and hover behavior match other repository cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): split editor into dynamic route Keep the agents index focused on cards and route agent configuration through the selected agent id. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): use paged agent list Delegate agent search and pagination to useAgentList so the card page only renders the returned page of results. No new test added per user request; existing type and route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): defer card detail requests Avoid loading agent details while card action menus mount; detail requests remain on agent selection and detail-dependent actions. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): prevent editor reload on return Ignore editor reload effects after the user starts returning to the agent card list, preventing a transient route flicker. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * feat(agents): open versions from card menu Add a version management action to each agent card menu and open the existing version dialog for the selected agent. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): make search input fill available width Remove its maximum-width utility so the agent search input occupies its container. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): rebind NL2Agent on agent load Recreate the NL2Agent runtime when its target Agent initializes so requests use the editable Agent. Remove the stale unavailable notice. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): show per-agent icons in configuration Use uploaded icons on agent cards and details, and select stable fallback icons from both list and published agent IDs. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * fix(agents): include icon URLs in agent lists Expose each stored icon URL in the agent list projection so configuration cards can load uploaded icons instead of falling back to generated defaults. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * fix(agents): refresh cards after icon upload Invalidate cached agent lists after a successful icon upload so returning to the card page reads the stored icon URL immediately. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * refactor(agents): colocate editor files with agent route Move editor-only components under [agentId] and fold route loading into agent-editor. Keep list and shared version components at the agents root. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): render editor directly from route page Remove the single-use editor wrapper and place the editor workspace in the [agentId] page. Update route-focused tests to read the page directly. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): remove unused editor components Delete seven components that are unreachable from runtime pages and remove tests tied to the obsolete agent selector header. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): group capability and debug components Rename capability component directories, group editor debug components, and move version comparison helpers into the shared versions directory. Update cross-page imports without changing behavior. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): shorten capability and debug directory names Rename shared and editor capability directories to capability and the editor debug directory to debug. Update imports and keep agent-capability.tsx as a sibling file. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): rename debug compare panel file Rename the editor debug comparison component file and update its import to match the shorter directory naming. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-space): load my agents through useAgentList Move My Agents pagination and creator filters to the agent list API, and load repository state only when a user opens a menu or detail view. Keep tab counts and version metadata available without preloading listings. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): open my agent details from card click Connect the My Agents card body to its existing detail handler so users can open agent details directly from the card. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(agent-space): redesign my agent detail modal Present My Agents details in a compact card layout with version and listing status, resource sections, and an edit action. Keep the other agent-space detail dialogs unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): show saved icons in my agents Carry icon_url from the agent list into My Agents cards and details. Use the saved icon when present and getAgentIcon as the fallback. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(agent-repository): support uploaded listing icons Use agent ID defaults for listings and store custom repository images independently from editable agents. Rename repository icon to nullable icon_url, add a migration, and share image storage validation. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-repository): align listing icon upload UI Use the agent editor avatar upload pattern for repository listing while retaining local preview and deferred upload. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-repository): accept selected tags from all definitions Use the same saved tag assignments for listing display and submission so non-category selections satisfy validation. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * chore(agent-repository): remove listing tag hint Remove the tag hint from the listing dialog and delete its unused translations. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): refresh pending review count for admins Keep the pending review count query active for administrators so listing submissions refresh the review badge without opening the review tab. Add a browser regression case for the inactive tab. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(mcp-space): show connection status on MCP cards Show per-card connectivity results below MCP names so checks remain visible after the toast closes. Add localized labels and an end-to-end regression test. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(mcp-space): add colored connection status dots Add gray, green, and red indicators beside the card status labels for unchecked, successful, and failed checks. Extend the end-to-end test to verify each visual state. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(mcp-space): show health checks only on cards Remove health-check success and failure toasts now that each MCP card shows its latest result. Keep the existing automatic disable behavior for failed checks. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-detail): share My Agents detail component Move the My Agents detail dialog into shared agent components and preserve its existing data and actions. Keep labels fully visible, truncate long values, and reduce dialog padding. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-detail): show bound tools and skills Resolve version resource IDs through the existing tool and skill catalogs so detail groups remain visible when snapshots omit names. Retain IDs if a catalog name is unavailable, and cover both cases with regression tests. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-detail): reduce dialog inner spacing Tighten the detail content and footer padding so the modal frame has less empty space while preserving readable controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): show create card on every My Agent page Keep the create card visible across pagination and filters, including empty filtered results, so the reserved grid slot is used consistently. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): reuse shared agent detail dialog Map loaded agent records into the shared detail view and remove the page-specific dialog. Keep the card's edit navigation while omitting creation date and tool descriptions as requested. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): share detail for repository listings Load each listing using the version_no stored on its repository record. Reuse the common detail modal in repository and review views, with repository metadata shown only for those views. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(mcp): align repository detail with agent dialog Replace the repository MCP detail modal with a shared component that follows the Agent detail layout. Preserve tool viewing and installation while keeping the repository card unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(resources): align skill detail and detail filenames Rename the MCP detail component to the singular form and replace repository Skill detail dialogs with a shared component matching the Agent and MCP layout. Preserve review and repository loading states. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(resources): use singular detail directories Move Agent and Skill detail components into their existing singular directories and update all page imports. Remove the now empty plural directories. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * docs(plans): remove branch-only agent card plan Remove the agent card editor plan from the feature branch so the PR contains only the intended implementation changes. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(e2e): remove branch-only browser specs Remove the two browser specs added only on xyq/refactor_card before opening the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(frontend): remove branch-only unit tests Remove the ten frontend test files added only on xyq/refactor_card before opening the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(frontend): remove remaining agent detail test Remove the branch-only myAgentDetail test under frontend/lib so neither same-named test remains in the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(agent-repository): align listing icon request contract Update the stale request model test to use icon_url and assert that the field survives model serialization for the listing endpoint. Refs #4014. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * perf(agent): Enrich only visible agent page Load lightweight agent candidates for visibility, filters, and counts, then resolve model and tool availability only for the selected page. Preserve duplicate warnings across pages and show unavailable reasons on My Agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent): Refresh icons after upload Store a new icon revision on every upload and include it in agent icon requests so cards and list views bypass stale browser cache while unchanged icons retain the existing cache policy. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent): separate legacy agent caches by tenant Include the legacy tenant input in the React Query key so tenant switches fetch and display the correct agent list. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(backend): align agent version and service module assertions Assert the version creation time returned by the existing query and include the agent icon storage service in the architecture inventory. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent): cover icon storage formats and persistence paths Verify JPEG, GIF, and WebP detection plus upload and read success and failure paths. Keep storage interactions isolated with in-memory test doubles. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent-db): cover agent list query helpers Verify selected columns, filters, ordering, and result mapping for agent list candidates. Cover empty and populated ID lookups without database access. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent-api): cover list filters and icon upload errors Verify creator and asset owner tenant forwarding plus paged list 400 and 500 responses. Cover repository icon upload validation and authorization errors. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com> | 7 小时前 | |
feat(memory): complete external memory provider integration (#3690) * feat(memory): post-final-answer memory extraction via standalone LLM call Squash merge of feat/final-answer-based-memory (2 commits): - feat(memory): post-final-answer memory extraction via standalone LLM call - fix(test): update memory_tool_prompt assertions for new action-steps-only policy Adds automatic memory extraction after final_answer in _stream_agent_chunks(), with a standalone LLM-based extractor service and updated memory tool prompt policy. * feat(memory): add external_provider_top_k and external_provider_timeout to memory config system - Add external_provider_top_k (default: 20) and external_provider_timeout (default: 30s) fields to MemoryUserConfig - Add getter/setter functions in memory_config_service.py with validation (top_k: 1-100, timeout: 1-120s) - Add API endpoints in memory_config_app.py for setting these configurations - Add UI controls in MemoryManager.tsx with input fields and validation - Update frontend memoryService.ts to load/save these configurations - All changes respect memory_switch setting (disabled when memory is off) * feat(memory): wire external provider search into create_agent_config() - Query external providers at session start using configured top_k and timeout - Convert MemorySearchResult to ExternalMemoryItem format - Pass external_results to memory_context_service.build_context() - Add graceful error handling (failures don't break session start) - Respects memory_switch and external provider enabled settings - Logs external provider search results and failures * test(memory): add integration tests for session-start external retrieval - Test full flow with multiple external providers - Test provider timeout with partial results - Test all providers fail gracefully (session continues) - Test MMR dedup of duplicate content - Test token budget enforcement - All tests use mocks and follow existing integration test patterns * feat(memory): implement Phase 3 external memory provider system Backend: - Add memory_provider_config_t and memory_provider_config_param_t tables for EAV configuration - Add memory_external_ingest_event_log_t for audit logging - Implement MemoryProviderConfigService for CRUD operations with validation - Implement MemoryExternalProviderService for provider lifecycle management - Implement MemoryIngestionEventService for ingest event handling - Implement MemoryProviderPluginLoader for dynamic plugin loading - Add memory_provider_app.py with REST API endpoints - Add transparent proxy integration in memory_backend_adapter.py - Add per-turn supplement hook in agent_service.py - Add content hash dedup in normalizer.py - Add elastic MMR candidate pool in mmr.py - Add ExternalMemoryItem and related models to SDK Frontend: - Add ProviderConfigCard component for provider list display - Add ProviderConfigDialog for provider configuration - Add providerService for API integration Deployment: - Add SQL migration v2.5.0_0814_external_memory_provider.sql - Update docker-compose.yml with plugin volume mapping - Update k8s manifests with plugin directory configuration - Update .env.example with new environment variables Tests: - Add comprehensive unit tests for all backend services - Add integration tests for transparent proxy - Add integration tests for per-turn supplement hook * fix(memory): complete external provider integration * docs(memory): clarify external plugin data directory * test(memory): remove obsolete root mem0 script * fix(deploy): correct external memory plugin mounts * feat(memory): refine external provider management UI * fix(ci): resolve external memory quality gate failures * refactor(memory): reduce duplicated test setup * test(memory): share database test stubs * fix(memory): enable provider-controlled external ingest * test: align suite with merged migrations * test(memory): cover provider error and fanout paths * test(memory): cover ingestion service construction * fix(memory): support hosted Mem0 v3 writes * refactor(memory): use latest Mem0 API exclusively * fix(db): keep external memory schema in migration * refactor(memory): move runtime imports to module scope * docs(memory): add Mem0 Cloud E2E evidence * style(memory): compact external provider cards * style(memory): hide provider timeout summary * chore(db): update external memory migration date * docs(memory): remove PR documentation and evidence * chore: remove local backend launcher * refactor(memory): narrow external provider scope * fix(deploy): mount memory plugins in production compose * style(memory): use absolute backend imports | 24 天前 | |
🐛 Bugfix: Fixed an issue where calls to external tool interfaces returning a 401 status code would cause Nexent to log out. (#3324) * 🐛 Bugfix: Fixed an issue where calls to external tool interfaces returning a 401 status code would cause Nexent to log out. [Specification Details] 1. Map the 401 status code from the external interface to the 502 status code within Nexent. * 🐛 Bugfix: Fixed an issue where calls to external tool interfaces returning a 401 status code would cause Nexent to log out. [Specification Details] 1. fix test cases. | 2 个月前 | |
✨ feature personal kb capacity (#3712) * feat(resource): personal knowledge base capacity management and quota APIs * test(quota): send default bearer header in client fixture * feat: add personal knowledge base capacity controls * fix: avoid logging personal KB request data * fix: avoid logging quota request identity * test: align model app tests with legacy permissions * fix: preserve explicit roles in speed mode * test: make dreaming age test time-stable * fix: clean up personal knowledge base permissions * test: improve personal knowledge base coverage * fix: localize personal knowledge base quota errors * fix: allow deletion of legacy KB source files * fix: complete personal knowledge base permission updates * fix frontend API error details typing | 1 个月前 | |
0930需求-feat: Nexent规格表- 增加租户知识库上限 + 知识库单文件大小上限 (#3730) * feat: enforce knowledge base resource limits * test: cover knowledge resource limit branches * fix: align knowledge resource limits with latest develop * config: expose knowledge resource limits via environment * test: improve knowledge limit patch coverage | 4 小时前 | |
修复监控异常上报 (#3984) * fix: preserve agent trace hierarchy and improve monitoring metadata Trace the full agent lifecycle, sandbox callbacks, child agents, and conversation title generation. Use user emails and agent display names, filter noisy spans, and add observability regression coverage. Include the current Docker build adjustments. * Trace sandbox warmup with agent monitoring metadata * Isolate lazy human interaction service in stop endpoint test --------- Co-authored-by: hhhhsc <name> | 5 小时前 | |
🧪[Test] Refactor the existing asynchronous test cases from unittest to pytest + pytest-asyncio, resolving the framework's limitation of not supporting asynchronous testing. | 1 年前 | |
Feat hzw 20260810 (#3920) * feat:model page * feat: 接入方式优化-需要回退 * ♻️ Refactor: unify model edit dialog onto ModelAddDialogV2 - ModelAddDialogV2: add model prop for edit mode (prefill custom form from existing model, default to 自定义接入 tab, call updateSingleModel/updateManageTenantModel on submit instead of add) - modelConfig.tsx: handleCardEdit now renders ModelAddDialogV2 with model prop instead of ModelEditDialogV2 * Feature: model capacity auto-lookup, custom param validation, and type inference fixes Capacity suggestion (catalog -> bundled LiteLLM JSON -> default): - model_capacity_suggestion_service: remove LLM self-report fallback (dead code, providers without web search always return null); add _litellm_lookup reading the bundled LiteLLM model_prices_and_context_window.json (3818 models) as the second source; match by provider/name and bare-name final segment, preferring entries with both max_input and max_output - main Dockerfile: bundle LiteLLM JSON at build time (works offline / no VPN) - suggest_capacity: try LiteLLM bare-name match even when provider is uninferable (base_url still empty while typing) Model add/edit dialog (V2): - custom tab: debounced auto-lookup on model name (500ms) fills empty capacity fields only; configured tag reflects lookup result, not display_name presence - connectivity probe no longer mutates capacity fields; probe carries temperature/top_p/extra_params so invalid __custom__ params surface at verify time as a 400 instead of failing at runtime - __custom__ numeric strings coerce to numbers (top_k=50, not 50); fix .trim crash on numeric values in edit mode - batch tab: add client-side model name search filter; per-row connectivity fills capacity from suggestion - edit mode: onConnectivityChange reports probe result back to the model list so connect_status refreshes in place Model config list: - verifyModels now probes ALL models in the list (was: default-model selection only), updating rows in parallel - remove misleading provider model-count badge; fix ModelConnectStatus duplicate declaration; drop unused DEFAULT_* imports Type inference (_infer_model_type_from_name): - match full name AND final path segment so repo-prefixed ids from aggregators (BAAI/bge-m3, Pro/..., deepseek-ai/...) classify correctly - add contains-based rules aligned with develop TokenPony classifier: embedding/rerank/stt/tts mid-name, vlm3 (omni/video), vlm2 (image-gen keywords), vlm (vision/visual/ocr/vl-segment) Connectivity service: - port develop _embedding_url_candidates multi-candidate probe (normalized /embeddings URL first, then as-given) for embedding/multi_embedding - _config_to_context: __custom__ KV pairs flow into extra_body at runtime - openai_llm check_connectivity probe carries inference params Type fixes: AgentDraft includes model_params_override; ModelEditDialogV2 keyMap adds vlm4; agent-prompt model override config dialog typing * Fix: rename llmModels to availableLlmModels after develop merge (useModelList API rename) * Fix: normalize rerank probe URL to the rerank endpoint The batch-import connectivity probe passed the bare provider root (e.g. https://api.siliconflow.cn/v1/) straight to the rerank adapter, which POSTs the URL as-is -> 404 -> unavailable even though the model is fine. prepare_model_dict already appends /rerank when SAVING the model, so probe-time and save-time URLs disagreed. Mirror that munging in _perform_connectivity_check: dashscope roots get the api/v1 .../services/rerank/text-rerank/text-rerank path, others get {root}/rerank. Already-normalized URLs pass through untouched. This matches the embedding probe /embeddings normalization. * Fix: carry verified connect_status into batch-created model records Batch submit requires every enabled row to pass the connectivity probe (hasUnchecked gate), but the verified available result lived only in dialog state — the create endpoints never received it, so the backend reset connect_status to not_detected on insert and the freshly imported models showed as unverified in the list. The backend already honors this (create_model_for_tenant: connect_status = payload or NOT_DETECTED; ModelRequest has the field) — only the frontend was not sending it. Thread connectStatus through addCustomModel / createManageTenantModel request bodies and set it from the row state at batch submit time. * Remove legacy modify-or-delete models button and ModelDeleteDialog The button opened a 2000-line legacy panel whose single-row edit/delete duplicated the per-row actions (and used the old V1 edit dialog), and whose only unique capability was a narrow bulk-edit (same-provider key, timeout, capacity override). Bulk delete did not exist - deletion inside the panel was still one-by-one. - drop the top-bar button (Can model:update wrapper) - drop the capacity-coverage alert action that opened the same panel - remove isDeleteModalOpen state, ModelDeleteDialog import and instance - delete the orphaned ModelDeleteDialog.tsx (ModelEditDialog stays - it is still referenced by resource-manage ModelList) * Fix: show Chinese type labels for vlm2/vlm3/vlm4 in model list The type column rendered t(`model.type.${type}`) directly, but the locale files have no model.type.vlm2/vlm3/vlm4 keys (they are keyed by semantic name: imageGeneration / videoUnderstanding / audioUnderstanding), so those rows displayed the raw id string. Add the same id-to-semantic-key mapping the add dialog uses, covering all ten types. Also aligns vlm to the dialog label (image understanding) instead of the legacy model.type.vlm wording. * Fix: address CodeQL security alerts in provider fetch and catalog endpoints SSRF (critical) in openai_provider.get_models: the operator-supplied base_url was fetched as-is. Add _validate_provider_base_url guard before the request: scheme must be http/https, host required, private / link-local / multicast / reserved IP literals rejected (cloud metadata endpoints, internal routers). Plain DNS names and the documented localhost/127.0.0.1 local-LLM exemption are allowed. Validation errors flow through the existing _classify_provider_error path as provider fetch failures. Information exposure (medium x5) in model_managment_app catalog endpoints: the exception text was interpolated into the JSON response body, which can leak stack traces / internal details to the caller. Replace with fixed messages; the exception detail is already logged server-side via logger.warning. Affected: /catalog/all, /catalog/providers, /catalog/inference_field_specs, /catalog/providers/{provider}/models, /catalog/providers/{provider}/models/{model_name}. * Fix: address Copilot review findings in tests and catalog wiring Real bugs (blocked the unit-test CI job): - test_model_consts.py: corrupted multi-byte string literal (truncated mid-character) made the module unparseable; restore the intended default title assertion. - test_model_catalog_loader.py: read p.provider_key / get_model_profile(p.provider_key, ...) but the Pydantic ModelCatalogProviderInfo model exposes id; align to the actual field. Latent issues flagged by review: - model_managment_app.py: the catalog-import fallback handler logged via the module logger before it was initialized, raising NameError on the graceful-degradation path; log via logging.getLogger directly. - useModelCatalog.ts + types: provider summary declared provider_key/supported_model_types while /catalog/providers serializes id/supported_types (Pydantic dump). Align the frontend type and hook maps to the wire names. ModelCatalogModelEntry.provider_key stays as is - the /catalog/all model entries do carry provider_key. * Fix: catalog loader test must accept normalized model entries The loader normalizes each catalog model entry into a ModelCatalogProfile instance (not a raw dict), so asserting model_type in model_cfg fails with TypeError on the Pydantic model. Accept both the raw dict form and the normalized instance via getattr. Verified in-container: 8 passed. * Fix: sync model health tests with inference params and rerank URL normalization * Fix: sync model tests with unified provider dispatch and consts.model imports * Fix: register consts.model and nexent.core.agents stubs in tests blocked by model_management_db import chain * Fix: harden provider SSRF guard with post-DNS IP validation and restore TLS verification * Fix: resolve SonarCloud quality gate findings (complexity, log injection, warnings, duplication) * Fix: reduce cognitive complexity and eliminate duplicated blocks flagged by SonarCloud * Fix: remove legacy dialogs duplicated by V2, sanitize catalog logging, resolve remaining SonarCloud issues * Fix: sanitize catalog version with json.dumps and clear remaining SonarCloud issues * Fix: stop logging file-derived catalog version and flatten handleSave max-tokens logic * Fix: resolve SDK httpx Timeout class for httpx2-based OpenAI builds * Fix: route capacity suggestion through managed thread pool and make stopwords loading race-tolerant --------- Co-authored-by: hzw <hzw@qq.com> Co-authored-by: ljy <ljy@DESKTOP-65OBISN.(none)> | 13 天前 | |
✨Feature: Logs are written to disk as files (#3859) * ✨Feature: Logs are written to disk as files * ✨Feature: Logs are written to disk as files * ✨Feature: Logs are written to disk as files * ✨Feature: Logs are written to disk as files: ut * ✨Feature: Logs are written to disk as files: ut * ✨Feature: Logs are written to disk as files: ut * ✨Feature: Logs are written to disk as files: ut * ✨Feature: Logs are written to disk as files: ut | 24 天前 | |
Feat hzw 20260810 (#3920) * feat:model page * feat: 接入方式优化-需要回退 * ♻️ Refactor: unify model edit dialog onto ModelAddDialogV2 - ModelAddDialogV2: add model prop for edit mode (prefill custom form from existing model, default to 自定义接入 tab, call updateSingleModel/updateManageTenantModel on submit instead of add) - modelConfig.tsx: handleCardEdit now renders ModelAddDialogV2 with model prop instead of ModelEditDialogV2 * Feature: model capacity auto-lookup, custom param validation, and type inference fixes Capacity suggestion (catalog -> bundled LiteLLM JSON -> default): - model_capacity_suggestion_service: remove LLM self-report fallback (dead code, providers without web search always return null); add _litellm_lookup reading the bundled LiteLLM model_prices_and_context_window.json (3818 models) as the second source; match by provider/name and bare-name final segment, preferring entries with both max_input and max_output - main Dockerfile: bundle LiteLLM JSON at build time (works offline / no VPN) - suggest_capacity: try LiteLLM bare-name match even when provider is uninferable (base_url still empty while typing) Model add/edit dialog (V2): - custom tab: debounced auto-lookup on model name (500ms) fills empty capacity fields only; configured tag reflects lookup result, not display_name presence - connectivity probe no longer mutates capacity fields; probe carries temperature/top_p/extra_params so invalid __custom__ params surface at verify time as a 400 instead of failing at runtime - __custom__ numeric strings coerce to numbers (top_k=50, not 50); fix .trim crash on numeric values in edit mode - batch tab: add client-side model name search filter; per-row connectivity fills capacity from suggestion - edit mode: onConnectivityChange reports probe result back to the model list so connect_status refreshes in place Model config list: - verifyModels now probes ALL models in the list (was: default-model selection only), updating rows in parallel - remove misleading provider model-count badge; fix ModelConnectStatus duplicate declaration; drop unused DEFAULT_* imports Type inference (_infer_model_type_from_name): - match full name AND final path segment so repo-prefixed ids from aggregators (BAAI/bge-m3, Pro/..., deepseek-ai/...) classify correctly - add contains-based rules aligned with develop TokenPony classifier: embedding/rerank/stt/tts mid-name, vlm3 (omni/video), vlm2 (image-gen keywords), vlm (vision/visual/ocr/vl-segment) Connectivity service: - port develop _embedding_url_candidates multi-candidate probe (normalized /embeddings URL first, then as-given) for embedding/multi_embedding - _config_to_context: __custom__ KV pairs flow into extra_body at runtime - openai_llm check_connectivity probe carries inference params Type fixes: AgentDraft includes model_params_override; ModelEditDialogV2 keyMap adds vlm4; agent-prompt model override config dialog typing * Fix: rename llmModels to availableLlmModels after develop merge (useModelList API rename) * Fix: normalize rerank probe URL to the rerank endpoint The batch-import connectivity probe passed the bare provider root (e.g. https://api.siliconflow.cn/v1/) straight to the rerank adapter, which POSTs the URL as-is -> 404 -> unavailable even though the model is fine. prepare_model_dict already appends /rerank when SAVING the model, so probe-time and save-time URLs disagreed. Mirror that munging in _perform_connectivity_check: dashscope roots get the api/v1 .../services/rerank/text-rerank/text-rerank path, others get {root}/rerank. Already-normalized URLs pass through untouched. This matches the embedding probe /embeddings normalization. * Fix: carry verified connect_status into batch-created model records Batch submit requires every enabled row to pass the connectivity probe (hasUnchecked gate), but the verified available result lived only in dialog state — the create endpoints never received it, so the backend reset connect_status to not_detected on insert and the freshly imported models showed as unverified in the list. The backend already honors this (create_model_for_tenant: connect_status = payload or NOT_DETECTED; ModelRequest has the field) — only the frontend was not sending it. Thread connectStatus through addCustomModel / createManageTenantModel request bodies and set it from the row state at batch submit time. * Remove legacy modify-or-delete models button and ModelDeleteDialog The button opened a 2000-line legacy panel whose single-row edit/delete duplicated the per-row actions (and used the old V1 edit dialog), and whose only unique capability was a narrow bulk-edit (same-provider key, timeout, capacity override). Bulk delete did not exist - deletion inside the panel was still one-by-one. - drop the top-bar button (Can model:update wrapper) - drop the capacity-coverage alert action that opened the same panel - remove isDeleteModalOpen state, ModelDeleteDialog import and instance - delete the orphaned ModelDeleteDialog.tsx (ModelEditDialog stays - it is still referenced by resource-manage ModelList) * Fix: show Chinese type labels for vlm2/vlm3/vlm4 in model list The type column rendered t(`model.type.${type}`) directly, but the locale files have no model.type.vlm2/vlm3/vlm4 keys (they are keyed by semantic name: imageGeneration / videoUnderstanding / audioUnderstanding), so those rows displayed the raw id string. Add the same id-to-semantic-key mapping the add dialog uses, covering all ten types. Also aligns vlm to the dialog label (image understanding) instead of the legacy model.type.vlm wording. * Fix: address CodeQL security alerts in provider fetch and catalog endpoints SSRF (critical) in openai_provider.get_models: the operator-supplied base_url was fetched as-is. Add _validate_provider_base_url guard before the request: scheme must be http/https, host required, private / link-local / multicast / reserved IP literals rejected (cloud metadata endpoints, internal routers). Plain DNS names and the documented localhost/127.0.0.1 local-LLM exemption are allowed. Validation errors flow through the existing _classify_provider_error path as provider fetch failures. Information exposure (medium x5) in model_managment_app catalog endpoints: the exception text was interpolated into the JSON response body, which can leak stack traces / internal details to the caller. Replace with fixed messages; the exception detail is already logged server-side via logger.warning. Affected: /catalog/all, /catalog/providers, /catalog/inference_field_specs, /catalog/providers/{provider}/models, /catalog/providers/{provider}/models/{model_name}. * Fix: address Copilot review findings in tests and catalog wiring Real bugs (blocked the unit-test CI job): - test_model_consts.py: corrupted multi-byte string literal (truncated mid-character) made the module unparseable; restore the intended default title assertion. - test_model_catalog_loader.py: read p.provider_key / get_model_profile(p.provider_key, ...) but the Pydantic ModelCatalogProviderInfo model exposes id; align to the actual field. Latent issues flagged by review: - model_managment_app.py: the catalog-import fallback handler logged via the module logger before it was initialized, raising NameError on the graceful-degradation path; log via logging.getLogger directly. - useModelCatalog.ts + types: provider summary declared provider_key/supported_model_types while /catalog/providers serializes id/supported_types (Pydantic dump). Align the frontend type and hook maps to the wire names. ModelCatalogModelEntry.provider_key stays as is - the /catalog/all model entries do carry provider_key. * Fix: catalog loader test must accept normalized model entries The loader normalizes each catalog model entry into a ModelCatalogProfile instance (not a raw dict), so asserting model_type in model_cfg fails with TypeError on the Pydantic model. Accept both the raw dict form and the normalized instance via getattr. Verified in-container: 8 passed. * Fix: sync model health tests with inference params and rerank URL normalization * Fix: sync model tests with unified provider dispatch and consts.model imports * Fix: register consts.model and nexent.core.agents stubs in tests blocked by model_management_db import chain * Fix: harden provider SSRF guard with post-DNS IP validation and restore TLS verification * Fix: resolve SonarCloud quality gate findings (complexity, log injection, warnings, duplication) * Fix: reduce cognitive complexity and eliminate duplicated blocks flagged by SonarCloud * Fix: remove legacy dialogs duplicated by V2, sanitize catalog logging, resolve remaining SonarCloud issues * Fix: sanitize catalog version with json.dumps and clear remaining SonarCloud issues * Fix: stop logging file-derived catalog version and flatten handleSave max-tokens logic * Fix: resolve SDK httpx Timeout class for httpx2-based OpenAI builds * Fix: route capacity suggestion through managed thread pool and make stopwords loading race-tolerant --------- Co-authored-by: hzw <hzw@qq.com> Co-authored-by: ljy <ljy@DESKTOP-65OBISN.(none)> | 13 天前 | |
Feat hzw 20260810 (#3920) * feat:model page * feat: 接入方式优化-需要回退 * ♻️ Refactor: unify model edit dialog onto ModelAddDialogV2 - ModelAddDialogV2: add model prop for edit mode (prefill custom form from existing model, default to 自定义接入 tab, call updateSingleModel/updateManageTenantModel on submit instead of add) - modelConfig.tsx: handleCardEdit now renders ModelAddDialogV2 with model prop instead of ModelEditDialogV2 * Feature: model capacity auto-lookup, custom param validation, and type inference fixes Capacity suggestion (catalog -> bundled LiteLLM JSON -> default): - model_capacity_suggestion_service: remove LLM self-report fallback (dead code, providers without web search always return null); add _litellm_lookup reading the bundled LiteLLM model_prices_and_context_window.json (3818 models) as the second source; match by provider/name and bare-name final segment, preferring entries with both max_input and max_output - main Dockerfile: bundle LiteLLM JSON at build time (works offline / no VPN) - suggest_capacity: try LiteLLM bare-name match even when provider is uninferable (base_url still empty while typing) Model add/edit dialog (V2): - custom tab: debounced auto-lookup on model name (500ms) fills empty capacity fields only; configured tag reflects lookup result, not display_name presence - connectivity probe no longer mutates capacity fields; probe carries temperature/top_p/extra_params so invalid __custom__ params surface at verify time as a 400 instead of failing at runtime - __custom__ numeric strings coerce to numbers (top_k=50, not 50); fix .trim crash on numeric values in edit mode - batch tab: add client-side model name search filter; per-row connectivity fills capacity from suggestion - edit mode: onConnectivityChange reports probe result back to the model list so connect_status refreshes in place Model config list: - verifyModels now probes ALL models in the list (was: default-model selection only), updating rows in parallel - remove misleading provider model-count badge; fix ModelConnectStatus duplicate declaration; drop unused DEFAULT_* imports Type inference (_infer_model_type_from_name): - match full name AND final path segment so repo-prefixed ids from aggregators (BAAI/bge-m3, Pro/..., deepseek-ai/...) classify correctly - add contains-based rules aligned with develop TokenPony classifier: embedding/rerank/stt/tts mid-name, vlm3 (omni/video), vlm2 (image-gen keywords), vlm (vision/visual/ocr/vl-segment) Connectivity service: - port develop _embedding_url_candidates multi-candidate probe (normalized /embeddings URL first, then as-given) for embedding/multi_embedding - _config_to_context: __custom__ KV pairs flow into extra_body at runtime - openai_llm check_connectivity probe carries inference params Type fixes: AgentDraft includes model_params_override; ModelEditDialogV2 keyMap adds vlm4; agent-prompt model override config dialog typing * Fix: rename llmModels to availableLlmModels after develop merge (useModelList API rename) * Fix: normalize rerank probe URL to the rerank endpoint The batch-import connectivity probe passed the bare provider root (e.g. https://api.siliconflow.cn/v1/) straight to the rerank adapter, which POSTs the URL as-is -> 404 -> unavailable even though the model is fine. prepare_model_dict already appends /rerank when SAVING the model, so probe-time and save-time URLs disagreed. Mirror that munging in _perform_connectivity_check: dashscope roots get the api/v1 .../services/rerank/text-rerank/text-rerank path, others get {root}/rerank. Already-normalized URLs pass through untouched. This matches the embedding probe /embeddings normalization. * Fix: carry verified connect_status into batch-created model records Batch submit requires every enabled row to pass the connectivity probe (hasUnchecked gate), but the verified available result lived only in dialog state — the create endpoints never received it, so the backend reset connect_status to not_detected on insert and the freshly imported models showed as unverified in the list. The backend already honors this (create_model_for_tenant: connect_status = payload or NOT_DETECTED; ModelRequest has the field) — only the frontend was not sending it. Thread connectStatus through addCustomModel / createManageTenantModel request bodies and set it from the row state at batch submit time. * Remove legacy modify-or-delete models button and ModelDeleteDialog The button opened a 2000-line legacy panel whose single-row edit/delete duplicated the per-row actions (and used the old V1 edit dialog), and whose only unique capability was a narrow bulk-edit (same-provider key, timeout, capacity override). Bulk delete did not exist - deletion inside the panel was still one-by-one. - drop the top-bar button (Can model:update wrapper) - drop the capacity-coverage alert action that opened the same panel - remove isDeleteModalOpen state, ModelDeleteDialog import and instance - delete the orphaned ModelDeleteDialog.tsx (ModelEditDialog stays - it is still referenced by resource-manage ModelList) * Fix: show Chinese type labels for vlm2/vlm3/vlm4 in model list The type column rendered t(`model.type.${type}`) directly, but the locale files have no model.type.vlm2/vlm3/vlm4 keys (they are keyed by semantic name: imageGeneration / videoUnderstanding / audioUnderstanding), so those rows displayed the raw id string. Add the same id-to-semantic-key mapping the add dialog uses, covering all ten types. Also aligns vlm to the dialog label (image understanding) instead of the legacy model.type.vlm wording. * Fix: address CodeQL security alerts in provider fetch and catalog endpoints SSRF (critical) in openai_provider.get_models: the operator-supplied base_url was fetched as-is. Add _validate_provider_base_url guard before the request: scheme must be http/https, host required, private / link-local / multicast / reserved IP literals rejected (cloud metadata endpoints, internal routers). Plain DNS names and the documented localhost/127.0.0.1 local-LLM exemption are allowed. Validation errors flow through the existing _classify_provider_error path as provider fetch failures. Information exposure (medium x5) in model_managment_app catalog endpoints: the exception text was interpolated into the JSON response body, which can leak stack traces / internal details to the caller. Replace with fixed messages; the exception detail is already logged server-side via logger.warning. Affected: /catalog/all, /catalog/providers, /catalog/inference_field_specs, /catalog/providers/{provider}/models, /catalog/providers/{provider}/models/{model_name}. * Fix: address Copilot review findings in tests and catalog wiring Real bugs (blocked the unit-test CI job): - test_model_consts.py: corrupted multi-byte string literal (truncated mid-character) made the module unparseable; restore the intended default title assertion. - test_model_catalog_loader.py: read p.provider_key / get_model_profile(p.provider_key, ...) but the Pydantic ModelCatalogProviderInfo model exposes id; align to the actual field. Latent issues flagged by review: - model_managment_app.py: the catalog-import fallback handler logged via the module logger before it was initialized, raising NameError on the graceful-degradation path; log via logging.getLogger directly. - useModelCatalog.ts + types: provider summary declared provider_key/supported_model_types while /catalog/providers serializes id/supported_types (Pydantic dump). Align the frontend type and hook maps to the wire names. ModelCatalogModelEntry.provider_key stays as is - the /catalog/all model entries do carry provider_key. * Fix: catalog loader test must accept normalized model entries The loader normalizes each catalog model entry into a ModelCatalogProfile instance (not a raw dict), so asserting model_type in model_cfg fails with TypeError on the Pydantic model. Accept both the raw dict form and the normalized instance via getattr. Verified in-container: 8 passed. * Fix: sync model health tests with inference params and rerank URL normalization * Fix: sync model tests with unified provider dispatch and consts.model imports * Fix: register consts.model and nexent.core.agents stubs in tests blocked by model_management_db import chain * Fix: harden provider SSRF guard with post-DNS IP validation and restore TLS verification * Fix: resolve SonarCloud quality gate findings (complexity, log injection, warnings, duplication) * Fix: reduce cognitive complexity and eliminate duplicated blocks flagged by SonarCloud * Fix: remove legacy dialogs duplicated by V2, sanitize catalog logging, resolve remaining SonarCloud issues * Fix: sanitize catalog version with json.dumps and clear remaining SonarCloud issues * Fix: stop logging file-derived catalog version and flatten handleSave max-tokens logic * Fix: resolve SDK httpx Timeout class for httpx2-based OpenAI builds * Fix: route capacity suggestion through managed thread pool and make stopwords loading race-tolerant --------- Co-authored-by: hzw <hzw@qq.com> Co-authored-by: ljy <ljy@DESKTOP-65OBISN.(none)> | 13 天前 | |
Feat hzw 20260810 (#3920) * feat:model page * feat: 接入方式优化-需要回退 * ♻️ Refactor: unify model edit dialog onto ModelAddDialogV2 - ModelAddDialogV2: add model prop for edit mode (prefill custom form from existing model, default to 自定义接入 tab, call updateSingleModel/updateManageTenantModel on submit instead of add) - modelConfig.tsx: handleCardEdit now renders ModelAddDialogV2 with model prop instead of ModelEditDialogV2 * Feature: model capacity auto-lookup, custom param validation, and type inference fixes Capacity suggestion (catalog -> bundled LiteLLM JSON -> default): - model_capacity_suggestion_service: remove LLM self-report fallback (dead code, providers without web search always return null); add _litellm_lookup reading the bundled LiteLLM model_prices_and_context_window.json (3818 models) as the second source; match by provider/name and bare-name final segment, preferring entries with both max_input and max_output - main Dockerfile: bundle LiteLLM JSON at build time (works offline / no VPN) - suggest_capacity: try LiteLLM bare-name match even when provider is uninferable (base_url still empty while typing) Model add/edit dialog (V2): - custom tab: debounced auto-lookup on model name (500ms) fills empty capacity fields only; configured tag reflects lookup result, not display_name presence - connectivity probe no longer mutates capacity fields; probe carries temperature/top_p/extra_params so invalid __custom__ params surface at verify time as a 400 instead of failing at runtime - __custom__ numeric strings coerce to numbers (top_k=50, not 50); fix .trim crash on numeric values in edit mode - batch tab: add client-side model name search filter; per-row connectivity fills capacity from suggestion - edit mode: onConnectivityChange reports probe result back to the model list so connect_status refreshes in place Model config list: - verifyModels now probes ALL models in the list (was: default-model selection only), updating rows in parallel - remove misleading provider model-count badge; fix ModelConnectStatus duplicate declaration; drop unused DEFAULT_* imports Type inference (_infer_model_type_from_name): - match full name AND final path segment so repo-prefixed ids from aggregators (BAAI/bge-m3, Pro/..., deepseek-ai/...) classify correctly - add contains-based rules aligned with develop TokenPony classifier: embedding/rerank/stt/tts mid-name, vlm3 (omni/video), vlm2 (image-gen keywords), vlm (vision/visual/ocr/vl-segment) Connectivity service: - port develop _embedding_url_candidates multi-candidate probe (normalized /embeddings URL first, then as-given) for embedding/multi_embedding - _config_to_context: __custom__ KV pairs flow into extra_body at runtime - openai_llm check_connectivity probe carries inference params Type fixes: AgentDraft includes model_params_override; ModelEditDialogV2 keyMap adds vlm4; agent-prompt model override config dialog typing * Fix: rename llmModels to availableLlmModels after develop merge (useModelList API rename) * Fix: normalize rerank probe URL to the rerank endpoint The batch-import connectivity probe passed the bare provider root (e.g. https://api.siliconflow.cn/v1/) straight to the rerank adapter, which POSTs the URL as-is -> 404 -> unavailable even though the model is fine. prepare_model_dict already appends /rerank when SAVING the model, so probe-time and save-time URLs disagreed. Mirror that munging in _perform_connectivity_check: dashscope roots get the api/v1 .../services/rerank/text-rerank/text-rerank path, others get {root}/rerank. Already-normalized URLs pass through untouched. This matches the embedding probe /embeddings normalization. * Fix: carry verified connect_status into batch-created model records Batch submit requires every enabled row to pass the connectivity probe (hasUnchecked gate), but the verified available result lived only in dialog state — the create endpoints never received it, so the backend reset connect_status to not_detected on insert and the freshly imported models showed as unverified in the list. The backend already honors this (create_model_for_tenant: connect_status = payload or NOT_DETECTED; ModelRequest has the field) — only the frontend was not sending it. Thread connectStatus through addCustomModel / createManageTenantModel request bodies and set it from the row state at batch submit time. * Remove legacy modify-or-delete models button and ModelDeleteDialog The button opened a 2000-line legacy panel whose single-row edit/delete duplicated the per-row actions (and used the old V1 edit dialog), and whose only unique capability was a narrow bulk-edit (same-provider key, timeout, capacity override). Bulk delete did not exist - deletion inside the panel was still one-by-one. - drop the top-bar button (Can model:update wrapper) - drop the capacity-coverage alert action that opened the same panel - remove isDeleteModalOpen state, ModelDeleteDialog import and instance - delete the orphaned ModelDeleteDialog.tsx (ModelEditDialog stays - it is still referenced by resource-manage ModelList) * Fix: show Chinese type labels for vlm2/vlm3/vlm4 in model list The type column rendered t(`model.type.${type}`) directly, but the locale files have no model.type.vlm2/vlm3/vlm4 keys (they are keyed by semantic name: imageGeneration / videoUnderstanding / audioUnderstanding), so those rows displayed the raw id string. Add the same id-to-semantic-key mapping the add dialog uses, covering all ten types. Also aligns vlm to the dialog label (image understanding) instead of the legacy model.type.vlm wording. * Fix: address CodeQL security alerts in provider fetch and catalog endpoints SSRF (critical) in openai_provider.get_models: the operator-supplied base_url was fetched as-is. Add _validate_provider_base_url guard before the request: scheme must be http/https, host required, private / link-local / multicast / reserved IP literals rejected (cloud metadata endpoints, internal routers). Plain DNS names and the documented localhost/127.0.0.1 local-LLM exemption are allowed. Validation errors flow through the existing _classify_provider_error path as provider fetch failures. Information exposure (medium x5) in model_managment_app catalog endpoints: the exception text was interpolated into the JSON response body, which can leak stack traces / internal details to the caller. Replace with fixed messages; the exception detail is already logged server-side via logger.warning. Affected: /catalog/all, /catalog/providers, /catalog/inference_field_specs, /catalog/providers/{provider}/models, /catalog/providers/{provider}/models/{model_name}. * Fix: address Copilot review findings in tests and catalog wiring Real bugs (blocked the unit-test CI job): - test_model_consts.py: corrupted multi-byte string literal (truncated mid-character) made the module unparseable; restore the intended default title assertion. - test_model_catalog_loader.py: read p.provider_key / get_model_profile(p.provider_key, ...) but the Pydantic ModelCatalogProviderInfo model exposes id; align to the actual field. Latent issues flagged by review: - model_managment_app.py: the catalog-import fallback handler logged via the module logger before it was initialized, raising NameError on the graceful-degradation path; log via logging.getLogger directly. - useModelCatalog.ts + types: provider summary declared provider_key/supported_model_types while /catalog/providers serializes id/supported_types (Pydantic dump). Align the frontend type and hook maps to the wire names. ModelCatalogModelEntry.provider_key stays as is - the /catalog/all model entries do carry provider_key. * Fix: catalog loader test must accept normalized model entries The loader normalizes each catalog model entry into a ModelCatalogProfile instance (not a raw dict), so asserting model_type in model_cfg fails with TypeError on the Pydantic model. Accept both the raw dict form and the normalized instance via getattr. Verified in-container: 8 passed. * Fix: sync model health tests with inference params and rerank URL normalization * Fix: sync model tests with unified provider dispatch and consts.model imports * Fix: register consts.model and nexent.core.agents stubs in tests blocked by model_management_db import chain * Fix: harden provider SSRF guard with post-DNS IP validation and restore TLS verification * Fix: resolve SonarCloud quality gate findings (complexity, log injection, warnings, duplication) * Fix: reduce cognitive complexity and eliminate duplicated blocks flagged by SonarCloud * Fix: remove legacy dialogs duplicated by V2, sanitize catalog logging, resolve remaining SonarCloud issues * Fix: sanitize catalog version with json.dumps and clear remaining SonarCloud issues * Fix: stop logging file-derived catalog version and flatten handleSave max-tokens logic * Fix: resolve SDK httpx Timeout class for httpx2-based OpenAI builds * Fix: route capacity suggestion through managed thread pool and make stopwords loading race-tolerant --------- Co-authored-by: hzw <hzw@qq.com> Co-authored-by: ljy <ljy@DESKTOP-65OBISN.(none)> | 13 天前 | |
♻️ Add Unitest and fix node.js server env read | 9 个月前 | |
Xyq/refactor card (#4014) * refactor(resource): unify repository resource cards Use the shared resource grid and card shell for Agent, MCP, and Skill repository listings while preserving their existing search, filtering, pagination, and actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): share resource create cards Route Agent, MCP, and Skill create-card entry points through the shared CreateResourceCard and use the shared grid for Agent and Skill mine lists. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): share mine resource card shells Apply the shared ResourceCard shell to Agent, MCP, and Skill mine-resource cards while retaining their existing content and actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resource): align public repository card actions Use the shared card's stacked footer layout for Agent, MCP, and Skill repository listings so metadata and actions remain consistent across resource types. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): split tab content components Move repository, my-agent, and review-center tab content behind same-level components and expand the card grids to four desktop columns.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): move my agent view Place the complete my-agent view beside the route page and preserve its resource-card grid behavior.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agent-space): resolve moved my agent imports Update relative component imports after moving the my-agent view and keep layout regression coverage aligned.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): remove legacy tab views Delete duplicate repository and review tab implementations after moving them into dedicated components.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): localize detail dialogs Move repository copy and detail dialogs into the repository tab and version detail into the my-agent tab.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agent-space): localize tab state and queries Move list, filter, pagination, detail, and mutation state into each tab view. Keep tab counts on the page and preserve filters across tab switches while disabling inactive queries. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): use shared cards and pagination Render repository listings with ResourceCard and delegate server pagination to ResourceCardGrid. Rename the view to space.tsx and remove the unused agent card adapter and pagination controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): streamline repository card actions Open repository details from the card, move copying into the action menu, show versions as title badges, and place authors in the card footer. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * feat(agent-space): adapt repository cards to the viewport Use Ant Design breakpoints and measured card-region height to select the server page size. Constrain ResourceCardGrid rows to the available viewport space. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): clamp card descriptions to available height Reduce repository-card description lines as card rows shrink and make the shared card description overflow-safe. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): fit repository cards within viewport Remove duplicate tab spacing and reserve the responsive page bottom padding when sizing the card grid. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): match repository card minimum height Use the shared card minimum height when calculating responsive rows so cards and pagination remain within the viewport. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(agent-space): reposition repository card actions Move copying to the card footer and show download counts beside repository names. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): defer four-column repository layout Keep repository cards in three columns through xl and use four columns only at the xxl breakpoint. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): keep lg repository cards in two columns Limit the repository grid to two columns through lg, then use three columns at xl and four at xxl. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(resource-card): align small-screen grid breakpoint Start the two-column resource grid at 576px so CSS matches Ant Design responsive state and pagination capacity. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): emphasize repository copy action Use a bordered default button for copying repository agents from the card footer. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): strengthen repository copy button Increase the copy action size and use the primary button treatment for a clear visual affordance. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): simplify my agent toolbar Remove redundant import and create-agent toolbar actions, align tag filtering with search, and reuse the shared resource pagination component. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): reorganize my agent card actions Move evaluation into the card overflow menu and keep editing in the lower-right action area. Reposition version, lifecycle status, repository status, and creation date for clearer scanning. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): consolidate repository status badge Show the listed version status beside the agent name and remove the redundant Hub badge. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): use blue badge for listed agents Match the listed repository status badge to the former Hub blue styling. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): clarify current version label Change the agent card version label to Current Version and add a primary color indicator for the active version. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * fix(agent-space): align lifecycle badge with more menu Place the published or draft badge beside the card menu so both share the top-right header alignment. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): place lifecycle badge below more menu Stack the published or draft badge below the top-right menu to match the card header layout. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): unify repository version display Show the repository card version with the current-version label and typography used by my agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): unify my agent action button style Use the repository card text-button treatment for editable and read-only my agent card actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agent-space): fill my agent grid to viewport Measure the available viewport height and distribute my agent cards across responsive grid rows. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(mcp-space): split tab content into components Move MCP repository, mine, and review content into focused components and keep shared actions in a controller. Match agent-space page spacing and tab styling while preserving existing interactions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(mcp-space): keep three tab components Consolidate the MCP tab content into space, my-mcp, and review-center files while keeping the page focused on tab selection and preserving shared interactions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(skill-space): split three tab views Move repository, mine, and review state and actions into their corresponding components. Keep the route focused on tab selection and align its spacing and tabs with the other spaces. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(mcp-space): refine repository card actions Move downloads beside the more menu, show the publisher in the metadata row, and make installation the sole footer action. Open the detail modal when the card itself is clicked. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(mcp-space): align repository card footer Match the agent repository card layout by placing the publisher and install action in the same inline footer row. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(agent-space): align repository download action Place the repository download count in the top-right action area so it remains adjacent to the conditional more menu.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agent-space): align repository search height Use the default Ant Design input height so the repository search field matches the adjacent tag filter button. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): match repository copy button styling Use the same transparent text-button treatment as My Agent card actions for repository copy controls, and add a regression assertion. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5-codex * fix(mcp-space): align search filter control heights Match the MCP search input and status select height to Ant Design's default tag filter button height. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol Co-authored-by: Cursor <cursoragent@cursor.com> * fix(mcp-space): match repository action button style Use the same borderless text-button treatment as the Agent repository card while keeping installed repository entries disabled. Co-authored-by: Cursor <noreply@cursor.com> Generated-by: gpt-5.6-sol * refactor(mcp-space): align responsive repository cards Align Agent and MCP repository layouts, and simplify My MCP card actions for direct editing and compact controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): align repository status badges Place the repository listing status beside the lifecycle state on My Agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(resource): top-align card header actions Align multi-line header action groups from their top edge so adjacent controls stay level. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agent-space): center repository header actions Keep the download indicator vertically aligned with the adjacent more menu in repository cards.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): align mine card header actions Keep the more menu beside the health-check action while the review badge stays below it.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): group mine card header actions Place health check and more actions on the first header row, with the review badge beneath them.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(mcp-space): right-align mine review badge Align the review status badge below the more action at the card header's right edge.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * refactor(mcp-space): unify card grid pagination Use ResourceCardGrid for repository and mine MCP cards so pagination follows the shared responsive layout.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(resource): always show card pagination Keep the shared pagination control visible for single-page card lists.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * fix(resource): reserve space for card pagination Include the always-visible pagination area in responsive card grid height calculations.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5-codex * docs(skill-repository): document card design Document the approved Skill repository card layout and implementation plan. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(skill-repository): align cards with resource grid Use responsive ResourceCardGrid pagination and streamline Skill repository and My Skills card actions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): refine card metadata layout Square Skill search controls, move filtering beside search, reserve tag space, and show repository authors. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): enforce card metadata layout Apply square controls without relying on CSS ordering and display the repository submitter when author is absent. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): match agent search controls Use the Agent repository search radius and default filter button styling in both Skill tabs. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): use default component radius Remove the Skill page radius override so Ant Design controls match the Agent repository. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): render listing tags directly Render repository tags as direct ResourceCard content while preserving empty tag space when no tags exist. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): show managed Skill tags Populate My Skill cards from structured tag assignments with a legacy tag fallback. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(skill-repository): use default description lines Remove the two-line override from Mine Skill cards so descriptions use the shared ResourceCard three-line default.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(resource-cards): align default action styles Use default small text-button styling in Agent and MCP cards, keep the Agent page full height, and rename the Chinese MCP page title.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(resource-cards): remove temporary layout tests Remove the Agent and Skill layout test files created during the refactor-card work.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(resource-cards): remove remaining temporary tests Remove the remaining Agent and MCP layout test files requested for the refactor-card branch.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * docs(skill-repository): remove temporary plans Remove the Skill repository design and implementation plans created for this branch.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * test(skill-repository): isolate managed tag lookup Mock tag assignment lookups in Skill repository service unit tests so they do not connect to PostgreSQL.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * docs(agents): add card editor design Document the approved Light-mode plan for the independent Agents card list and editor extraction. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): add card-based agent entry Split the Agents route into an independent card selector, centered detail modal, and selector-free editor. Keep agent actions and version management in the route shell. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): align card picker layout Use responsive Row and Col breakpoints for the Agents card picker, add the create card, and align card actions with My Agents. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * feat(agent-list): add filtered pagination Add a paginated agent-list endpoint with permission, tag, and search filters. Expose display metadata and evolve useAgentList with a parameter-object API while preserving legacy callers. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * refactor(resources): share agent detail dialogs Move agent detail dialogs to a shared resource container and expose card actions through the Agent menu. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): simplify detail actions Keep management actions in the card menu and limit the detail dialog to resource information. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): enrich resource detail Present Agent metadata and related resources in the shared detail dialog. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): restyle agent detail dialog Align the agent detail dialog with the resource-card reference while keeping cancel and edit actions fixed in the footer.\n\nThe agents page already renders this component, so no page integration change is needed.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): align detail metadata Render agent metadata with stable label and value columns, show the available creation date, and remove the duplicate current-version row.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): truncate tool descriptions Keep built-in tool descriptions to a single line in the detail dialog and use an ellipsis for overflow.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * refactor(agents): remove header config actions Remove AgentConfigActions from the agents header selector while preserving per-card actions.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5 * fix(agents): clarify unpublished version state Keep the agent configuration workspace white and reserve the current-version state for published versions. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): whiten repository page padding Use a white page surface so the agent repository padding no longer appears gray. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): hide draft card version label Show the current-version subtitle only for published agent configuration cards and leave version management behavior unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): honor card-level delete permissions Use each agent card permission for menu deletion while preserving editor-level read-only behavior. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * style(agents): refine card edit hover state Keep the edit action background transparent and highlight its text and icon in blue on hover. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * style(repository): refine card action hover state Apply the transparent blue hover treatment to interactive footer buttons in agent, MCP, and skill repository cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(repository): preserve disabled card actions Skip custom hover styling when an installed MCP repository card action is disabled. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agent-space): use shared card footer Move my-agent card metadata and actions into ResourceCard so its footer layout and hover behavior match other repository cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): split editor into dynamic route Keep the agents index focused on cards and route agent configuration through the selected agent id. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * refactor(agents): use paged agent list Delegate agent search and pagination to useAgentList so the card page only renders the returned page of results. No new test added per user request; existing type and route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): defer card detail requests Avoid loading agent details while card action menus mount; detail requests remain on agent selection and detail-dependent actions. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): prevent editor reload on return Ignore editor reload effects after the user starts returning to the agent card list, preventing a transient route flicker. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * feat(agents): open versions from card menu Add a version management action to each agent card menu and open the existing version dialog for the selected agent. No new test added per user request; type and related route checks pass. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): make search input fill available width Remove its maximum-width utility so the agent search input occupies its container. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5-codex * fix(agents): rebind NL2Agent on agent load Recreate the NL2Agent runtime when its target Agent initializes so requests use the editable Agent. Remove the stale unavailable notice. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-5 * fix(agents): show per-agent icons in configuration Use uploaded icons on agent cards and details, and select stable fallback icons from both list and published agent IDs. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * fix(agents): include icon URLs in agent lists Expose each stored icon URL in the agent list projection so configuration cards can load uploaded icons instead of falling back to generated defaults. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * fix(agents): refresh cards after icon upload Invalidate cached agent lists after a successful icon upload so returning to the card page reads the stored icon URL immediately. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * refactor(agents): colocate editor files with agent route Move editor-only components under [agentId] and fold route loading into agent-editor. Keep list and shared version components at the agents root. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): render editor directly from route page Remove the single-use editor wrapper and place the editor workspace in the [agentId] page. Update route-focused tests to read the page directly. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): remove unused editor components Delete seven components that are unreachable from runtime pages and remove tests tied to the obsolete agent selector header. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): group capability and debug components Rename capability component directories, group editor debug components, and move version comparison helpers into the shared versions directory. Update cross-page imports without changing behavior. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): shorten capability and debug directory names Rename shared and editor capability directories to capability and the editor debug directory to debug. Update imports and keep agent-capability.tsx as a sibling file. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): rename debug compare panel file Rename the editor debug comparison component file and update its import to match the shorter directory naming. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-space): load my agents through useAgentList Move My Agents pagination and creator filters to the agent list API, and load repository state only when a user opens a menu or detail view. Keep tab counts and version metadata available without preloading listings. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): open my agent details from card click Connect the My Agents card body to its existing detail handler so users can open agent details directly from the card. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(agent-space): redesign my agent detail modal Present My Agents details in a compact card layout with version and listing status, resource sections, and an edit action. Keep the other agent-space detail dialogs unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): show saved icons in my agents Carry icon_url from the agent list into My Agents cards and details. Use the saved icon when present and getAgentIcon as the fallback. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(agent-repository): support uploaded listing icons Use agent ID defaults for listings and store custom repository images independently from editable agents. Rename repository icon to nullable icon_url, add a migration, and share image storage validation. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-repository): align listing icon upload UI Use the agent editor avatar upload pattern for repository listing while retaining local preview and deferred upload. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-repository): accept selected tags from all definitions Use the same saved tag assignments for listing display and submission so non-category selections satisfy validation. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * chore(agent-repository): remove listing tag hint Remove the tag hint from the listing dialog and delete its unused translations. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): refresh pending review count for admins Keep the pending review count query active for administrators so listing submissions refresh the review badge without opening the review tab. Add a browser regression case for the inactive tab. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(mcp-space): show connection status on MCP cards Show per-card connectivity results below MCP names so checks remain visible after the toast closes. Add localized labels and an end-to-end regression test. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * feat(mcp-space): add colored connection status dots Add gray, green, and red indicators beside the card status labels for unchecked, successful, and failed checks. Extend the end-to-end test to verify each visual state. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(mcp-space): show health checks only on cards Remove health-check success and failure toasts now that each MCP card shows its latest result. Keep the existing automatic disable behavior for failed checks. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agent-detail): share My Agents detail component Move the My Agents detail dialog into shared agent components and preserve its existing data and actions. Keep labels fully visible, truncate long values, and reduce dialog padding. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-detail): show bound tools and skills Resolve version resource IDs through the existing tool and skill catalogs so detail groups remain visible when snapshots omit names. Retain IDs if a catalog name is unavailable, and cover both cases with regression tests. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-detail): reduce dialog inner spacing Tighten the detail content and footer padding so the modal frame has less empty space while preserving readable controls. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent-space): show create card on every My Agent page Keep the create card visible across pagination and filters, including empty filtered results, so the reserved grid slot is used consistently. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): reuse shared agent detail dialog Map loaded agent records into the shared detail view and remove the page-specific dialog. Keep the card's edit navigation while omitting creation date and tool descriptions as requested. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(agents): share detail for repository listings Load each listing using the version_no stored on its repository record. Reuse the common detail modal in repository and review views, with repository metadata shown only for those views. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(mcp): align repository detail with agent dialog Replace the repository MCP detail modal with a shared component that follows the Agent detail layout. Preserve tool viewing and installation while keeping the repository card unchanged. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(resources): align skill detail and detail filenames Rename the MCP detail component to the singular form and replace repository Skill detail dialogs with a shared component matching the Agent and MCP layout. Preserve review and repository loading states. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * refactor(resources): use singular detail directories Move Agent and Skill detail components into their existing singular directories and update all page imports. Remove the now empty plural directories. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * docs(plans): remove branch-only agent card plan Remove the agent card editor plan from the feature branch so the PR contains only the intended implementation changes. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(e2e): remove branch-only browser specs Remove the two browser specs added only on xyq/refactor_card before opening the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(frontend): remove branch-only unit tests Remove the ten frontend test files added only on xyq/refactor_card before opening the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(frontend): remove remaining agent detail test Remove the branch-only myAgentDetail test under frontend/lib so neither same-named test remains in the develop PR. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(agent-repository): align listing icon request contract Update the stale request model test to use icon_url and assert that the field survives model serialization for the listing endpoint. Refs #4014. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * perf(agent): Enrich only visible agent page Load lightweight agent candidates for visibility, filters, and counts, then resolve model and tool availability only for the selected page. Preserve duplicate warnings across pages and show unavailable reasons on My Agent cards. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent): Refresh icons after upload Store a new icon revision on every upload and include it in agent icon requests so cards and list views bypass stale browser cache while unchanged icons retain the existing cache policy. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * fix(agent): separate legacy agent caches by tenant Include the legacy tenant input in the React Query key so tenant switches fetch and display the correct agent list. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6 * test(backend): align agent version and service module assertions Assert the version creation time returned by the existing query and include the agent icon storage service in the architecture inventory. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent): cover icon storage formats and persistence paths Verify JPEG, GIF, and WebP detection plus upload and read success and failure paths. Keep storage interactions isolated with in-memory test doubles. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent-db): cover agent list query helpers Verify selected columns, filters, ordering, and result mapping for agent list candidates. Cover empty and populated ID lookups without database access. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra * test(agent-api): cover list filters and icon upload errors Verify creator and asset owner tenant forwarding plus paged list 400 and 500 responses. Cover repository icon upload validation and authorization errors. Co-authored-by: Codex <noreply@openai.com> Generated-by: gpt-6-astra --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com> | 7 小时前 | |
feat(logging): 新增模型调用日志分类与路由能力 (#3952) * feat(logging): 新增模型调用日志分类与路由能力 1. 新增model_call日志分类,将SDK模型层日志与系统日志分离 2. 配置运行时服务日志同时包含runtime和model_call分类 3. 为core_agent、openai_llm等模型相关日志添加专用日志器 4. 新增.gitignore规则忽略.serena目录 5. 移除run_agent.py中多余的DEBUG日志级别设置 6. 完善.env.example日志配置注释 7. 新增完整的模型日志路由测试用例 * feat(logging): route context_evidence logger into model_call file - Add "context_evidence" to MODEL_CALL_LOGGERS so the run-level "Agent loop context evidence" record lands in the model_call category file (console + file_model_call, propagate=False) - Extend whitelist coverage and routing regression tests Co-authored-by: ZCode <noreply@zcode.ai> Generated-by: glm-5.3-flash * refactor(test): deduplicate model_call routing regression tests - Merge test_dictconfig_routes_model_records_to_dedicated_file and test_configure_logging_routes_model_records_to_dedicated_file into one parametrized test (ids: dictconfig / configure_logging) - Shared log+assert body extracted to _log_and_assert_routing helper; per-path setup moved to module-level _apply_* functions Co-authored-by: ZCode <noreply@zcode.ai> Generated-by: glm-5.3-flash * feat(logging): land model input/output body records in model_call file - Pin the MODEL_CALL_LOGGERS whitelist to DEBUG in both the dictConfig "loggers" section and configure_logging bind/unbind, and widen the file_model_call handler to DEBUG, so MODEL INPUT PARAMETERS logged at DEBUG on model_call.core_agent is no longer dropped by root INFO - Add the symmetric MODEL OUTPUT body record in core_agent - Merge the core_agent module logger into the model_call.core_agent namespace so every core-agent record routes to the model_call file instead of runtime; verified end-to-end (model records land only in model_call, runtime records unaffected, 41 logging tests pass) Co-authored-by: ZCode <noreply@zcode.ai> Generated-by: glm-5.3-flash * test: 增加核心代理日志记录相关的测试用例并添加调试日志 在 core_agent 的运行逻辑中添加调试日志以记录新任务,同时为日志记录功能新增多项测试,包括验证模型输出是否写入 model_call 日志、日志记录器名称是否保持在指定命名空间、日志参数是否正确记录到文件和面板等,确保日志功能符合预期且敏感数据被正确脱敏。 * fix(core_agent): 修复模型输出日志记录时未读取最新值的问题 调整日志记录的位置,确保在记录模型输出前已完成 model_output 的赋值,避免记录到空值或旧值 * refactor(logging): 将模型调用日志级别调整为跟随根日志级别 调整模型相关日志的级别设置,不再单独固定为DEBUG,而是跟随根日志级别。同时修改SDK中的模型输入、输出和任务日志从DEBUG级别改为INFO,确保在默认根日志级别为INFO时这些关键模型日志能正常输出。更新测试用例以匹配新的日志级别配置,同时修改日志配置文件中的相关注释和设置,使日志行为更符合预期,避免关键模型日志在默认配置下被丢弃。 --------- Co-authored-by: ZCode <noreply@zcode.ai> | 5 小时前 | |
Feat hzw 20260810 (#3920) * feat:model page * feat: 接入方式优化-需要回退 * ♻️ Refactor: unify model edit dialog onto ModelAddDialogV2 - ModelAddDialogV2: add model prop for edit mode (prefill custom form from existing model, default to 自定义接入 tab, call updateSingleModel/updateManageTenantModel on submit instead of add) - modelConfig.tsx: handleCardEdit now renders ModelAddDialogV2 with model prop instead of ModelEditDialogV2 * Feature: model capacity auto-lookup, custom param validation, and type inference fixes Capacity suggestion (catalog -> bundled LiteLLM JSON -> default): - model_capacity_suggestion_service: remove LLM self-report fallback (dead code, providers without web search always return null); add _litellm_lookup reading the bundled LiteLLM model_prices_and_context_window.json (3818 models) as the second source; match by provider/name and bare-name final segment, preferring entries with both max_input and max_output - main Dockerfile: bundle LiteLLM JSON at build time (works offline / no VPN) - suggest_capacity: try LiteLLM bare-name match even when provider is uninferable (base_url still empty while typing) Model add/edit dialog (V2): - custom tab: debounced auto-lookup on model name (500ms) fills empty capacity fields only; configured tag reflects lookup result, not display_name presence - connectivity probe no longer mutates capacity fields; probe carries temperature/top_p/extra_params so invalid __custom__ params surface at verify time as a 400 instead of failing at runtime - __custom__ numeric strings coerce to numbers (top_k=50, not 50); fix .trim crash on numeric values in edit mode - batch tab: add client-side model name search filter; per-row connectivity fills capacity from suggestion - edit mode: onConnectivityChange reports probe result back to the model list so connect_status refreshes in place Model config list: - verifyModels now probes ALL models in the list (was: default-model selection only), updating rows in parallel - remove misleading provider model-count badge; fix ModelConnectStatus duplicate declaration; drop unused DEFAULT_* imports Type inference (_infer_model_type_from_name): - match full name AND final path segment so repo-prefixed ids from aggregators (BAAI/bge-m3, Pro/..., deepseek-ai/...) classify correctly - add contains-based rules aligned with develop TokenPony classifier: embedding/rerank/stt/tts mid-name, vlm3 (omni/video), vlm2 (image-gen keywords), vlm (vision/visual/ocr/vl-segment) Connectivity service: - port develop _embedding_url_candidates multi-candidate probe (normalized /embeddings URL first, then as-given) for embedding/multi_embedding - _config_to_context: __custom__ KV pairs flow into extra_body at runtime - openai_llm check_connectivity probe carries inference params Type fixes: AgentDraft includes model_params_override; ModelEditDialogV2 keyMap adds vlm4; agent-prompt model override config dialog typing * Fix: rename llmModels to availableLlmModels after develop merge (useModelList API rename) * Fix: normalize rerank probe URL to the rerank endpoint The batch-import connectivity probe passed the bare provider root (e.g. https://api.siliconflow.cn/v1/) straight to the rerank adapter, which POSTs the URL as-is -> 404 -> unavailable even though the model is fine. prepare_model_dict already appends /rerank when SAVING the model, so probe-time and save-time URLs disagreed. Mirror that munging in _perform_connectivity_check: dashscope roots get the api/v1 .../services/rerank/text-rerank/text-rerank path, others get {root}/rerank. Already-normalized URLs pass through untouched. This matches the embedding probe /embeddings normalization. * Fix: carry verified connect_status into batch-created model records Batch submit requires every enabled row to pass the connectivity probe (hasUnchecked gate), but the verified available result lived only in dialog state — the create endpoints never received it, so the backend reset connect_status to not_detected on insert and the freshly imported models showed as unverified in the list. The backend already honors this (create_model_for_tenant: connect_status = payload or NOT_DETECTED; ModelRequest has the field) — only the frontend was not sending it. Thread connectStatus through addCustomModel / createManageTenantModel request bodies and set it from the row state at batch submit time. * Remove legacy modify-or-delete models button and ModelDeleteDialog The button opened a 2000-line legacy panel whose single-row edit/delete duplicated the per-row actions (and used the old V1 edit dialog), and whose only unique capability was a narrow bulk-edit (same-provider key, timeout, capacity override). Bulk delete did not exist - deletion inside the panel was still one-by-one. - drop the top-bar button (Can model:update wrapper) - drop the capacity-coverage alert action that opened the same panel - remove isDeleteModalOpen state, ModelDeleteDialog import and instance - delete the orphaned ModelDeleteDialog.tsx (ModelEditDialog stays - it is still referenced by resource-manage ModelList) * Fix: show Chinese type labels for vlm2/vlm3/vlm4 in model list The type column rendered t(`model.type.${type}`) directly, but the locale files have no model.type.vlm2/vlm3/vlm4 keys (they are keyed by semantic name: imageGeneration / videoUnderstanding / audioUnderstanding), so those rows displayed the raw id string. Add the same id-to-semantic-key mapping the add dialog uses, covering all ten types. Also aligns vlm to the dialog label (image understanding) instead of the legacy model.type.vlm wording. * Fix: address CodeQL security alerts in provider fetch and catalog endpoints SSRF (critical) in openai_provider.get_models: the operator-supplied base_url was fetched as-is. Add _validate_provider_base_url guard before the request: scheme must be http/https, host required, private / link-local / multicast / reserved IP literals rejected (cloud metadata endpoints, internal routers). Plain DNS names and the documented localhost/127.0.0.1 local-LLM exemption are allowed. Validation errors flow through the existing _classify_provider_error path as provider fetch failures. Information exposure (medium x5) in model_managment_app catalog endpoints: the exception text was interpolated into the JSON response body, which can leak stack traces / internal details to the caller. Replace with fixed messages; the exception detail is already logged server-side via logger.warning. Affected: /catalog/all, /catalog/providers, /catalog/inference_field_specs, /catalog/providers/{provider}/models, /catalog/providers/{provider}/models/{model_name}. * Fix: address Copilot review findings in tests and catalog wiring Real bugs (blocked the unit-test CI job): - test_model_consts.py: corrupted multi-byte string literal (truncated mid-character) made the module unparseable; restore the intended default title assertion. - test_model_catalog_loader.py: read p.provider_key / get_model_profile(p.provider_key, ...) but the Pydantic ModelCatalogProviderInfo model exposes id; align to the actual field. Latent issues flagged by review: - model_managment_app.py: the catalog-import fallback handler logged via the module logger before it was initialized, raising NameError on the graceful-degradation path; log via logging.getLogger directly. - useModelCatalog.ts + types: provider summary declared provider_key/supported_model_types while /catalog/providers serializes id/supported_types (Pydantic dump). Align the frontend type and hook maps to the wire names. ModelCatalogModelEntry.provider_key stays as is - the /catalog/all model entries do carry provider_key. * Fix: catalog loader test must accept normalized model entries The loader normalizes each catalog model entry into a ModelCatalogProfile instance (not a raw dict), so asserting model_type in model_cfg fails with TypeError on the Pydantic model. Accept both the raw dict form and the normalized instance via getattr. Verified in-container: 8 passed. * Fix: sync model health tests with inference params and rerank URL normalization * Fix: sync model tests with unified provider dispatch and consts.model imports * Fix: register consts.model and nexent.core.agents stubs in tests blocked by model_management_db import chain * Fix: harden provider SSRF guard with post-DNS IP validation and restore TLS verification * Fix: resolve SonarCloud quality gate findings (complexity, log injection, warnings, duplication) * Fix: reduce cognitive complexity and eliminate duplicated blocks flagged by SonarCloud * Fix: remove legacy dialogs duplicated by V2, sanitize catalog logging, resolve remaining SonarCloud issues * Fix: sanitize catalog version with json.dumps and clear remaining SonarCloud issues * Fix: stop logging file-derived catalog version and flatten handleSave max-tokens logic * Fix: resolve SDK httpx Timeout class for httpx2-based OpenAI builds * Fix: route capacity suggestion through managed thread pool and make stopwords loading race-tolerant --------- Co-authored-by: hzw <hzw@qq.com> Co-authored-by: ljy <ljy@DESKTOP-65OBISN.(none)> | 13 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 4 小时前 | ||
| 4 小时前 | ||
| 19 天前 | ||
| 5 天前 | ||
| 4 小时前 | ||
| 20 天前 | ||
| 4 小时前 | ||
| 9 小时前 | ||
| 7 小时前 | ||
| 24 天前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 4 小时前 | ||
| 5 小时前 | ||
| 1 年前 | ||
| 13 天前 | ||
| 24 天前 | ||
| 13 天前 | ||
| 13 天前 | ||
| 13 天前 | ||
| 9 个月前 | ||
| 7 小时前 | ||
| 5 小时前 | ||
| 13 天前 |