Skip to content

fix(llm-proxy): let endpoint aliases diverge while a group converges warn instead of block - #19422

Open
araffass wants to merge 1 commit into
masterfrom
fix/apim-15005-alias-validator-deadlock
Open

fix(llm-proxy): let endpoint aliases diverge while a group converges warn instead of block#19422
araffass wants to merge 1 commit into
masterfrom
fix/apim-15005-alias-validator-deadlock

Conversation

@araffass

Copy link
Copy Markdown
Contributor

Issue

https://gravitee.atlassian.net/browse/APIM-15005

Description

On an endpoint group holding two or more LLM provider endpoints, an alias could never be introduced after creation. The same invariant — all endpoints must carry the same alias set — was enforced twice: the console blocked the edit-endpoint form, and the management API rejected the whole update with 400 api.endpointsGroup.llm-proxy.provider.mismatch. Since every client edits one endpoint at a time, the divergent intermediate state is unavoidable, so no sequence of saves could ever reach consistency; the only workaround was recreating the group. Shared aliases are what makes cross-provider failover work, so this blocked that setup entirely (APIM-15000, REWE POC).

The invariant is unnecessary at runtime: the gateway only routes an alias to the endpoints that declare it, and a failover rotation skips an endpoint lacking the requested alias. So:

  • Management API: the blocking rule is removed (validateLlmProxyAliasesConsistency and the now-dead EndpointGroupLlmProxyInvalidException), along with the service's ObjectMapper dependency it alone used.
  • Console: the blocking form error becomes a non-blocking warning banner, computed against the resulting group state (edited endpoint substituted in — also fixing the comparison reference, which included the edited endpoint itself), listing each endpoint with its aliases so the user sees exactly what to align.

Groups whose aliases already match see no change. Tests: alias introduction on an alias-less group is saveable with the warning shown; aligning the second endpoint clears it live; matching groups show nothing; backend suite accepts diverging aliases and drops the obsolete parse-failure test.

Additional context

@araffass
araffass requested a review from a team as a code owner August 26, 2026 16:18
@araffass araffass added the apply-on-4-12-x Mergify: apply on 4.12.x label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apply-on-4-12-x Mergify: apply on 4.12.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant