Skip to content

Conversation

@LuoPengcheng12138
Copy link
Collaborator

Description

Only camel/configs/openai_config.py and camel/configs/aihubmix_config.py declare parallel_tool_calls. Therefore, the only explicitly supported platforms are OpenAI/Azure OpenAI (which share the same configuration) and AihubMix (corresponding to camel/models/openai_model.py, camel/models/azure_openai_model.py and camel/models/aihubmix_model.py).

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there @LuoPengcheng12138 according to my test, given:
options = {
"extra_params": {
"project_id": "my_project",
"timeout": 30,
"api_version": "v1",
"azure_ad_token": "token_value",
},
"project_id": "my_project",
}

It processes the outputs to:
Init Params: {'timeout': 30, 'api_version': 'v1', 'azure_ad_token': 'token_value'}
Model Config: {'user': 'my_project', 'project_id': 'my_project'}

Is that what is intended? If so I have an enhancement PR that streamlines the process in #886

Comment on lines 645 to 655
try:
model_platform_enum = ModelPlatformType(options.model_platform.lower())
except (ValueError, AttributeError):
model_platform_enum = None
if model_platform_enum in {
ModelPlatformType.OPENAI,
ModelPlatformType.AZURE,
ModelPlatformType.AIHUBMIX,
}:
model_config["parallel_tool_calls"] = False

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to proceed if model_platform_enum is None?

Suggested change
try:
model_platform_enum = ModelPlatformType(options.model_platform.lower())
except (ValueError, AttributeError):
model_platform_enum = None
if model_platform_enum in {
ModelPlatformType.OPENAI,
ModelPlatformType.AZURE,
ModelPlatformType.AIHUBMIX,
}:
model_config["parallel_tool_calls"] = False
try:
model_platform_enum = ModelPlatformType(options.model_platform.lower())
if model_platform_enum in {
ModelPlatformType.OPENAI,
ModelPlatformType.AZURE,
ModelPlatformType.AIHUBMIX,
}:
model_config["parallel_tool_calls"] = False
except (ValueError, AttributeError):
model_platform_enum = None

Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to azure models tbh perhaps @4pmtong can take a look if you have since I think you raised this?

@nitpicker55555
Copy link
Collaborator

hi @LuoPengcheng12138 , thanks for this pr!
Because parallel_tool_calls may not be supported by all models and platforms, we need to test its support status across different providers.

In addition, we also need to verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided. Based on my tests, OpenAI requires this parameter to be removed if no tools are specified, and I have submitted a PR for this at camel-ai/camel#3706
.

If you find that other models or platforms have the same requirement, we should add the corresponding adaptations for them in this PR as well.

