@@ -24,7 +24,6 @@ import (
2424
2525 "sigs.k8s.io/controller-runtime/pkg/log"
2626
27- "github.com/llm-d/llm-d-router/pkg/common/observability/logging"
2827 fwkplugin "github.com/llm-d/llm-d-router/pkg/epp/framework/interface/plugin"
2928 fwksched "github.com/llm-d/llm-d-router/pkg/epp/framework/interface/scheduling"
3029)
@@ -82,6 +81,9 @@ func Factory(name string, rawParameters *json.Decoder, _ fwkplugin.Handle) (fwkp
8281func NewHeaderPhaseProfileHandler (headerName , defaultProfile string ) * HeaderPhaseProfileHandler {
8382 headerName = strings .ToLower (strings .TrimSpace (headerName ))
8483 if headerName == "" {
84+ // defaultHeaderName is kept mixed-case for the README and for the tests that use
85+ // it as a mixed-case constructor input, so it needs the same normalization here
86+ // as any other headerName.
8587 headerName = strings .ToLower (defaultHeaderName )
8688 }
8789
@@ -104,7 +106,7 @@ func NewHeaderPhaseProfileHandler(headerName, defaultProfile string) *HeaderPhas
104106// handler, which decides which profiles to run via decider plugins.
105107//
106108// Two fallbacks keep single-stage and header-less traffic working without a different
107- // profile handler: with exactly one configured profile there is nothing to disaggregate ,
109+ // profile handler: with exactly one configured profile there is nothing to choose ,
108110// so that profile always runs regardless of the header (or its absence); with more than
109111// one configured profile, a request whose header is missing or blank runs defaultProfile
110112// instead of failing. A header naming a profile that isn't configured is still an error -
@@ -173,7 +175,7 @@ func (h *HeaderPhaseProfileHandler) Pick(ctx context.Context, request *fwksched.
173175 return map [string ]fwksched.SchedulerProfile {}
174176 }
175177
176- // With exactly one configured profile there is nothing to disaggregate : always run
178+ // With exactly one configured profile there is nothing to choose : always run
177179 // it, so a deployment scaled down to a single stage works without swapping profile
178180 // handlers or requiring every caller to send the header.
179181 if len (profiles ) == 1 {
@@ -191,9 +193,10 @@ func (h *HeaderPhaseProfileHandler) Pick(ctx context.Context, request *fwksched.
191193 profile , ok := profiles [resolvedPhase ]
192194 if ! ok {
193195 // A missing or unrecognized header value is a per-request client issue, not a
194- // system fault - log at DEBUG via Info, not Error, so it doesn't page anyone or
195- // drown out real errors: logr.Logger.Error always emits regardless of V-level,
196- // only Info is verbosity-gated.
196+ // system fault - log via Info, not Error, so it doesn't page anyone or drown out
197+ // real errors. It's still a once-per-request operational signal an operator needs
198+ // to see by default, so it's unguarded rather than gated behind a verbosity level
199+ // that's off in production.
197200 // A missing header whose defaultProfile substitute also fails to resolve is a
198201 // distinct, config-time condition - it fails every header-less request, not just
199202 // an occasional bad caller - so it gets its own message rather than being
@@ -202,7 +205,7 @@ func (h *HeaderPhaseProfileHandler) Pick(ctx context.Context, request *fwksched.
202205 if phase == "" {
203206 err = h .defaultProfileNotConfiguredError ()
204207 }
205- log .FromContext (ctx ).V ( logging . DEBUG ). Info ("no scheduling profile selected for request" , "error" , err )
208+ log .FromContext (ctx ).Info ("no scheduling profile selected for request" , "error" , err )
206209 return map [string ]fwksched.SchedulerProfile {}
207210 }
208211
0 commit comments