Skip to content

Model router: classifier model (minimax-m3) is not created when no LLM profiles exist #17834

Description

@juanmichelini

Bug

When creating a model router (meta-profile) while no LLM profiles exist yet, the router correctly creates the LLM profiles for the models listed in the model_table (the routed models), but does not create the profile for the classifier model (classifier_model, e.g. minimax-m3 from the built-in Router Pro / Router Flash templates).

Root cause

In src/components/features/settings/meta-llm-profiles/meta-profile-editor.tsx, the classifier dropdown's options come only from saved LLM profile names (availableProfiles). The selection was driven by:

defaultSelectedKey={startingConfig.classifier_model || undefined}  // "minimax-m3"

When no profiles exist yet, availableProfiles is empty, so defaultSelectedKey="minimax-m3" finds no matching item and the Autocomplete renders an empty input. Because the field is allowsCustomValue, HeroUI syncs that empty input value back through onInputChange(""), which clears config.classifier_model to "" — so on save the classifier is dropped from the config and is never passed to createMissingRouterLlmProfiles().

The table models still get created because they are parsed from the separate model_table field, which is unaffected by the dropdown.

The underlying creation logic is actually correct: collectRequiredRouterModelNames() in router-profiles.ts already includes classifier_model, and createMissingRouterLlmProfiles() creates every missing name (table + classifier) linked to the chosen provider connection. The bug is purely that the classifier value never survives the editor into the saved config when no profiles exist.

Expected behavior

  • minimax-m3 is preselected as the classifier model in the router editor, even when no LLM profiles exist yet.
  • If minimax-m3 does not already exist as a profile and a provider connection is selected, it is created (endpoint openhands/minimax-m3, linked to the connection) just like the rest of the routed models.

Reproduction

  1. Start with a fresh install: no LLM profiles, no meta-profiles.
  2. Settings → Model Routers → Add → choose Router Pro (or Router Flash).
  3. Select/create a provider connection.
  4. Save.
  5. Observe: the routed models are created, but the minimax-m3 classifier profile is missing — and the classifier dropdown was empty before saving.

This issue was reported and the fix implemented by an AI agent (OpenHands) on behalf of @juanmichelini.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:lowMinor or narrowly scoped bug with low user or operational impact.ready-for-devScoped for contribution. Managed by issue-readiness-check.yml.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions