Skip to content

fix: OpenAI/Anthropic tool use interop logic for gpt-4.1 and denial casuing 500 error #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

netanelbi
Copy link

This PR fixes two bugs in OpenAI/Anthropic compatibility:

Tool responses for gpt-4.1 are now correctly serialized and visible to users.
Denied tool uses no longer result in error 500 due to message role ordering issues.

Fixes:

GPT-4.1 tool use responses were not shown due to serialization bug
Denied tool uses previously caused error 500 because of incorrect message sequence

Note:I did not test with Sonnet and have not conducted extensive testing.

…rdering

- Ensures tool responses are visible for gpt-4.1 tool calls
- Fixes bug where denying a tool use resulted in error 500 due to message role ordering

Fixes:
1. GPT-4.1 tool use responses were not correctly serialized, causing responses not to appear to the user
2. Denied tool uses previously caused 500 errors because of incorrect message sequencing
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