Support per-target shadow policies in vanity gateway
@along-2017 is already working on this.
Since Sep 8, 2026.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Is this related to a problem? Please describe.
The vanity gateway can send a primary request to multiple shadow models, but every target currently shares one percentage, sampling method, and cancellation policy. Operators cannot independently control traffic volume or request lifetime for each shadow target.
Describe the solution you'd like
Add an additive shadows list to each OpenAI model route. Each entry should define its target model and may set its own percentage, sampling method, and cancellation policy.
Keep the existing shadowModelName, shadowModelNames, shadowPercentage, shadowSamplingMethod, and shadowCancelOnClientDisconnect fields working with their current shared-policy behavior. Reject configurations that mix the new and legacy forms on one route so precedence remains unambiguous.
Describe alternatives you've considered
Changing shadowModelNames from a string list to an object list would break existing configuration types. Adding parallel policy arrays would also be difficult to validate and could associate policies with the wrong target.
Additional context
Example:
shadows:
- modelName: private/example/shadow-a
percentage: 10
samplingMethod: perBearerKey
cancelOnClientDisconnect: true
- modelName: private/example/shadow-b
percentage: 50
samplingMethod: random
Shadow targets must continue to reference another model in the same OpenAI endpoint section. Multipart image edit and variation routes remain unsupported for effective shadow configuration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.