Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gateway/examples/openai-multi-provider-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * Multi-provider mode — put openai-header-router first. It writes
# the chosen provider into metadata["selected_provider"]. Each
# translator then runs only when that selection equals its own
# "provider-id". The "provider-id" doubles as the upstream cluster
# "providerId". The "providerId" doubles as the upstream cluster
# name, so it must match an entry in additionalProviders (id or as).
#
# --------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions gateway/gateway-controller/pkg/utils/llm_transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ func (t *LLMProviderTransformer) proxyUpstreamAuthPolicy(auth *api.LLMUpstreamAu

// proxyTransformerPolicy builds a translator policy for an additional provider's
// inline transformer. The provider's upstream name is passed to the translator
// as its "provider-id" param so it targets the correct upstream, and gates
// as its "providerId" param so it targets the correct upstream, and gates
// execution so the translator runs only when this provider is selected.
func (t *LLMProviderTransformer) proxyTransformerPolicy(transformer *api.LLMProxyTransformer, name, field string) (*api.Policy, error) {
if transformer == nil {
Expand All @@ -818,7 +818,7 @@ func (t *LLMProviderTransformer) proxyTransformerPolicy(transformer *api.LLMProx
params[k] = v
}
}
params["provider-id"] = name
params["providerId"] = name

condition := selectedProviderExecutionCondition(name, false)
return &api.Policy{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func TestLLMProviderTransformer_TransformProxy_AdditionalProviderTransformerIsCo
require.NotNil(t, transformerPolicy.ExecutionCondition)
assert.Contains(t, *transformerPolicy.ExecutionCondition, "anthropic-provider")
require.NotNil(t, transformerPolicy.Params)
assert.Equal(t, "anthropic-provider", (*transformerPolicy.Params)["provider-id"])
assert.Equal(t, "anthropic-provider", (*transformerPolicy.Params)["providerId"])
assert.Equal(t, "claude-sonnet-4-5-20250929", (*transformerPolicy.Params)["model"])
}

Expand Down