Skip to content

fix(object_detector): resolve the detector model from utils config - #158

Open
nelay04 wants to merge 1 commit into
google:mainfrom
nelay04:fix/object-detector-utils-config
Open

nelay04 wants to merge 1 commit into
google:mainfrom
nelay04:fix/object-detector-utils-config

Conversation

@nelay04

@nelay04 nelay04 commented Sep 26, 2026

Copy link
Copy Markdown

Fixes #157

Summary

_run_object_detection called get_llm(ctx, name="object_detector") without is_utils=True. Since object_detector is a utils node, the lookup always raised AttributeError, which was silently caught, so detection ran on the operator model instead of the configured utils.object_detector model (gemini-robotics-er-2-preview in the stock config).

Changes

  • artemis/agents/object_detector/object_detector.py: pass is_utils=True, and log a warning when falling back to the operator model so the fallback is no longer silent.
  • tests/unit/agents/test_object_detector_model_resolution.py: two tests
    • the detector requests name="object_detector", is_utils=True and uses that model
    • if resolution fails, it falls back to the operator model and logs a warning

Verification

  • New tests fail on current main (2 failed) and pass with the fix. They mock get_llm, so no API key is needed.
  • Real config resolution (no mocks), stock config/artemis.jsonc:
    • before: falls back to gemini-3.8-flash (operator)
    • after: gemini-robotics-er-2-preview
  • Live check with a real Gemini key on tests/tools/inputs/screenshot.jpg: the request went to gemini-robotics-er-2-preview and returned a point for the date input field of [428, 196] (0-1000 scale), matching its on-screen position (~[422, 196]).
  • Full suite (Windows, Python 3.13): same pre-existing failure before and after (test_awake_service.py::test_discovery_keeps_only_pool_claimed_devices), with passed count 2186 → 2188 (the two new tests).
  • ruff format --check, ruff check (changed files), scripts/quality_ratchet.py (754 / 0 / 18, unchanged), and pyright --project pyright-core.json are clean.

Note

Other utils nodes (hopper, outputter) already pass is_utils=True; this was the only call missing it.

get_llm was called without is_utils=True, so the lookup always raised and was silently caught, making detection run on the operator model instead of the configured utils.object_detector model. Log a warning when falling back.
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.

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

1 participant