-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
models.list marks auth-profile-backed SecretRef providers unavailable #90685
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Problem
models.listreports a model as unavailable when its provider config uses a non-env SecretRefapiKey, even if the same provider has a usable env-backed auth profile. That makes browse surfaces such as the model picker hide a runnable provider route as unavailable.Source evidence
On current
origin/main(520992a1defdeb213a4705a1f7690f2643769a42),src/gateway/server-methods/models-list-result.ts:60definesmodelCatalogEntryHasUnknownSecretRefAvailability(...)and returns true for both the literalsecretref-managedmarker and any SecretRef whosesourceis notenv.buildPublicModelsListEntry(...)then checks that helper atsrc/gateway/server-methods/models-list-result.ts:226and immediately returnsavailable: falsebefore the normal provider auth checker can run.That conflicts with the same file's auth-profile path:
createModelsListProviderAuthChecker(...)callshasRuntimeAvailableProviderAuth(...) || hasReadOnlyAvailableProfileAuth(...)atsrc/gateway/server-methods/models-list-result.ts:190. The read-only profile checker can prove env-backed API-key profiles atsrc/gateway/server-methods/models-list-result.ts:109.Runtime auth also supports this shape.
resolveApiKeyForProvider(...)insrc/agents/model-auth.ts:939walks configured auth profiles and can resolve an env-backed profile for the provider even when the provider config itself carries a non-env SecretRef marker.Reproduction
This is the minimal shape:
vllmhas catalog modelllama-securemodels.providers.vllm.apiKeyis a non-env SecretRef, for example{ source: "file", provider: "mounted-json", id: "/providers/vllm/apiKey" }vllm:envwithkeyRef: { source: "env", provider: "default", id: "VLLM_API_KEY" }VLLM_API_KEYis presentThe runtime auth path can resolve the provider from
profile:vllm:env, butmodels.listreturns the catalog row withavailable: false.Before-fix proof from a local source checkout:
{ "runtimeAuth": { "source": "profile:vllm:env", "mode": "api-key", "profileId": "vllm:env", "hasApiKey": true }, "modelsList": { "ok": true, "result": { "models": [ { "id": "llama-secure", "name": "Llama Secure", "provider": "vllm", "available": false } ] } } }Expected behavior
models.listshould report the row as available when the provider auth checker can prove usable runtime auth through a compatible env-backed auth profile. Non-env SecretRef-only providers without a usable profile should still remain unavailable/unknown in this read-only browse path.Proposed fix
Remove the duplicate early SecretRef availability guard from
buildPublicModelsListEntry(...)and let the existing provider auth checker make the single availability decision. That keeps non-env SecretRef-only providers unavailable while allowing the auth-profile-backed provider case.Regression coverage
Add a focused
models.listregression covering both non-env provider config shapes:secretref-managedBoth should return
available: truewhen an env-backedvllm:envprofile is present. Existing negative coverage should continue proving non-env SecretRef-only providers stay unavailable.Focused proof command:
Duplicate / overlap checks
I did not find an exact open issue or PR for this failure.
Commands checked:
Closest overlap found: open PR #90328 also touches
src/gateway/server-methods/models-list-result.ts, but its diff only adds model-pickeragentRuntimemetadata and does not change this SecretRef/profile availability path.