Skip to content

Object detector never uses its configured model (falls back to the operator model) #157

Description

@nelay04

Problem

artemis/agents/object_detector/object_detector.py (_run_object_detection):

try:
    llm = get_llm(ctx, name="object_detector")
except Exception:
    llm = get_llm(ctx, name="operator")

object_detector is a utils node (LLMConfig.utils.object_detector), but get_llm is called without is_utils=True, so it is looked up as an agent node. That raises AttributeError: 'LLMConfig' object has no attribute 'object_detector', which the bare except swallows, and detection silently runs on the operator model.

As a result, the Gemini ER model configured for the object detector (gemini-robotics-er-2-preview) is never used, with any provider, including the stock config, even though the config states this node must use an ER model for accurate point localization. Other utils nodes (hopper, outputter) already pass is_utils=True; this is the only call missing it.

Reproduction (current main, 371aa6d)

from artemis.config.llm import parse_llm_config
c = parse_llm_config()
print(c.utils.object_detector)   # google/gemini-robotics-er-2-preview
c.get_agent("object_detector")   # AttributeError -> caught -> operator used

Resolving the real models from the stock config:

  • current code: falls back to gemini-3.8-flash (operator)
  • with is_utils=True: gemini-robotics-er-2-preview

Proposed fix

Call get_llm(ctx, name="object_detector", is_utils=True) and log a warning when falling back to the operator model, so the failure is no longer silent. I have a fix with unit tests ready and will open a PR.

Note: closed PR #133 contained a similar change, but per the author's comment it was opened against this repo by mistake and never reviewed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions