fix(compat): add usage retention pruning and Anthropic error responses#127
Closed
mojomast wants to merge 1 commit intofollowup/pr126-usage-correctnessfrom
Closed
fix(compat): add usage retention pruning and Anthropic error responses#127mojomast wants to merge 1 commit intofollowup/pr126-usage-correctnessfrom
mojomast wants to merge 1 commit intofollowup/pr126-usage-correctnessfrom
Conversation
Collaborator
Author
|
Superseded by updates pushed to #123 to keep all MVP changes in one review thread. |
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
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.
Summary
USAGE_RETENTION_DAYSwith startup pruning and admin-triggered prune endpoint (POST /api/admin/usage/prune)/v1/messagesand/v1/messages/count_tokenswithout FastAPIdetailwrapping.env.exampleVerification
PYTHONPATH=src .venv/bin/python -m py_compile src/proxy_app/usage_recorder.py src/proxy_app/anthropic_errors.py src/proxy_app/routers/admin_api.py src/proxy_app/main.py tests/test_api_compat.py tests/test_usage_retention.py tests/test_auth.pyPYTHONPATH=src .venv/bin/pytest -q tests/test_api_compat.py tests/test_usage_retention.py tests/test_auth.pyPYTHONPATH=src .venv/bin/pytest -qImportant
Adds usage retention controls and Anthropic-style error responses, with tests and documentation updates.
USAGE_RETENTION_DAYSfor usage event retention, with startup pruning andPOST /api/admin/usage/prunefor manual pruning./v1/messagesand/v1/messages/count_tokensto return Anthropic-style JSON error payloads without FastAPIdetailwrapping.README.mdand.env.example.This description was created by
for 68d0163. You can customize this summary. It will automatically update as commits are pushed.