|
|
|
@ -356,7 +356,9 @@ class AgentNode(ToolNode):
|
|
|
|
|
|
|
|
|
|
|
|
def _remove_unsupported_model_features_for_old_version(self, model_schema: AIModelEntity) -> AIModelEntity:
|
|
|
|
def _remove_unsupported_model_features_for_old_version(self, model_schema: AIModelEntity) -> AIModelEntity:
|
|
|
|
if model_schema.features:
|
|
|
|
if model_schema.features:
|
|
|
|
for feature in model_schema.features:
|
|
|
|
for feature in model_schema.features[:]: # Create a copy to safely modify during iteration
|
|
|
|
if feature.value not in AgentOldVersionModelFeatures:
|
|
|
|
try:
|
|
|
|
|
|
|
|
AgentOldVersionModelFeatures(feature) # Try to create enum member from value
|
|
|
|
|
|
|
|
except ValueError:
|
|
|
|
model_schema.features.remove(feature)
|
|
|
|
model_schema.features.remove(feature)
|
|
|
|
return model_schema
|
|
|
|
return model_schema
|
|
|
|
|