NAME

Langertha::Role::ParallelToolUse - Role for an engine that supports parallel tool calling control

VERSION

version 0.500

parallel_tool_use

parallel_tool_use => 1   # allow multiple tool calls per assistant turn
parallel_tool_use => 0   # restrict to one tool call per turn

Canonical boolean controlling whether the model may emit multiple tool calls in a single assistant turn. Translated per-engine to the provider's native parameter:

  • OpenAI-compatible engines send parallel_tool_calls in the request.

  • Anthropic-compatible engines send disable_parallel_tool_use => !parallel_tool_use in the tool_choice block.

For convenience the constructor also accepts the provider-native names as aliases and normalizes them:

# all three are equivalent
->new( parallel_tool_use         => 0 )
->new( parallel_tool_calls       => 0 )  # OpenAI name
->new( disable_parallel_tool_use => 1 )  # Anthropic name (inverted)

If unset the provider default is used (typically parallel enabled).

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

IRC

Join #langertha on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.