fix(cli): keep exhausted-pool providers visible in the main /model picker - #103843
liuhao1024 wants to merge 1 commit into
Conversation
|
CI: The only failing test is Evidence that this is a flake rather than a regression from this change:
No code change needed; happy to re-run if a maintainer deems it necessary. |
|
Revalidated this against current main at Using this PR's two regression tests on unmodified main reproduces both failures ( I previously closed my duplicate #109257 in favor of this PR and still carry the equivalent fix locally. Maintainers: could this get another look? It is still needed for #103829. The original CI run remains red on the relay e2e test reported above; I have not rerun that e2e case, so this is a focused regression check rather than a claim that the full suite is green. |
…cker Rebased onto current main (3917c7d): the picker call gained capabilities=True for the reasoning-effort step, so the for_picker=True forwarding now rides alongside it instead of conflicting. The regression tests additionally assert capabilities=True so a future rebase cannot silently drop either flag.
1ce2213 to
0c4c092
Compare
|
Thanks @seppegadeyne for the thorough revalidation against current main — exactly the signal this needed. I've rebased the branch onto current main ( Same shape as before — a one-call-site flag change plus the two regression tests, verified green locally (26 passed across the new tests and the adjacent picker/model-switch suites). The rebase push also restarts CI, which should clear the stale red run from 09-05 (that one was the unrelated relay e2e timing flake documented above). |
What does this PR do?
/modelwith no args in an interactive CLI session opens the main model picker via_show_model_picker, which feedsbuild_models_payloadwithoutfor_picker=True. A provider whose credential-pool entries are all markedexhausted(HTTP 429,last_error_reset_atset) therefore fails thehas_credsgate in_overlay_has_credsand its row disappears from the main picker as if the provider were not authenticated — the exact symptom in #103829.The visibility branch already exists and is gated on the flag: with
for_picker=True,load_pool(slug).has_credentials()keeps the row visible so the user can pick a different model under the same provider (limits are per-model for many providers). The gateway interactive picker forwards it (#66584) and the aux-task/vision pickers forward it (#66624); the CLI main picker surface was simply never wired to the same contract. This PR forwardsfor_picker=Truefrom_show_model_picker— no filter logic is duplicated or moved.Related Issue
Fixes #103829
Type of Change
Changes Made
hermes_cli/cli_model_switch_mixin.py:_show_model_pickernow passesfor_picker=Truetobuild_models_payload(+4 lines incl. rationale comment).tests/hermes_cli/test_show_model_picker_exhausted_pool.py: new regression tests asserting the flag is forwarded and the picker open/usage-fallback paths are unchanged.How to Test
pytest tests/hermes_cli/test_show_model_picker_exhausted_pool.py -v— 2 passed (should pass).pytest tests/hermes_cli/test_authenticated_providers_exhausted_pool.py tests/hermes_cli/test_aux_picker_inventory.py tests/hermes_cli/test_25106_global_switch_persists_base_url_api_mode.py tests/hermes_cli/test_apply_model_switch_result_context.py tests/hermes_cli/test_model_switch_context_offload.py tests/hermes_cli/test_user_providers_model_switch.py -q— 27 passed, no regressions (Observed result: 27 passed on Python 3.11.15).openai-codexdevice-code auth hitting HTTP 429), run/modelin an interactive session — the provider row should now stay visible instead of vanishing untillast_error_reset_atelapses orhermes auth reset <provider>is run.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
N/A — not a skill.
Screenshots / Logs
Not applicable — behavior verified via the regression tests above; the underlying visibility branch is already covered end-to-end by
tests/hermes_cli/test_authenticated_providers_exhausted_pool.py::test_picker_shows_exhausted_pool_provider.