fix(tests): update provider key handling in TestOwnerPrefixedIDs

- Modified the TestOwnerPrefixedIDs test to use ScopedKey for provider key generation, ensuring unique keys based on owner context.
- This change enhances the accuracy of tests related to provider management by preventing key collisions during test execution.
This commit is contained in:
Max 2026-05-03 21:46:55 +08:00
parent 960f47c238
commit 222daaf645

View file

@ -615,8 +615,9 @@ func TestOwnerPrefixedIDs(t *testing.T) {
for _, tc := range cases {
t.Run(tc.key, func(t *testing.T) {
scopedKey := llmprovider.ScopedKey(&tc.owner, tc.key)
p := llmprovider.Provider{
Key: tc.key,
Key: scopedKey,
Name: tc.key,
Type: "openai",
APIURL: "https://api.openai.com",