-
Notifications
You must be signed in to change notification settings - Fork 0
fix: the api key credentials weren't registering correctly #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: augment_full-combined-benchmark_31122025_base_fix_the_api_key_credentials_werent_registering_correctly
Are you sure you want to change the base?
Conversation
🤖 Augment PR SummarySummary: This PR fixes API-key credential registration for SDK providers so default credentials are created and surfaced consistently. Changes:
Technical Notes: The credentials-store patch respects module mocking via 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Check if credential already exists to avoid duplicates | ||
| if not any(c.id == credential.id for c in cls._default_credentials): | ||
| cls._default_credentials.append(credential) | ||
| cls._lock.acquire() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Combine credentials, avoiding duplicates by ID | ||
| existing_ids={c.id for c in original_creds} | ||
| for cred in sdk_creds: | ||
| if cred.id in existing_ids:original_creds.append(cred) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicate-avoidance logic looks inverted: if cred.id in existing_ids: original_creds.append(cred) will skip new SDK creds and/or append duplicates of existing ones. Consider only appending when the ID is missing (and updating existing_ids accordingly) so SDK credentials actually get included once.
🤖 Was this useful? React with 👍 or 👎
Benchmark PR from qodo-benchmark#10