hermes - 💡(How to fix) Fix Make max_tokens configurable for aux vision calls

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

# config.yaml
auxiliary:
  vision:
    max_tokens: 8000   # optional, defaults to 2000/4000 per code path

---

# Line 803
- "max_tokens": 2000,
+ "max_tokens": _vision_cfg.get("max_tokens", 2000),

# Line 1301
- "max_tokens": 4000,
+ "max_tokens": _vision_cfg.get("max_tokens", 4000),
RAW_BUFFERClick to expand / collapse

Problem

tools/vision_tools.py hardcodes max_tokens in two places for aux vision calls:

  • Line 803: "max_tokens": 2000
  • Line 1301: "max_tokens": 4000

Models like MiMo 2.5 support 130K output tokens, but vision descriptions are silently clipped to 2K/4K. These are the only aux paths where the cap is constraining — title gen (500), web extract (10K/20K), and context compressor (dynamic) are already adequate.

Proposed fix

Read from auxiliary.vision.max_tokens in config.yaml, falling back to current hardcoded values:

# config.yaml
auxiliary:
  vision:
    max_tokens: 8000   # optional, defaults to 2000/4000 per code path
# Line 803
- "max_tokens": 2000,
+ "max_tokens": _vision_cfg.get("max_tokens", 2000),

# Line 1301
- "max_tokens": 4000,
+ "max_tokens": _vision_cfg.get("max_tokens", 4000),

Why

Lets users get richer vision descriptions from capable models without editing upstream code that gets wiped on every update. Current defaults are preserved — just make them configurable.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING