Skip to content

fix(providers): derive API key status from OpenClaw auth-profiles first#979

Merged
su8su merged 1 commit intomainfrom
fix_custom_api_key_display_error
May 7, 2026
Merged

fix(providers): derive API key status from OpenClaw auth-profiles first#979
su8su merged 1 commit intomainfrom
fix_custom_api_key_display_error

Conversation

@su8su
Copy link
Copy Markdown
Contributor

@su8su su8su commented May 6, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@su8su su8su merged commit 0c8dc8c into main May 7, 2026
6 of 7 checks passed
@su8su su8su deleted the fix_custom_api_key_display_error branch May 7, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant