Skip to content

fix(browser): default non-finite Camofox vision config - #51978

Open
lin-hongkuan wants to merge 1 commit into
NousResearch:mainfrom
lin-hongkuan:codex/fix-camofox-vision-nonfinite-config
Open

lin-hongkuan wants to merge 1 commit into
NousResearch:mainfrom
lin-hongkuan:codex/fix-camofox-vision-nonfinite-config

Conversation

@lin-hongkuan

Copy link
Copy Markdown
Contributor

Summary

  • reject non-finite Camofox vision timeout and temperature config values
  • fall back to the existing 120s / 0.1 defaults for inf and nan
  • add regression coverage ensuring non-finite config is not passed to call_llm

Tests

  • python -m pytest tests/tools/test_browser_camofox.py::TestCamofoxVisionConfig::test_camofox_vision_defaults_nonfinite_config -q
  • NO_PROXY=localhost,127.0.0.1,::1 python -m pytest tests/tools/test_browser_camofox.py -q
  • python -m py_compile tools/browser_camofox.py
  • python scripts/check-windows-footguns.py --all

@alt-glitch alt-glitch added type/bug Something isn't working tool/browser Browser automation (CDP, Playwright) P3 Low — cosmetic, nice to have labels Jun 24, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for isolating the Camofox failure mode. The Camofox premise is confirmed on current main: tools/browser_camofox.py:894-915 converts auxiliary.vision values with float() and forwards them explicitly to call_llm.

Problems

  • This is a shared-config bug class, but the patch covers only Camofox. The regular browser path still does unrestricted float() conversion in tools/browser_tool.py:4118-4121; image and video vision do the same in tools/vision_tools.py:1236-1239 and :1739-1742. Explicit timeouts are preserved by agent/auxiliary_client.py:6077 and passed into the SDK request at :6529-6533.

Suggested changes

  • Reuse one finite-value coercion helper across every auxiliary.vision config-to-call boundary, preserving the video flow's 180-second floor.
  • Add regression coverage for the non-Camofox browser/image/video paths as well as this Camofox case.

Automated hermes-sweeper review.

Comment thread tools/browser_camofox.py
_vision_cfg = cfg_get(_cfg, "auxiliary", "vision", default={})
_vision_timeout = float(_vision_cfg.get("timeout", 120))
_vision_temperature = float(_vision_cfg.get("temperature", 0.1))
_vision_timeout = _finite_float(_vision_cfg.get("timeout"), 120.0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply this finite-value coercion to the sibling auxiliary.vision parsers too: tools/browser_tool.py:4118-4121 and tools/vision_tools.py:1236-1239,1739-1742 still forward nan/inf as explicit LLM request values.

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

Labels

P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/browser Browser automation (CDP, Playwright) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants