refactor(aibridge): consolidate key failover interceptor tests#26032
Open
ssncferreira wants to merge 1 commit into
Open
refactor(aibridge): consolidate key failover interceptor tests#26032ssncferreira wants to merge 1 commit into
ssncferreira wants to merge 1 commit into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7cec5a2 to
10db29f
Compare
a4ce49f to
e54a44b
Compare
10db29f to
e126bf3
Compare
e54a44b to
0d8660b
Compare
0d8660b to
96a8da9
Compare
e126bf3 to
2ba2851
Compare
96a8da9 to
425030a
Compare
312f185 to
d885ef1
Compare
425030a to
0c09405
Compare
ssncferreira
commented
Jun 5, 2026
Comment on lines
+442
to
+444
| if retryAfter := r.responseHeaders.Get("Retry-After"); retryAfter != "" { | ||
| w.Header().Set("Retry-After", retryAfter) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Drive by: aibridge was not forwarding the Retry-After header to clients in error responses (e.g., 429). More specifically, in the context of this PR, for the BYOK test case below, when the upstream responds with a 429. This is to keep the response logic consistent with the other interceptors to consolidate the tests.
0c09405 to
3d46b76
Compare
d885ef1 to
0873093
Compare
3d46b76 to
f38f8d5
Compare
0873093 to
b8b0b96
Compare
f38f8d5 to
d4e86bb
Compare
b8b0b96 to
00a11c2
Compare
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.

Consolidates the per-interceptor key-failover tests into a single table-driven
keyfailover_test.go, parameterized over the interceptors (messages,chatcompletions,responses) and modes (blocking and streaming).It keeps the two scenarios as separate tests:
TestInterception_KeyFailover(failover within a single interception) andTestInterception_AgenticLoopFailover(failover across an agentic-loop continuation). Same cases and assertions as before with far less duplication, reusing the sharedtestutilmocks (MockUpstream,MockServerProxier, fixture helpers).Closes https://linear.app/codercom/issue/AIGOV-396/consolidate-intercept-key-failover-tests-across-modes-and-providers
Closes https://linear.app/codercom/issue/AIGOV-395/share-a-single-mockupstream-helper-between-integration-tests-and
Note
Initially generated by Claude Opus 4.7, modified and reviewed by @ssncferreira