Skip to content

bug(install): no model pull checks the model's kind — a chat model in the embedding role passes every pull and is preserved forever on update #19736

Open
3 of 5 issues completed

Description

@mrveiss

Problem

No model pull or post-install check verifies that a model is the right kind for its role. This is how a chat model ended up as the embedding model on existing hosts (#18834):

Fix

Acceptance criteria

  • One kind check is used by every pull site listed above. A test plants a chat model in the embedding role and the install fails, naming it.
  • A deployed embedding model that fails the kind check is replaced on update, and the replacement is logged. A test pins this.
  • Host: after the builtin update, the audited host's embedding role resolves to an embedding-capable model.

Activity

  1. mrveiss commented on Oct 27, 2026

    @mrveiss
    OwnerAuthor

    Partial fix in PR #19744: the preserved-value step now kind-checks the deployed embedding model (ACs 2 and 3). Still open: AC1, one shared kind check at every pull site. That check should also validate the controller-env fallback lookup('env','AUTOBOT_EMBEDDING_MODEL') in playbooks/vars/backend-env.yml:34, found in review.

  2. mrveiss commented on Oct 27, 2026

    @mrveiss
    OwnerAuthor

    AC1 progress: PR #19852 adds the shared kind check (_shared/tasks/assert_model_kinds.yml) and wires it into roles/agent_config/tasks/ollama.yml and playbooks/deploy-hybrid-docker.yml. The hybrid deploy now reads agent_config's single model list.

    Remaining sites. Each is blocked only by an open PR on the same file, and gets the same include once that PR lands:

  3. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor

    Landed in train train-2026-10-28-86a (#19859, merge d32585a0bd) via #19744

  4. mrveiss commented on Oct 28, 2026

    @mrveiss
    OwnerAuthor

    Landed via the merge train (PR #19859), main d32585a.

    • One kind check used by every pull site, with a test planting a chat model in the embedding role: not met. The check landed only in autobot-slm-backend/ansible/_shared/tasks/read_deployed_embedding_model.yml (_embedding_kind_probe via the model server's capabilities); the pull sites named in the issue (llm role, agent_config ollama, deploy-native-services, deploy-hybrid-docker, install-bare-metal) are not touched by the merged change.
    • A deployed embedding model failing the kind check is replaced on update, replacement logged, pinned by test: same task file (keep only when verdict is not not-embedding; replacement recorded) and repo_tests/embedding_model_kind_checked_19736_test.py (test_keep_is_refused_only_on_a_definite_not_embedding_verdict, test_a_replacement_is_announced_on_every_run_it_happens, test_a_replacement_is_recorded_and_the_template_then_ignores_a_predefined_value).
    • Host: embedding role resolves to an embedding-capable model after the builtin update: host behaviour, not verifiable from code.

    Left open.

  5. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor

    Landed in train train-2026-10-28-86c (#19882, merge 8dc5efea83) via #19852

  6. mrveiss commented on Oct 28, 2026

    @mrveiss
    OwnerAuthor

    Landed via the merge train (PR #19882), main 8dc5efe.

    Not closed; AC2 was already ticked, AC1 and AC3 stay unticked.

    • AC1: _shared/tasks/assert_model_kinds.yml is included only by autobot-slm-backend/ansible/roles/agent_config/tasks/ollama.yml:51 and playbooks/deploy-hybrid-docker.yml:399, covered by repo_tests/model_kind_checked_after_pull_19736_test.py. The other pull sites listed in the issue (llm/tasks, deploy-native-services.yml, install-bare-metal.sh) do not reference it.
    • AC3: host behaviour, needs host evidence after the builtin update.
  7. mrveiss commented on Oct 31, 2026

    @mrveiss
    OwnerAuthor

    Landed through the merge train (PR #20238), main 35c78b6, via #20190. First criterion ticked, from main: _shared/files/check_model_kinds.sh is the one check. It runs through _shared/tasks/assert_model_kinds.yml in roles/agent_config/tasks/ollama.yml, playbooks/deploy-hybrid-docker.yml, playbooks/deploy-native-services.yml and roles/llm/tasks/main.yml, and through lib/pull-embedding-model.sh in install-bare-metal.sh. test_a_chat_model_in_the_embedding_role_is_the_wrong_kind and test_the_bare_metal_install_stops_on_a_chat_model_in_the_embedding_role plant the chat model.

    Open: the host criterion, which needs the audited host after an update. Note deploy-hybrid-docker.yml itself cannot load as a playbook (#19134), so its check cannot run until that is fixed.

  8. mrveiss commented on Oct 31, 2026

    @mrveiss
    OwnerAuthor

    Landed via the merge train (PR #20238). The two code ACs were already ticked; the host AC stays unticked. Open.

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 workingdeploymentphase:M1.4Wizard and SLM: choose a mode, apply it, default models workpriority: high

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions