fix: surface provider-scoped context length in gateway session info - #15668
fix: surface provider-scoped context length in gateway session info#15668guantik-gm wants to merge 4 commits into
Conversation
|
I checked the related PRs called out above (#10690, #5096, #8240, #14382). They do appear to be solving the same user-visible bug family: the gateway session-info banner not surfacing the provider-scoped I don't see a reviewer-blocking code issue in this PR from that comment alone, but I do think we should consolidate before merge so we don't land the same fix multiple times with slightly different implementations/tests. |
|
Thanks for collecting fixes across the affected paths. The gateway-session-info portion is already on current main: Problems
Suggested changes
This is an automated hermes-sweeper review. |
Related to #18025 and the older session-info display work, but this live branch also modifies provider transport resolution, background-review inheritance, and MCP tool naming. It is not a duplicate; a split/consolidation decision would make the independent changes reviewable. |
Related to open display-only competitor #18025. This branch additionally changes custom-provider transport resolution, background-review credential inheritance, and MCP registry-name handling, so it is mixed-scope competing work rather than a duplicate; please split or consolidate. |
Summary
GatewayRunner._format_session_info()reuse the provider compatibility layer when top-levelmodel.context_lengthis absentcontext_lengthfromproviders:/custom_providers:in the gateway session-info bannertests/gateway/test_session_info.pyProblem
The gateway
/reset/ session-info banner only read top-levelmodel.context_length, so configs that stored context under provider-scoped per-model entries (for exampleproviders.<name>.models.<model>.context_length) could incorrectly fall back to the default 128K display even though runtime paths already honored the configured value.Test Plan
python -m pytest tests/gateway/test_session_info.py -q11 passedNotes
model.context_length