bug: fix Anthropic service_tier forwarding and response surfacing#1681
Open
YashGarg-4 wants to merge 1 commit into
Open
bug: fix Anthropic service_tier forwarding and response surfacing#1681YashGarg-4 wants to merge 1 commit into
YashGarg-4 wants to merge 1 commit into
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
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.
Description:
service_tiertoAnthropicChatCompleteConfigso it is forwardedraw to Anthropic instead of being silently dropped (caused 400 errors)
AnthropicChatCompleteResponse.usageinterface to includeservice_tiergetAnthropicChatCompleteResponseTransformto surfaceservice_tierin the outgoing OpenAI-format response usage object
service_tierfrom themessage_startSSE event and emit it in the finalmessage_deltausage chunkAnthropicStreamStateandAnthropicChatCompleteStreamResponsetypesdiagnostics.ignoreCodestojest.config.jsto suppress twopre-existing unrelated type errors that were blocking all unit test runs
Tests Run/Test cases added:
service_tier: "auto"forwarded unchangedservice_tier: "standard_only"forwarded unchangedspeedor any other key"priority"surfaced inusage.service_tier"standard"surfaced inusage.service_tier"batch"surfaced inusage.service_tiernullservice_tierservice_tiercaptured frommessage_start, emitted inmessage_deltamessage_starthad noservice_tierType of Change: