Skip to content

Fix/override delete - #3950

Merged
jeffwu-1999 merged 8 commits into
developfrom
fix/override-delete
Sep 18, 2026
Merged

jeffwu-1999 merged 8 commits into
developfrom
fix/override-delete

Conversation

@lijiayang619

Copy link
Copy Markdown
Contributor

修复智能体配置页面自定义参数删除失败的问题
max token不生效的问题

ljy added 2 commits September 17, 2026 15:29
…y overrides take effect, and edit-dialog connectivity probe uses stored api_key

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new /temporary_healthcheck “reuse stored api_key” behavior can leak stored API keys to an arbitrary caller-supplied base_url unless additional safeguards are added.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR addresses two operator-facing issues in Nexent’s model/agent configuration flows: (1) custom parameter deletions in the agent “model params override” dialog not persisting, and (2) “max token”/capacity override values not taking effect at runtime.

Changes:

  • Frontend: introduces explicit merge/diff logic for extra_params.__custom__, persisting deletions as null markers instead of silently re-inheriting model-level values.
  • Frontend/Backend: adds an optional model_id to the temporary model healthcheck request so edit dialogs can validate connectivity without retyping an API key.
  • Backend: applies per-agent capacity override fields (W1/W2 capacity fields) from model_params_override into capacity resolution and runtime ModelConfig.
File summaries
File Description
frontend/services/modelService.ts Sends optional model_id in model connectivity verification payloads for edit-mode probes.
frontend/app/[locale]/models/components/model/ModelAdvancedSettings.tsx Adds utilities to merge/diff custom params and to persist deletions via null markers.
frontend/app/[locale]/models/components/model/ModelAddDialogV2.tsx Passes modelId during edit-mode verification to enable backend “reuse stored key” probing.
frontend/app/[locale]/agents/components/agent-prompt.tsx Updates override dialog state handling so deleted custom params do not reappear and are saved as explicit removals.
backend/consts/model.py Extends ModelRequest with model_id for edit-dialog connectivity probes.
backend/apps/model_managment_app.py Uses model_id to optionally fall back to the stored API key for /temporary_healthcheck.
backend/agents/create_agent_info.py Honors per-agent capacity overrides and supports null custom values as explicit removal markers at runtime.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread backend/apps/model_managment_app.py Outdated
Comment thread backend/agents/create_agent_info.py
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.76923% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/agents/create_agent_info.py 14.81% 20 Missing and 3 partials ⚠️
backend/apps/model_managment_app.py 33.33% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

ljy added 6 commits September 18, 2026 09:36
… spread into INSERT column lists, so a model_id field injected an explicit NULL primary key and broke model creation
…ModelRequest.model_dump() is spread into INSERT column lists, so any non-column field breaks model creation (Unconsumed column names)
…el slot - persistCustomLocalConfig now only writes the slot when it is empty (onboarding) or the submitted model already occupies it
…rd could still steal an occupied default slot when the cache was stale/empty. Default-slot writes now come only from the server (create-time backfill for empty/dangling slots)
…nfig guard could still steal an occupied default slot when the cache was stale/empty. Default-slot writes now come only from the server (create-time backfill for empty/dangling slots)"

This reverts commit 2376aa5.
…teway adapter's relative dirname chain resolved two levels short of the package root, so every probe silently fell back to a public URL that is unreachable in offline deployments. Anchor both probe copies on nexent.__file__ so the path survives module moves.
@jeffwu-1999
jeffwu-1999 merged commit 9713e78 into develop Sep 18, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants