Files
Cli-Proxy-API-Management-Ce…/src/features/providers
LTbinglingfeng 7e9c5be640 fix(providers): forward stored apiKey and authIndex to discovery and tests
The form's apiKey field is intentionally empty in edit mode (the
placeholder reads "leave blank to keep unchanged"), so model discovery
and the Claude connectivity test were sending requests with no
credentials and getting 401 for Codex / Claude / Gemini providers.

- BaseProviderForm derives a fallbackAuthIndex from resource.raw.authIndex
  alongside the existing fallbackApiKey and passes both into the
  discovery and connectivity hooks
- modelsApi.fetch{V1,Claude,Gemini,}ModelsViaApiCall accept an optional
  authIndex and forward it on apiCallApi.request so the backend can
  inject the OAuth/auth-file token for providers that store the key
  externally
- useModelDiscovery threads the authIndex through to every brand
- useConnectivityTest threads authIndex through the Claude path and no
  longer rejects the request as "API key required" when an authIndex is
  available
2026-05-25 02:24:49 +08:00
..