@4pmtong 4pmtong merged commit 793e25d into main Jan 18, 2026
6 checks passed
4pmtong added a commit that referenced this pull request Jan 18, 2026
Comment on lines +654 to +657
if model_platform_enum in {
ModelPlatformType.OPENAI,
ModelPlatformType.AZURE,
ModelPlatformType.AIHUBMIX,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about openai comptible, and why we specify AIHUBMIX here? seems not supported in eigent

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Camel, the parallel_tool_calls parameter exists only in openai_config and aihubmix_config. Among these, openai_config corresponds to the openai_model and azure_openai_model models. Although the aihubmix_model is not used in Eigent, this check is still retained for alignment with Camel. As for OpenAICompatibleModel, its model_config_dict in Camel is a native dictionary, making it impossible to determine whether the parallel_tool_calls parameter is present.

@LuoPengcheng12138
Copy link
Collaborator Author

camel-ai/camel#3706

hi @LuoPengcheng12138 , thanks for this pr!嗨,谢谢你的公关稿! Because parallel_tool_calls may not be supported by all models and platforms, we need to test its support status across different providers.由于 parallel_tool_calls 可能并非所有模型和平台都支持,我们需要测试其在不同提供商中的支持状态。

In addition, we also need to verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided. Based on my tests, OpenAI requires this parameter to be removed if no tools are specified, and I have submitted a PR for this at camel-ai/camel#3706此外,我们还需要验证这些平台是否要求在未提供任何工具时移除 parallel_tool_calls 参数。根据我的测试,OpenAI 要求在未指定任何工具时移除此参数,我已经为此提交了一个 PR,地址为 camel-ai/camel#3706 。 .

If you find that other models or platforms have the same requirement, we should add the corresponding adaptations for them in this PR as well.如果您发现其他模型或平台也有相同的要求,我们也应该在此 PR 中添加相应的适配内容。

Only camel/configs/openai_config.py and camel/configs/aihubmix_config.py declare parallel_tool_calls. And I will verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided.

@Wendong-Fan
Copy link
Contributor

camel-ai/camel#3706

hi @LuoPengcheng12138 , thanks for this pr!嗨,谢谢你的公关稿! Because parallel_tool_calls may not be supported by all models and platforms, we need to test its support status across different providers.由于 parallel_tool_calls 可能并非所有模型和平台都支持,我们需要测试其在不同提供商中的支持状态。
In addition, we also need to verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided. Based on my tests, OpenAI requires this parameter to be removed if no tools are specified, and I have submitted a PR for this at camel-ai/camel#3706此外,我们还需要验证这些平台是否要求在未提供任何工具时移除 parallel_tool_calls 参数。根据我的测试,OpenAI 要求在未指定任何工具时移除此参数,我已经为此提交了一个 PR,地址为 camel-ai/camel#3706 。 .
If you find that other models or platforms have the same requirement, we should add the corresponding adaptations for them in this PR as well.如果您发现其他模型或平台也有相同的要求,我们也应该在此 PR 中添加相应的适配内容。

Only camel/configs/openai_config.py and camel/configs/aihubmix_config.py declare parallel_tool_calls. And I will verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided.

we need to check from the model platform, not from camel's config part, since we support directly config passing using dict and the current model config maybe outdated

@LuoPengcheng12138
Copy link
Collaborator Author

camel-ai/camel#3706

hi @LuoPengcheng12138 , thanks for this pr!嗨,谢谢你的公关稿! Because parallel_tool_calls may not be supported by all models and platforms, we need to test its support status across different providers.由于 parallel_tool_calls 可能并非所有模型和平台都支持,我们需要测试其在不同提供商中的支持状态。hi,感谢您的公关!嗨,谢谢你的公关稿!因为 parallel_tool_calls 可能并非所有模型和平台都支持,所以我们需要测试其在不同提供商之间的支持状态。由于 parallel_tool_calls 可能不是所有模型和平台都支持,我们需要测试其在不同架构中的支持状态。
In addition, we also need to verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided. Based on my tests, OpenAI requires this parameter to be removed if no tools are specified, and I have submitted a PR for this at camel-ai/camel#3706此外,我们还需要验证这些平台是否要求在未提供任何工具时移除 parallel_tool_calls 参数。根据我的测试,OpenAI 要求在未指定任何工具时移除此参数,我已经为此提交了一个 PR,地址为 camel-ai/camel#3706 。 .另外,我们还需要验证这些平台是否需要在没有提供工具的情况下删除 parallel_tool_calls 参数。根据我的测试,OpenAI 要求在没有指定工具的情况下删除这个参数,我已经在补充提交了一个 PR,我们还需要验证这些平台是否要求在未提供任何工具时删除 parallel_tool_calls 参数。根据我的测试,OpenAI 要求在未指定任何工具时删除此参数,我因此已经提交了一个 PR,地址为。
If you find that other models or platforms have the same requirement, we should add the corresponding adaptations for them in this PR as well.如果您发现其他模型或平台也有相同的要求,我们也应该在此 PR 中添加相应的适配内容。如果您发现其他模型或平台有相同的要求,我们也应该在此 PR 中添加相应的适配。如果您发现其他模型或平台也有相同的要求,我们也应该在此 PR 中添加相应的改装内容。

Only camel/configs/openai_config.py and camel/configs/aihubmix_config.py declare parallel_tool_calls. And I will verify whether these platforms require the parallel_tool_calls parameter to be removed when no tools are provided.只有 camel/configs/openai_config.pycamel/configs/aihubmix_config.py 声明了 parallel_tool_calls 。我将验证这些平台是否要求在未提供任何工具时移除 parallel_tool_calls 参数。

we need to check from the model platform, not from camel's config part, since we support directly config passing using dict and the current model config maybe outdated我们需要从模型平台进行检查,而不是从 Camel 的配置部分进行检查,因为我们支持直接使用字典传递配置,而当前的模型配置可能已经过时。

I fully understand your meaning, so currently this can be split into two issues:

One issue is that for platforms like OpenAI, when no tools are used, the parallel_tool_calls parameter should be removed, as mentioned in camel-ai/camel#3706.

The other issue is that in Eigent, even when tool calls are involved and parallel_tool_calls is supported, I now disable the parallel_tool_calls parameter to avoid conflicts in tool return values.

Therefore, the part that needs to be enhanced in this PR is to check whether each model platform supports parallel_tool_calls, while the conflict issue between parallel_tool_calls and tools will be addressed in the Camel project.
cc @nitpicker55555

@LuoPengcheng12138
Copy link
Collaborator Author

LuoPengcheng12138 commented Jan 19, 2026

Based on the current research, only the openai_model and azure_openai_model support the parallel_tool_calls parameter. For openai_compatible_model,openrouter,litellm, although it may has a consistent interface, whether parallel_tool_calls takes effect depends solely on the specific model. Therefore, I will add a judgment for openai_compatible_model to prevent calls to the official OpenAI models and official Azure OpenAI models via the compatible interface. As for the conflict issue, it will be resolved by camel-ai/camel#3706.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Disable parallel tool calls for search agent in browser scenarios

6 participants