Skip to content

Move NyxID Gateway route label out of frontend hardcoding #780

@AbigailDeng

Description

@AbigailDeng

Problem

Settings -> LLM -> Preferred route currently shows NyxID Gateway as the fixed gateway option label, but this display label is hardcoded in the frontend instead of coming from backend/configured route metadata.

This makes the UI label difficult to rename, localize, or align with the actual gateway provider returned by /api/user-config/models.

Observed behavior

The Preferred route select always includes a hardcoded Gateway group option:

Gateway
  NyxID Gateway

Even if /api/user-config/models returns gateway provider metadata, the label used for the default gateway route is not derived from that response.

Current frontend hardcoding

Settings page:

  • apps/aevatar-console-web/src/pages/settings/index.tsx
    • gatewayLabel is hardcoded to NyxID Gateway or NyxID Gateway (fallback unavailable).
    • routeSelectOptions always inserts this hardcoded option for route value "".

Chat shared route labeling:

  • apps/aevatar-console-web/src/pages/chat/chatConversationConfig.ts
    • describeConversationRoute("") returns "NyxID Gateway".
    • buildConversationRouteOptions() starts with { label: "NyxID Gateway", value: "" }.

Settings summary also has hardcoded fallbacks such as:

value={routeSummaryLabel || "NyxID Gateway"}

Expected behavior

The default gateway route label should be sourced from backend/config metadata, not hardcoded in UI code.

Possible contract options:

  1. /api/user-config/models returns a canonical gateway provider entry with:
    • source: "gateway_provider"
    • provider_slug
    • provider_name / display name
    • status
    • route metadata indicating it represents the default gateway route value ""
  2. Or /api/user-config/models returns a dedicated field such as:
    • gatewayLabel
    • defaultRouteLabel
    • gatewayProviderDisplayName
  3. Frontend derives the label for route value "" from that response and only falls back to a generic local fallback if metadata is absent.

Acceptance criteria

  • The Preferred route select no longer hardcodes NyxID Gateway as the primary source of truth.
  • Saved/effective route summaries use the same backend/config-derived label.
  • Chat route option labels and Settings route labels are consistent.
  • Frontend tests cover custom gateway display label returned by API/config.
  • If backend metadata is missing, the UI uses a minimal fallback, but normal production behavior should come from API/config.

Notes

Investigated on branch refactor/2026-05-19_gagent-member and also checked feature/router route-label code paths.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions