refactor(web): extract custom-endpoints routes into web_routers/custom_endpoints (web_server.py god-file slice R3-C1) - #79127
Open
andrexibiza wants to merge 2 commits into
Conversation
…m_endpoints (web_server.py god-file slice R3-C1) Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
…llects it Signed-off-by: Andrex <andrex@users.noreply.github.com>
This was referenced Aug 5, 2026
Contributor
Author
|
🔒 This shard is part of the web_server.py KILL LOCK — the permanent record of the 17,700-line whole, the mess it caused (#58576 event-loop stalls, #60800 cold-start stalls, #53972 token persistence, #71778 analytics), every shard in the wave, and every open fixer PR still fighting the surface (#50188 #71802 #54034 #76764 #71150 #67365 #65434 #65424 #78411 #75845 #68022 #62654 #76757 #68251 #51070 #73605 #73849 #73393 #71752 #77808 #46956 #74297 #77853). Lock: posted on #78628 · Indexed by the Kill All Gods meta-issue #78647. |
Collaborator
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.
Summary
Web_server.py god-file slice R3-C1: extract the custom-endpoints family from
hermes_cli/web_server.pyintohermes_cli/web_routers/custom_endpoints.py(APIRouter). Part of the repo-wide large-file decomposition (tracker #78647).What changed and why
hermes_cli/web_routers/custom_endpoints.pyweb_server.pyre-exports all 13 (seam identity verifiedis-identical); the one cross-cluster helper (_apply_main_model_assignment) resolves viaweb_deps.late()Why this matters to users
Custom OpenAI-compatible provider endpoints are a dashboard surface users configure directly. Extracting the CRUD + validate family into a router module keeps the credential-handling behavior byte-identical (api_key vs key_env, redaction, audit names-not-values) while enabling the large-file decomposition.
Testing
pytest tests/test_web_server_custom_endpoints_seam.py tests/hermes_cli/test_custom_provider_model_switch.py tests/gateway/test_25107_stale_base_url_api_mode.py→ 27 passedCoordination / interlock
test_prefix (CI collection) — coordinated across all six sibling PRsPart of #78647
Part of #78628