Skip to content

router: fix epponly http port for agentgateway proxyType#1655

Open
abhay1999 wants to merge 2 commits into
llm-d:mainfrom
abhay1999:fix/epponly-service-port
Open

router: fix epponly http port for agentgateway proxyType#1655
abhay1999 wants to merge 2 commits into
llm-d:mainfrom
abhay1999:fix/epponly-service-port

Conversation

@abhay1999

@abhay1999 abhay1999 commented Jul 17, 2026

Copy link
Copy Markdown

what

_normalize_router_block always hardcodes targetPort: 8081 for the epponly http service port, since thats where envoy's sidecar listens. but the chart's own validation rejects a raw port number there when proxyType=agentgateway, it only accepts targetPort omitted, 80, or the literal string "http". so any epponly scenario that sets proxyType: agentgateway fails at helm template time even though the scenario file itself looks totally fine.

fix just picks targetPort based on proxyType now, "http" for agentgateway, 8081 for envoy same as before.

how i found and checked this

was originally trying to fix something else (no way to even pick proxyType=agentgateway for epponly), but while rebasing i noticed PR #1541 had already turned 12_router-values.yaml.j2 into a plain pass-through. so scenarios can just set router.proxy.proxyType: agentgateway directly now, didnt need a template change for that part at all.

wanted to make sure that path actually works end to end though, not just renders nice yaml. so i pulled the real llm-d-router-standalone chart and ran helm template against a rendered epponly + agentgateway scenario, and it blew up here:

Error: execution error at (llm-d-router-standalone/templates/epp.yaml:2:3): .Values.router.extraServicePorts[name=http].targetPort must be omitted, "80", or "http" when proxyType=agentgateway, got "8081"

patched _normalize_router_block locally, reran the exact same scenario through helm template again, passes clean this time (exit 0). also reran the default epponly scenario (no proxyType set) just to be safe, targetPort is still 8081 there, nothing changed for envoy.

testing

  • added 2 cases to the existing tests/test_normalize_router_block.py::TestEpponlyPort, one for envoy staying at 8081, one for agentgateway getting "http"
  • ran the full suite after, 669 passed, 31 skipped, nothing broke

_normalize_router_block always hardcoded targetPort: 8081 for the
epponly http service port, since that's where envoy's sidecar listens.
but the chart's own validation rejects a raw port number there when
proxyType=agentgateway, it only accepts targetPort omitted, 80, or the
literal string "http".

confirmed this by running the actual llm-d-router-standalone chart with
helm template against a rendered epponly+agentgateway scenario, it
failed with exactly that validation error. picking targetPort based on
proxyType (http for agentgateway, 8081 for envoy/default) fixes it,
verified the same helm template run passes afterwards.

Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com>
…-specific

Nina's feedback on the earlier commit here: don't special-case
proxyType=agentgateway in the code, just make the port configurable.

router.proxy.httpTargetPort now controls the epponly http service port
directly, defaults to 8081 (unchanged envoy behavior) if not set. A
scenario that wants agentgateway sets both proxyType and
httpTargetPort: "http" together, no proxyType-aware branching in
render_plans.py anymore.

Reran the same helm template check against the real chart with this
version of the fix, still passes clean.

Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com>
@abhay1999

abhay1999 commented Jul 19, 2026

Copy link
Copy Markdown
Author

update based on feedback from nina on slack: dropped the proxyType check entirely, its now just router.proxy.httpTargetPort as a plain override, defaults to 8081 (same as before) if not set. a scenario going for agentgateway sets proxyType: agentgateway and httpTargetPort: "http" together, no branching on proxy type name in the code anymore. reran the same helm template check against the real chart, still passes clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant