stage-batch32: v0.51.150 / Release DV — single-PR reasoning-effort agent metadata#3036
Merged
Conversation
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.
stage-batch32 — v0.51.150 (Release DV)
Single-PR reasoning-effort agent metadata integration.
PR
Changes
resolve_model_reasoning_efforts()inapi/config.pyto consult Hermes Agent'smodels.devmetadata (agent.models_dev.get_model_capabilities()) between the exact provider-specific resolvers and the broad heuristic fallback. Closes the gap where native/provider-specific catalogs (e.g. xAI OAuthgrok-4.3) were reasoning-capable per agent metadata but reported no efforts by WebUI because no local prefix heuristic matched.Order of precedence (verified by Opus)
The new metadata layer sits exactly where the old prefix heuristic was the only answer for non-special-cased providers. Existing exact resolvers return BEFORE the metadata lookup, so they cannot be overridden by stale agent metadata.
Pre-merge gate
except Exception-guarded (older hermes-agent without models_dev module = identical behavior to current master)supports_reasoning=Falseauthoritative path is bounded: a single model becomes unaccessible-for-reasoning at worst, not a global brickmodels.devcall is wrapped in a secondtry/except Exception; no raise can escapeDrive-by fix called out by Opus
The LMStudio branch now passes
hinted_model(the provider-stripped value) tolmstudio_model_reasoning_options()instead of the rawmodelarg. Previously the unstripped@xai-oauth:...style hint was passed through to LMStudio's probe — that was a real bug that this PR incidentally fixes.Test coverage
tests/test_models_dev_reasoning.py(110 LOC, 6 tests) covers:supports_reasoning=True→ full effort listsupports_reasoning=False→ authoritative empty@xai-oauth:hint stripping before lookupget_reasoning_status()hydrates from config defaultsFiles
api/config.py: +114/-39 (new_models_dev_reasoning_efforts()helper, resolver call-chain update, no-query path hydration)tests/test_models_dev_reasoning.py: NEW, 6 testsCHANGELOG.md: v0.51.150 / Release DV entryNon-blocking follow-ups (Opus suggestions)
model.reasoning_efforts_force_supported: trueconfig knob so a user can override an authoritative-False signal when models.dev cache is stale. File as sprint-candidate.ImportErrorbranch (mocksys.modules["agent.models_dev"] = None) — the existing "metadata returns None" tests cover the same downstream behavior via a different upstream path.Both can land in a subsequent PR.