feat(xai): support namespace tools and enhance tool normalization logic

- Added `namespace` tool type support, enabling nested tools to be normalized and moved to the top level.
- Refactored tool normalization logic into `normalizeXAITool` for reusability and clarity.
- Updated `xai_executor` test cases to validate namespace tool handling and nested tool normalization.
This commit is contained in:
Luis Pater
2026-05-17 15:02:36 +08:00
parent 8b3670b8dd
commit 74cb53dee1
4 changed files with 129 additions and 3 deletions
+2 -1
View File
@@ -349,7 +349,8 @@ func validateModelsCatalog(data *staticModelsJSON) error {
func validateModelSection(section string, models []*ModelInfo) error {
if len(models) == 0 {
return fmt.Errorf("%s section is empty", section)
log.Warnf("models catalog: %s section is empty, continuing without those model definitions", section)
return nil
}
seen := make(map[string]struct{}, len(models))