fix(model): stop sending hidden form.provider as modelFactory + relocate script + UI layout fix#3332
Merged
Dallas98 merged 4 commits intoJun 29, 2026
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…row1, outputReserve+verification on row2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
form.providerasmodelFactorygenerate_backfill_sql.pytodeploy/sql/migrations/Changes
1. Frontend fix (ModelAddDialog.tsx)
modelFactory: form.providerfrom single-add save pathsOpenAI-API-Compatiblenow applies correctly添加单个自定义模型,例如deepseek, save落库的时候仍然是


OpenAI-API-Compatible(前端显示自定义模型)而非modelengine,模型列表展示deepseek图标:2. Script relocation
scripts/generate_backfill_sql.py→deploy/sql/migrations/generate_backfill_sql.py3. Backend inference fix (model_health_service.py)
embedding的provider 识别保留旧逻辑,除dashscope外都是


OpenAI-API-Compatible单个模型添加正常:
4. UI layout fix (AgentGenerateDetail.tsx)
修改后 2*2 两行布局:
