feat: 소비처 금액을 키 미터의 기간 지출로 (v0.72.0) - #119
Merged
Merged
Conversation
A consumer's amount was the sum of per-request costs, which only start where the gateway began sending them, so the column reported a fraction of the spend and a count of the requests it could not price. The vendor meters each key, and the difference between two readings is that key's spend in the window whether or not we priced its requests. Readings that drop are a limit-window reset, and the reconstruction adds the new reading whole rather than measuring a spend that never happened.
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.
📝 작업내용
meteredCostUsd추가: 공급자가 키마다 보고한 사용액에서 고른 기간의 몫만 뽑아 합친 금액llm_credit_usage_snapshots의 연속한 두 관측 차이이고, 보고값이 내려간 자리는 한도 창 리셋이라 새 값을 통째로 더함 (마지막에서 첫 값을 빼면 일어나지 않은 지출을 재게 됨)meteredObservedAt추가: 그 소비처의 키 가운데 가장 오래된 대사 시각attributedCostUsd와pricedRequests는 응답에 유지 (모델별과 호출 종류별 표가 쓰는 출처이고, 공급자는 키 단위로만 알려 주므로 그 표들은 이 값밖에 쓸 수 없음)⭐️ 검증
mvn verify1345건 통과ContractDriftTest재생성 diff는 필드 둘과 설명 하나와 버전뿐💬 리뷰 포인트