router: clarify shared backend mode preservation flow

Add a blank line and a brief comment before the _backend_alias_cost
assignment to make it clear that registration runs unconditionally
after the optional mode-preservation mutation.

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-21 02:56:42 +00:00
parent 9a16c06d0a
commit 76623c28a0
No known key found for this signature in database

View file

@ -7808,6 +7808,8 @@ class Router:
_deployment_mode,
)
_shared_model_info["mode"] = _existing_shared_mode
# Always register the (possibly mode-preserved) shared backend info.
_backend_alias_cost = {_model_name: _shared_model_info}
if "responses/" in _model_name:
_stripped_model_name = _model_name.replace("responses/", "")