Skip to content

fix(slm): LLM placement prefers an active row, and loopback needs every client on the LLM node (#20131) - #20435

Merged
mrveiss merged 3 commits into
mainfrom
issue-20131-llm-placement
Nov 1, 2026
Merged

mrveiss merged 3 commits into
mainfrom
issue-20131-llm-placement

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thinking Path

Two gaps left by #19861's fix. The GPU role was picked by name before its status was read, so on the full-inventory path a stopped GPU row beat an active CPU one. And nodes_by_role kept the last node per role, so one backend on the LLM node gave loopback to every backend node, including those on other machines.

What Changed

  • services/llm_placement.py: _llm_node prefers an active row, GPU before CPU, and falls back to any row, since on a first run every row is not_installed.
  • A client uses loopback only when every node of that client role is the LLM node. The var is one value for the whole inventory, so a mixed role gets the address.
  • With several nodes in one LLM role, the lowest node id is used, so a run does not depend on row order.

Verification

llm_node_reaches_backend_env_19861_test.py passes locally; only this was run. New: inactive and not_installed GPU rows lose to an active CPU row, both active picks GPU, first-run fallbacks, and a two-backend case in both row orders. No wizard run on a real multi-node install.

Worth reviewing:

  • In a mixed role, a backend on the LLM node now calls Ollama through the node's address rather than loopback. The role's default llm_host is 0.0.0.0, so that works; an install that overrides it to loopback would fail. Not run on a host.
  • A stale inactive client row on another node also rules out loopback. The result is still an address.

Model Used

Claude Opus 5.5

Closes #20131

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 45f10d1 and 1b25ce4.

Files selected for processing: 2
  • autobot-slm-backend/services/llm_placement.py
  • repo_tests/llm_node_reaches_backend_env_19861_test.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Code review on PR #20435 (head 5ce0a9b): approve. Read only. Placement prefers an active row, GPU first, and is deterministic among several; loopback only when every client is the LLM node. setup_wizard.py around its all_active path is not changed here, so check that before ticking the first item of #20131.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Landed via the merge train (PR #20459), main f88cd37.

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.

LLM placement: GPU role selection ignores status, and loopback is chosen per role rather than per node

1 participant