refactor(go-models): route Bedrock ListModels through ParseListModel (#15853)#15956
refactor(go-models): route Bedrock ListModels through ParseListModel (#15853)#15956hunnyboy1217 wants to merge 1 commit into
Conversation
…nfiniflow#15853) Bedrock's ListModels already signs and calls the AWS ListFoundationModels control-plane endpoint, but it hand-built bare ListModelResponse values. Map the AWS modelSummaries catalog into ModelList and enrich through the shared ParseListModel helper (issue infiniflow#15853), consistent with the other migrated providers. The empty-modelId guard is preserved (filtered before ParseListModel) so a malformed AWS response never leaks a blank entry to the UI. Also includes the shared gitee_test.go DSModelList->ModelList compile fix (infiniflow#15900 rename); it auto-resolves against the sibling infiniflow#15853 PRs. Existing TestBedrockListModelsParsesCatalog passes unchanged (names preserved; enrichment only adds fields). go build and go vet are clean.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR consolidates model catalog parsing by refactoring Bedrock's ChangesModel list parsing consolidation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Haruko386
left a comment
There was a problem hiding this comment.
@hunnyboy1217 please show your output in RAGFlow CLI for your code tests
What problem does this PR solve?
Part of #15853 (provider model-list refactor).
Bedrock's
ListModelsalready signs (SigV4) and calls the AWSListFoundationModelscontrol-plane endpoint, but it hand-built bareListModelResponse{Name}values. This maps the AWSmodelSummariescatalog intoModelListand enriches through the sharedParseListModelhelper, consistent with the other migrated providers.The empty-
modelIdguard is preserved (filtered beforeParseListModel) so a malformed AWS response never leaks a blank entry to the UI dropdown. Output is unchanged today (Bedrock model ids are not yet in all_models.json, so enrichment is a no-op), but Bedrock now benefits automatically once its models are added to the registry.Drive-by fix
Shared gitee_test.go
DSModelList->ModelListcompile fix (renamed in #15900); auto-resolves against the sibling #15853 PRs.Type of change
How has this been tested?