Files
hermes-webui/api
dss539 707fef9f4f fix(session): strip @provider qualifier only at the gateway boundary
The previous revision stripped the '@provider:' qualifier from model_value
in _session_model_state_from_request BEFORE _resolve_compatible_session_model_state
ran. That defeated two behaviors that rely on the qualified form:

  1. provider-switch repair - a session pinned to a removed/unconfigured
     provider (@removed:mistral-large) no longer reverted to the active
     default; it returned (bare_model, removed) and targeted an unavailable
     provider.
  2. PR #6718's custom-provider normalizer, which needs the still-qualified
     value to map @custom:<slug>:<model> to the canonical slug.

Keep the qualifier through session-state resolution (matching master) and
strip it to the bare model ONLY at the gateway request boundary via
_gateway_model_field(), which already runs on both gateway request sites.

Red-before-green: the rewritten test asserts @removed:mistral-large repairs
to the active default; it failed on the prior head and passes now.
The gateway-body assertions (TestGatewayRequestBodiesCarryBareModel) still
prove only the outbound payload is bare.

Verified: 275 tests pass across the issue-6722, provider-mismatch,
model-resolution-fast-path, gateway-approval (legacy+runs), gateway-routing,
custom-provider, session-model-switch and model-not-found suites.
2026-08-07 23:09:32 +00:00
..
2026-07-22 18:45:24 +00:00