Release GE — v0.51.211 (reasoning heuristics + /model shortest-match + Copilot env-token filter) - #3415
Merged
Conversation
Copilot API does not support classic PATs (ghp_*), only OAuth tokens (gho_*) or fine-grained PATs (github_pat_*). When GITHUB_TOKEN env var contains a classic PAT, it should be filtered from the credential pool to prevent Copilot from appearing in the model picker dropdown. The _is_ambient_gh_cli_entry() function now also filters entries with source='env:GITHUB_TOKEN', treating them as ambient/auto-detected rather than user-explicitly-added credentials. Fixes issue where Copilot group appeared in WebUI model picker even when gh auth token was an unsupported classic PAT.
Follow-up to PR #3382 review feedback. There are three GitHub-related env vars that can be auto-detected: - COPILOT_GITHUB_TOKEN: user-specific config, should NOT be filtered - GITHUB_TOKEN: classic PAT, should be filtered (already done) - GH_TOKEN: another env var, should also be filtered (this commit) Use a frozenset (_AMBIENT_GH_ENV_SOURCES) to clearly define which env var sources are ambient vs user-configured.
The /model slash command's fuzzy fallback used a substring match that took the first option containing the query, so "/model mimo-v2.5" selected "mimo-v2.5-pro" instead of "mimo-v2.5". Replace both fallback loops with a shared _bestModelMatch helper that prefers an exact id/label match and otherwise returns the shortest option containing the query, so a more specific query is no longer shadowed by a longer variant. The longer variant is still selectable by querying its full name. Closes #3368
SysAdminDoc
pushed a commit
to SysAdminDoc/hermes-webui
that referenced
this pull request
Jun 26, 2026
Release GE — v0.51.211 (reasoning heuristics + /model shortest-match + Copilot env-token filter)
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.
Release GE — v0.51.211 (stage-batch1)
Phase 1 low-risk contributor batch. 3 PRs, all isolated bug fixes to existing surfaces, no UI/UX surface changes.
PRs in this release
_candidate_supports_reasoningto whole model families (GPT-5+, Claude 4/3.7+, Qwen-3+, Kimi/Minimax/Mimo/GLM/Step, DeepSeek v*/r*) instead of hardcoded version lists. Fixes the thinking-level selector being hidden on custom providers / new releases /-free/:free-suffixed names. Closes Bug: Reasoning Effort Selector Hidden on Custom and Suffixed Models #3377. (Supersedes fix(reasoning): add GLM and Claude family-before-version names to heuristic family list #3413, which added GLM +claude-opus-4-8family naming piecemeal — both covered here.)/modelslash command now prefers an exact id/label match, else the shortest matching option, so/model mimo-v2.5no longer selectsmimo-v2.5-pro. Applied to both the main and bare-name fallbacks. Closes Bug: model selection logic (using a substring) prevents selection of some models #3368.GITHUB_TOKEN/GH_TOKENenv-var sources from the Copilot credential pool (classicghp_*PATs the Copilot API can't use no longer surface Copilot in the picker).COPILOT_GITHUB_TOKENstill respected.Verification
Note: #3379 over-matches a couple of rare edge models (
deepseek-vl-*vision, legacyclaude-instant-100k) into showing the reasoning selector — a soft UX false-positive (the param is ignored by the model), not a runtime failure; documented for follow-up.