Skip to content

preserve OpenAI parallel tool-call policy - #97

Closed
raine wants to merge 1 commit into
mainfrom
parallel-tool-policy
Closed

preserve OpenAI parallel tool-call policy#97
raine wants to merge 1 commit into
mainfrom
parallel-tool-policy

Conversation

@raine

@raine raine commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept both boolean values of parallel_tool_calls on shared OpenAI-compatible ingress
  • preserve the setting through Anthropic tool-choice policy and propagate it to Kimi and Grok upstream requests
  • keep native Codex Responses passthrough unchanged
  • document tool-choice precedence and validation behavior

Design

OpenAI parallel_tool_calls is the inverse of Anthropic tool_choice.disable_parallel_tool_use. The shared parser attaches that policy to the translated tool choice, synthesizing auto when the caller omits a choice. An explicit OpenAI value determines the translated policy without changing auto, none, required, or named-function selection.

Provider translators read the shared policy. Kimi and Grok emit the corresponding optional upstream parallel_tool_calls field. Codex uses the same reader for Anthropic Messages translation, while native /v1/responses continues forwarding the original request body.

Verification

The pre-commit Checkle hook passed:

  • format-check
  • clippy
  • build
  • test

Regression coverage includes both OpenAI routes, omitted and explicit tool choices, both boolean values, invalid values, Kimi and Grok translated upstream payloads, and native Codex passthrough.

OpenAI-compatible requests accepted serial tool execution without carrying that
constraint into provider translation, and rejected the standard parallel value.
This could silently reverse caller intent on non-Codex provider routes.

Encode the OpenAI setting in the established Anthropic tool-choice policy and
share its interpretation across Codex, Kimi, and Grok translators. Kimi and
Grok propagate the resolved value to their upstream APIs, while native Codex
Responses retains its passthrough behavior.

Cover both OpenAI routes, tool-choice modes, provider wire requests, validation,
and native Codex passthrough. Document accepted values and precedence.
@raine raine closed this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant