fix(model): detect auth-store credential_pool for mapped providers#5753
fix(model): detect auth-store credential_pool for mapped providers#5753jakubkrcmar wants to merge 1 commit into
Conversation
01aae9a to
325f4c0
Compare
|
Refreshed this PR on top of current upstream v0.8.0 tip. The branch now contains only the still-needed delta: credential_pool detection for mapped providers like copilot plus curated gpt-5.4/gpt-5.4-mini entries for openai-codex. |
|
I hit a closely related case on the gateway In my repro, the problem was not only Copilot model visibility, but also provider visibility when credentials existed in Hermes auth storage / credential pool but were not exported as environment variables in the current process. What I observed:
It also looks like there is a provider-ID mismatch aspect for Copilot:
So provider detection and curated model lookup can disagree unless both the Hermes slug and the mapped models.dev id are checked consistently. A similar mapping issue may also affect Gemini / Google:
In short,
And then normalizes provider slug ↔ models.dev id before duplicate suppression / curated model lookup. I’m mentioning this because the fix here may want to cover not just Copilot model enumeration, but the broader “authenticated in Hermes but not exported in env vars” case too. |
325f4c0 to
e82b456
Compare
|
Thanks — I reproduced the broader case locally and refreshed this PR branch on top of current upstream. Verified behavior difference against clean upstream:
So I agree the fix should be framed as broader provider visibility from Hermes auth storage, not just Copilot model enumeration. This PR still does two concrete things:
It does not try to fully rewrite all slug <-> models.dev normalization paths, but it does address the verified "authenticated in Hermes, not exported in env vars" failure mode that affected both |
|
Quick note: GitHub Actions on this fork PR currently show |
e82b456 to
6e353aa
Compare
|
Verified again against current origin/main after rebasing.\n\nCurrent upstream still misses Hermes-mapped providers when credentials exist only in auth-store credential_pool and are not exported as env vars. In a local smoke test, clean upstream omitted gemini in that scenario, while the reduced patch makes gemini appear with its curated models.\n\nI also trimmed this PR to only that surviving fix. The earlier openai-codex curated-model addition is no longer included because current upstream already has that behavior. |
6e353aa to
4f227f1
Compare
|
Refreshed this branch on top of current origin/main and re-verified the behavior against clean upstream. What I checked locally:
So the fix is still needed; this PR now contains only the surviving delta on top of current upstream. |
|
This branch has been refreshed on top of current Re-verified locally against clean upstream:
Would appreciate maintainer review when convenient. |
|
Thanks for the careful, well-maintained contribution @jakubkrcmar! This fix has already been merged into Automated hermes-sweeper review. The
Closing as implemented on main. |
Summary
credential_poolentries as valid credentials during/modelprovider listing for Hermes-mapped providerscredential_poolpathRepro
With credentials present only in Hermes auth storage under
credential_pooland no matching provider env var exported:geminifrom/modelgeminiappear correctly with its curated modelsScope
This PR only fixes the mapped-provider
credential_pooldiscovery gap inlist_authenticated_providers().It does not attempt broader slug-normalization cleanup, and it no longer includes the earlier
openai-codexcurated-model delta because current upstream already has that behavior.Validation
list_authenticated_providers()against cleanorigin/maingeminionly incredential_pool./.venv/bin/python -m pytest tests/hermes_cli/test_overlay_slug_resolution.py -q./.venv/bin/python -m pytest tests/hermes_cli/test_model_switch_custom_providers.py -q