Skip to content

fix(model): stop sending hidden form.provider as modelFactory + relocate script + UI layout fix#3332

Merged
Dallas98 merged 4 commits into
ModelEngine-Group:developfrom
liudfgoo:fix/model-single-add-clean
Jun 29, 2026
Merged

fix(model): stop sending hidden form.provider as modelFactory + relocate script + UI layout fix#3332
Dallas98 merged 4 commits into
ModelEngine-Group:developfrom
liudfgoo:fix/model-single-add-clean

Conversation

@wuyuanfr

@wuyuanfr wuyuanfr commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix: single-add model dialog no longer sends hidden form.provider as modelFactory
  • Refactor: move generate_backfill_sql.py to deploy/sql/migrations/
  • Fix: preserve embedding legacy inference logic, extend VLM only for tokenpony catalog check
  • Fix(UI): reorganize agent config layout — maxSteps+provideSummary on row1, outputReserve+verification on row2

Changes

1. Frontend fix (ModelAddDialog.tsx)

  • Removed modelFactory: form.provider from single-add save paths
  • Backend Pydantic default OpenAI-API-Compatible now applies correctly

添加单个自定义模型,例如deepseek, save落库的时候仍然是 OpenAI-API-Compatible(前端显示自定义模型)而非modelengine,模型列表展示deepseek图标:
img_v3_02134_0cfc7eca-8810-44b6-acf3-9047748a19ag
img_v3_02134_7e1e2a2b-408c-43b7-b844-beb4e86cc91g

2. Script relocation

  • scripts/generate_backfill_sql.pydeploy/sql/migrations/generate_backfill_sql.py
  • Matches migration script location conventions

3. Backend inference fix (model_health_service.py)

  • Embedding/multi_embedding: keeps legacy logic (only dashscope recognized)
  • VLM: uses extended inference so tokenpony URLs trigger catalog healthcheck
  • Prevents unintended behavior change for embedding models

embedding的provider 识别保留旧逻辑,除dashscope外都是 OpenAI-API-Compatible
单个模型添加正常:
image
image

4. UI layout fix (AgentGenerateDetail.tsx)

  • Row 1: 智能体运行最大步骤数 + 提供运行摘要
  • Row 2: 输出预留 + 自验证
  • Previously: Row1 had 3 items, Row2 had only outputReserve

修改后 2*2 两行布局:
image

wuyuanfr added 3 commits June 29, 2026 18:44
…le-add

Single-add mode has no provider dropdown — form.provider stays at its
hidden default 'modelengine', which was forwarded as modelFactory to
the backend, overriding the Pydantic default 'OpenAI-API-Compatible'.

Introduced in 4becd69 which added modelFactory: form.provider to both
save paths but missed the isBatchImport guard already present on the
suggest-capacity path in the same commit.

STT/TTS paths are unaffected — they set modelFactory from
form.sttProvider/ttsProvider downstream. Embedding is unaffected —
backend _infer_model_factory overrides from base_url.
The script's sole purpose is generating SQL migration files that live
in deploy/sql/migrations/. Keeping the generator alongside its output
is more natural than a standalone top-level scripts/ directory.

- Updated _project_root path (three levels up instead of one)
- Updated docstring usage path and generated SQL self-reference
- Removed empty scripts/ directory
- Embedding/multi_embedding keeps old logic (only dashscope recognized)
- VLM uses extended inference so tokenpony URLs can trigger catalog healthcheck
- Prevents unintended behavior change for embedding models
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wuyuanfr wuyuanfr changed the title fix(model): stop sending hidden form.provider as modelFactory on single-add + relocate generate_backfill_sql.py fix(model): stop sending hidden form.provider as modelFactory + relocate script + UI layout fix Jun 29, 2026
@Dallas98 Dallas98 merged commit 3b2907f into ModelEngine-Group:develop Jun 29, 2026
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.

2 participants