-
-
Notifications
You must be signed in to change notification settings - Fork 51
refactor: Move Anthropic translation layer to library #47
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
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
18f1dc6
feat(proxy): add Anthropic Messages API endpoint for Claude Code comp…
FammasMaz eabb999
feat(anthropic): add extended thinking support to /v1/messages endpoint
FammasMaz fcd33de
feat(anthropic): force high thinking budget for Opus models by default
FammasMaz 4236c19
fix: ensure max_tokens exceeds thinking budget and improve error hand…
FammasMaz bea58d4
fix(anthropic): properly close all content blocks in streaming wrapper
FammasMaz a615953
fix(anthropic): add missing uuid import for /v1/messages endpoint
FammasMaz fca4277
fix(anthropic): always set custom_reasoning_budget when thinking is e…
FammasMaz 63a0d86
feat(openai): auto-enable full thinking budget for Opus
FammasMaz 32c3f21
fix(anthropic): add missing JSONResponse import for non-streaming res…
FammasMaz 7a01e79
fix(anthropic): ensure message_start is sent before message_stop in s…
FammasMaz 1227d8c
feat: add /context endpoint for anthropic routes
FammasMaz 72b612c
Revert "feat(openai): auto-enable full thinking budget for Opus"
FammasMaz aef492b
Revert "fix(anthropic): always set custom_reasoning_budget when think…
FammasMaz 0e81ead
feat(anthropic): Add Pydantic models and translator for Anthropic format
tiesworkman1025 bd477ce
feat(anthropic): Add streaming wrapper and module exports
tiesworkman1025 7396891
feat(client): Add anthropic_messages() and anthropic_count_tokens() m…
tiesworkman1025 ef25099
feat(exports): Export Anthropic compatibility models from rotator_lib…
tiesworkman1025 9d30ea6
refactor(main): Use library for Anthropic format translation
tiesworkman1025 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it seems past-me got a bit ahead of himself! I specifically created
translate_anthropic_request()in the library to handle this translation, but then proceeded to duplicate the logic here manually.The thinking budget mapping logic (lines 1067-1089) is nearly identical to what I put in
translator.py(lines 283-304). This could lead to drift if one is updated without the other.I should either:
translate_anthropic_request()directly, or