-
Notifications
You must be signed in to change notification settings - Fork 15
OpenAI GPT-5 improvements #9
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
Merged
+802
−24
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenAI's API rejects requests with duplicate tool call IDs. This fix filters out duplicate tool calls during Anthropic message conversion, keeping only the first occurrence of each unique tool call ID. - Add deduplication logic in convertToAnthropicMessagesPrompt - Add comprehensive unit tests for duplicate filtering - Fixes 400 errors when using OpenAI models with tool calls 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Instead of marking all properties as required for OpenAI, now preserves the original schema's required fields and additionalProperties settings. This prevents validation errors when optional fields are not provided. - Only use existing required array if present - Preserve original additionalProperties value - Fixes overly strict schema validation for OpenAI models 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
When ANYCLAUDE_DEBUG env var is set, captures full HTTP request/response data for 4xx errors (except 429) to temp JSON files for debugging. - Add writeDebugToTempFile helper function - Capture errors from Anthropic proxy, provider errors, and streaming - Write debug info to /tmp/anyclaude-debug-{timestamp}-{randomId}.json - Print temp file path to console for easy access - Helps diagnose API compatibility issues across providers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…low|medium|high and forwards as reasoning.effort; updates help
- Extract duplicate filtering logic into separate module (filter-duplicates.ts) - Add comprehensive validation to ensure tool call/result consistency - Verify order preservation and detect orphaned tool results - Enhance debug logging to capture full stream dumps - Include original vs filtered message counts in debug output - Add stream timeline with timestamps for all chunks - Improve error context with request/response metadata This helps diagnose sporadic OpenAI server errors that occur after extended conversations with duplicate tool calls from Claude Code. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Debug file should not be tracked in version control 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Level 1 (default): Basic debug with error logging only - Level 2: Verbose debug with duplicate filtering details - Defaults to level 1 for any non-numeric value This reduces noise in debug output by hiding duplicate filtering messages unless explicitly requested with level 2. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ammario
added a commit
that referenced
this pull request
Aug 10, 2025
This reverts commit f42e039. I think this messed up some builds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A series of fixes for making GPT-5 reliable and effective with anyclaude.
UX changes
ANYCLAUDE_DEBUG
Codebase
Remaining issues