Repository navigation
fix(codearts): cool down accounts when credits are exhausted - #665
Merged
Merged
Conversation
TM.00001050 (积分已耗尽) was classified as invalid_request on HTTP 400, so the exhausted account stayed in rotation. Treat that code and the exhausted-credit wording as quota so the executor cools the account until local midnight and fails over.
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
TM.00001050(积分已耗尽)was classified asinvalid_requestwhen the upstream returned HTTP 400, so the account did not enter cooldown and stayed in rotation.unavailable. Both forms now map to quota. The executor cools that account until local midnight and fails over. Rate-limit codeTM.00001041is unchanged.Test plan
go test -count=1 -run 'TestClassify|TestPreflightSSE|TestImporterAndClassifier' ./internal/providers/codearts/go test ./...go vet ./...cd worker && npm testcd frontend && npm run build && npm run lintchangelog/unreleased/codearts-credit-exhausted-cooldown.md