Conversation
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.
KoNit-K
force-pushed
the
fix/title-generation-custom-reasoning-effort-112781
branch
from
September 17, 2026 13:56
58e968f to
5960f45
Compare
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes auxiliary title generation for arbitrary custom/OpenAI-compatible endpoints that reject the top-level
reasoning_effortargument. 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
Changes Made
plugins/model-providers/custom/__init__.py— restricts the custom-providerreasoning_effort: "none"projection to identified Ollama endpoints while preserving Ollama'sextra_body.think: falseencoding.tests/agent/test_auxiliary_client.py— adds request-projection regression coverage for a generic custom relay and an Ollama/v1endpoint.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
scripts/run_tests.sh tests/agent/test_auxiliary_client.py -k custom_endpoint_omits_disabled_reasoning_wire_fieldfailed because a generic custom relay request containedreasoning_effort: "none".reasoning_effort: "none"withextra_body.think: false; Gemini is unchanged because it uses a separate provider profile.Checklist