Skip to content

feat(ai): gateway-sourced home model list, chat-only, newest-first - #7422

Merged
lizhimins merged 2 commits into
apache:masterfrom
lizhimins:feat/gateway-model-catalog
Nov 30, 2026
Merged

lizhimins merged 2 commits into
apache:masterfrom
lizhimins:feat/gateway-model-catalog

Conversation

@lizhimins

Copy link
Copy Markdown
Member

Which Issue(s) This PR Fixes

No linked issue: maintainer follow-up to the 2026-11-27 batch merge (model catalog UX + CI repair).

Brief Description

  • Home page model list is now fetched from GET /llm/models (same source as the AI page) instead of a hardcoded catalog; the curated list remains only as mock-mode / failed-fetch fallback. Selection falls back to the configured or first model when the recommended qwen4-max is absent from the catalog.
  • Provider model listings drop non-chat modalities (image / video / audio, recognized by id keywords since the OpenAI-compatible payload has no capability field) and sort by created descending (stable on ties), so newer models show first.
  • Default model qwen4-max end to end; anthropic-compatible gateways list remote models with builtin fallback; AI settings accept custom model ids.
  • UI polish: Phosphor logo/breadcrumb icons (welcome emoji kept), adaptive K/M message units, right-aligned numeric columns, consistent K8s ID casing.
  • Actionable no-broker write errors; interceptor-notified error toasts no longer stacked by form catches.
  • fix(ci): regenerate rmqctl/internal/catalog/catalog_gen.go (stale on master since the batch merge, red catalog-verify step).

How Did You Test This Change?

  • Backend: cd server && mvn -B -ntp test -Dspring.profiles.active=dev → 4394 tests, 0 failures, 0 errors (H2 dev profile; integration tests against MySQL 8 also exercised by CI).
  • Frontend: cd web && npm run build (tsc + vite + license check) and npx vitest run → 172 files / 2241 tests green; new HomePage tests cover fetched-catalog precedence, fallback on fetch failure, and configured-model selection; AiPage handoff test updated for the home fetch.
  • rmqctl: make catalog-verify && make fmt && make test-race && make vet && make build all pass (Go 1.27.1).
  • Deployed to a live test ECS and browser-verified with Playwright: home dropdown shows exactly the 21 chat models from the gateway in created-descending order, qwen4-max first and selected with the recommended badge; no image/video/audio entries.

Checklist

  • One coherent change; unrelated modifications are not bundled in (the catalog regeneration repairs the CI step this PR must pass)
  • Commit subject follows Conventional Commits (feat: / fix:)
  • Tests added or updated for non-trivial changes, test methods named ...Test
  • New UI text has both Chinese and English entries under web/src/i18n/ (no new user-visible strings; badge reuse)
  • Architecture constraints stay green (mvn test runs the ArchUnit checks)
  • New source files carry the ASF license header (no new source files)
  • Documentation touched where behaviour changed (in-app help unchanged; progress notes kept out of tree)

- Home composer fetches /llm/models like the AI page; the curated list
  remains only as mock-mode and failed/empty-fetch fallback, and selection
  falls back to the configured or first model when qwen4-max is absent.
- Provider listings drop image/video/audio modalities by id keywords (the
  OpenAI-compatible payload has no capability field) and sort by created
  descending, stable on ties.
- Default model qwen4-max end to end; anthropic-compatible gateways list
  remote models with builtin fallback.
- AI settings: extended catalog, custom model ids, full-width engine banner.
- UI polish: Phosphor logo/breadcrumb icons (welcome emoji kept), adaptive
  K/M message units, right-aligned numeric columns, K8s ID casing.
- Actionable no-broker write errors; interceptor-notified toasts deduped.
The 2026-11-27 batch merge touched server-side tool YAML without
regenerating internal/catalog/catalog_gen.go, leaving the rmqctl
catalog-verify CI step red on master. Regenerate with make
catalog-generate; fmt/test-race/vet/build all pass.
@lizhimins
lizhimins merged commit f846cf8 into apache:master Nov 30, 2026
6 checks passed
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