Skip to content

Commit

Permalink
fix: "Model schema not found" error only in agents (#12655) (#12760)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiandanfeng authored Jan 27, 2025
1 parent aad7e4d commit edc2978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/app/apps/agent_chat/app_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def run(
# change function call strategy based on LLM model
llm_model = cast(LargeLanguageModel, model_instance.model_type_instance)
model_schema = llm_model.get_model_schema(model_instance.model, model_instance.credentials)
if not model_schema or not model_schema.features:
if not model_schema:
raise ValueError("Model schema not found")

if {ModelFeature.MULTI_TOOL_CALL, ModelFeature.TOOL_CALL}.intersection(model_schema.features or []):
Expand Down

0 comments on commit edc2978

Please sign in to comment.