fix(providers): derive API key status from OpenClaw auth-profiles first#979
fix(providers): derive API key status from OpenClaw auth-profiles first#979
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 222f22ba54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| for (const profileId of profileIds) { | ||
| const profile = store.profiles[profileId]; | ||
| if (profile?.type === 'api_key' && profile.provider === provider && profile.key) { |
There was a problem hiding this comment.
Normalize auth-profile provider aliases before lookup
When OpenClaw stores a profile under a raw provider id that this file already normalizes elsewhere, such as openai-codex or google-gemini-cli via AUTH_PROFILE_PROVIDER_KEY_MAP, listAccounts() can surface the account as openai/google but this new lookup only accepts profile.provider === provider. In that imported/preserved-auth scenario, /api/provider-accounts/key-info and /has-api-key still report no key whenever ClawX local storage is empty, even though the runtime auth profile is present, so the new status source misses exactly the aliases it needs to cover.
Useful? React with 👍 / 👎.
No description provided.