Skip to content

Conversation

@Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Jul 30, 2025

Together doesn't mention supporting 'required' in its docs, and attempting to pass it in gives a generic 'Invalid request' error. This fixes a Together tool-calling test when running without the provider-proxy cache


Important

Maps tool_choice="required" to tool_choice="auto" in TogetherRequest to prevent errors with Together API.

  • Behavior:
    • Maps tool_choice="required" to tool_choice="auto" in TogetherRequest to avoid 'Invalid request' error from Together API.
  • Files:
    • Modifies together.rs to implement the mapping logic in TogetherRequest::new() function.

This description was created by Ellipsis for 22d02c2. You can customize this summary. It will automatically update as commits are pushed.

Together doesn't mention supporting 'required' in its docs,
and attempting to pass it in gives a generic 'Invalid request'
error. This fixes a Together tool-calling test when running without
the provider-proxy cache
Copilot AI review requested due to automatic review settings July 30, 2025 18:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a compatibility issue between TensorZero and the Together AI provider by mapping the unsupported 'required' tool choice to 'auto'. Together AI doesn't support the 'required' tool choice option in their API, which was causing generic 'Invalid request' errors during tool-calling operations.

  • Maps 'required' tool choice to 'auto' for Together AI provider compatibility
  • Adds import for OpenAIToolChoiceString to support the mapping logic

@virajmehta virajmehta added this pull request to the merge queue Jul 30, 2025
Merged via the queue into main with commit 5d24c92 Jul 30, 2025
32 checks passed
@virajmehta virajmehta deleted the aaron/together-required-auto branch July 30, 2025 20:49
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.

3 participants