feat(provider): per-model and per-path upstreams (#8)

Add modelBaseUrls and pathBaseUrls to openai-type providers.
This commit is contained in:
2026-11-08 07:26:14 +00:00
committed by GitHub
parent aa9a925d49
commit a4fda5f9cb
10 changed files with 512 additions and 9 deletions
+1
View File
@@ -148,6 +148,7 @@ func setConcurrencyHeader(h http.Header, n int) {
// learning and the RateLimit-Policy header on w. The returned func must run
// when the upstream exchange ends.
func (g *Gateway) trackUpstream(ctx context.Context, w http.ResponseWriter, provider, model string) (context.Context, func()) {
ctx = withUpstreamModel(ctx, model)
c := g.concurrency
if c == nil {
return withAttemptRecorder(ctx, func(resp *http.Response, attemptErr error) {