Skip to content

fix(agent): omit reasoning effort for custom title routes - #112789

Closed
KoNit-K wants to merge 1 commit into
NousResearch:mainfrom
KoNit-K:fix/title-generation-custom-reasoning-effort-112781
Closed

KoNit-K wants to merge 1 commit into
NousResearch:mainfrom
KoNit-K:fix/title-generation-custom-reasoning-effort-112781

Conversation

@KoNit-K

@KoNit-K KoNit-K commented Sep 16, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes auxiliary title generation for arbitrary custom/OpenAI-compatible endpoints that reject the top-level reasoning_effort argument. Disabling title-generation reasoning now omits that unsupported field unless the configured custom route is identified as Ollama.

Related Issue

Fixes #112781

Type of Change

  • Bug fix

Changes Made

  • plugins/model-providers/custom/__init__.py — restricts the custom-provider reasoning_effort: "none" projection to identified Ollama endpoints while preserving Ollama's extra_body.think: false encoding.
  • tests/agent/test_auxiliary_client.py — adds request-projection regression coverage for a generic custom relay and an Ollama /v1 endpoint.

How to Test

Run HERMES_PYTHON=/Users/blockkonit./Dev/hermes/hermes-agent/.venv/bin/python scripts/run_tests.sh tests/agent/test_auxiliary_client.py; 216 passed, 0 failed.

Run /Users/blockkonit./Dev/hermes/hermes-agent/.venv/bin/ruff check plugins/model-providers/custom/__init__.py tests/agent/test_auxiliary_client.py; the lint check passes.

Evidence

  • BEFORE RED: scripts/run_tests.sh tests/agent/test_auxiliary_client.py -k custom_endpoint_omits_disabled_reasoning_wire_field failed because a generic custom relay request contained reasoning_effort: "none".
  • AFTER GREEN: the focused regression pair reported 2 passed, 0 failed; the complete affected test file reported 216 passed, 0 failed.
  • CONTROL: the Ollama endpoint test confirms disabled reasoning still sends reasoning_effort: "none" with extra_body.think: false; Gemini is unchanged because it uses a separate provider profile.

Checklist

  • The change is limited to the custom provider's disabled-reasoning request projection and regression tests.
  • Generic custom endpoints no longer receive the unsupported disabled-reasoning field.
  • Ollama's existing disabled-reasoning encoding remains covered.
  • Gemini routing remains unchanged because its provider profile is not modified.
  • The focused regression test demonstrated the pre-fix failure.
  • The affected Python test file reported 216 passed, 0 failed.
  • Ruff completed successfully for both modified Python files.
  • No Desktop, Rust bootstrap-installer, Windows-only, or Docker-publish lane is affected by this Python-only diff.

teknium1 added a commit that referenced this pull request Sep 17, 2026
…rejects them

Auxiliary title generation disables reasoning (reasoning_config
{"enabled": False}, #91927); on provider=custom the profile encodes that as
top-level reasoning_effort="none" - the deliberate thinking-off wire for
Ollama /v1 (#25758), vLLM and GLM. A chat-only model behind an
OpenAI-compatible relay (gpt-4.1-mini on a one-api style relay) answers
"400 Unrecognized request argument supplied: reasoning_effort" and the
title was lost with no retry (#112781).

Add a rung to the shared aux recovery ladder (sync and async drive the
same generator): when the 400 names a reasoning field, strip top-level
reasoning_effort, the adapter's private _reasoning_config and every
extra_body reasoning key, and retry once - the same reactive shape as the
temperature and response_format rungs. The custom profile's encoding is
untouched, so Ollama/vLLM/GLM users keep thinking-off on the first
request; only routes that reject the field pay one extra round-trip.

Supersedes #112789 (@KoNit-K), which dropped the encoding for every
non-Ollama custom endpoint in the shared profile and would have silently
re-enabled thinking for vLLM/GLM users who set reasoning_effort: none.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists labels Sep 17, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Superseded by merged #113114, which implements the same #112781 custom-endpoint title-generation reasoning_effort repair.

@KoNit-K
KoNit-K force-pushed the fix/title-generation-custom-reasoning-effort-112781 branch from 58e968f to 5960f45 Compare September 17, 2026 13:56
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks @KoNit-K for working on reasoning effort on custom title routes. This landed on main through #113958 (cbe2413: chained parameter rungs incl. the reasoning-field strip, plus the Fireworks preflight), which covers the same symptom on the primary and fallback auxiliary paths and omits the field up front for providers known to reject it. Closing as superseded by the landed fix — the tracking issue (#83390 cluster) is closed with the same references.

@teknium1 teknium1 closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Auxiliary title_generation sends top-level reasoning_effort on custom/OpenAI-compatible endpoints - HTTP 400 on models that don't support it

3 participants