| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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)> | 1 个月前 | |
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> | 1 个月前 | |
refactor(backend): 按业务拆分 API、数据库与契约并统一网关鉴权 (#4160) * refactor(backend): organize service APIs and persistence modules * refactor(backend): centralize incoming authentication in gateway * test: remove stale database package imports from migrated fixtures * test: align relocation guards and memory retrieval mocks with canonical owners * refactor(backend): group business contracts, errors and constants * refactor(gateway): consolidate northbound routes and authentication * refactor(runtime): separate agent preparation and local execution Move business preparation, model bindings and resource lookup to canonical Management modules. Extract SDK run construction, workspace paths and local execution ownership into Runtime, preserving the Redis lifecycle bridge and assistant batch persistence behavior. Retain thin legacy imports and migrate callers and lookup-site unit mocks. Validate 66 isolated unit files (2179 passed, 5 existing skips), five formal component cases, source equivalence and architecture boundaries. Co-authored-by: Codex <noreply@openai.com> * refactor(backend): consolidate environment and pure constants * docs(contracts): clean stale constant comments * fix(gateway): constrain file proxy and repair migrated test imports * refactor(runtime): remove legacy agents import compatibility * fix(tests): repair CI isolation and benchmark root discovery --------- Co-authored-by: Codex <noreply@openai.com> | 4 天前 | |
feat(workbench): 统一资源选择组件,修复 Skill 流式创建与模型思考控制 (#4145) * feat(workbench): optimize resource controls, model settings and history pins Improve resource drawers, tags, creation actions, shared local model controls and server-backed history pins. Include regression assets and linked-dependency dev startup fixes. Keep the new six-entry model unification design and seven planned cases local. * feat(chat): unify model controls and refine workbench interactions Share model and reasoning controls across chat and creator flows. Refine workbench resource lists, creation actions and header defaults, and add regression coverage. * chore: add copyright headers to PR source files * fix: restore model control CI test compatibility * test: cover model control and workbench pin branches * fix(workbench): persist conversation pins and refresh remote history * refactor: simplify workbench pin schema * feat: pass temperature and top_p through model controls * fix: complete inline message edit regression coverage * test: initialize sampling state in system message fixture * fix: prevent advanced settings opening on model menu focus * feat: unify workbench resource pickers and chat controls * feat:前端修改工作台lint错误 * bugfix:修复技能创建失败,解析问题 * fix(frontend): align knowledge picker capabilities and AIDP metadata Gate ordinary-chat knowledge controls by the current Agent version and deployment source, rejecting stale capability responses. Hide document and chunk counts in shared AIDP selectors and the legacy conversation modal while retaining local statistics. Strengthen component regressions and record both changes in the feature catalog. Targeted frontend tests: 88 passed across the related suites; TypeScript, formatting and scoped picker/Composer lint passed. Existing full newchat page lint diagnostics remain. D4 caller regressions are blocked by missing per-case preparation declarations. * test: fix CI fixtures for model recovery and skill architecture Use a non-authentication response-header canary for private diagnostics coverage and assert its name and value remain redacted. Include the existing Skill stream parser in the exact Management service inventory and update change traceability. Validation: architecture unit tests 7 passed; MODEL-RECOVERY-D3-001 controlled HTTP/SSE integration PASS; formal asset validation including both UT change records and acceptance bindings passed; copyright and whitespace checks passed. * bugfix:去掉无意义注释 | 10 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 4 天前 | ||
| 10 天前 |