Refactor AI model configuration into shared YAML catalog for backend/frontend consistency #23
+701
−203
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.
Motivation for Change
Previously, the model list was scattered across multiple files (Go manager, strategy, front-end configuration, tests, etc.) and easily became disconnected from each other; now, with a single YAML catalog as the authoritative source, the back-end, front-end, and default fallback logic are all referenced uniformly, which greatly reduces the maintenance cost when adding or deleting models and eliminates display inconsistencies.
Change Summary
test
go test ./...
cd frontend && npm test -- --run
To reproduce the UI effect: After running
make install-localand restartingapi-testing, check the model dropdown in the settings panel.中文:
变更动机
之前模型列表散落在多个文件(Go manager、策略、前端配置、测试等), 在修改时容易遗漏;
现在通过单一 YAML catalog 为唯一来源,后端、前端和默认兜底逻辑都统一引用,大幅降低增删模型时的维护成本并消除显示不一致问题。
变更摘要
测试
go test ./...
cd frontend && npm test -- --run
如需复现 UI 效果:make install-local 后重启 api-testing,查看设置面板的模型下拉即可。