(provider: string, authProfile?: string)
| 73 | * 查找 API Key:先按 authProfile 精确匹配,再按 provider 兜底 |
| 74 | */ |
| 75 | export function resolveApiKey(provider: string, authProfile?: string): string { |
| 76 | if (authProfile) { |
| 77 | const key = getApiKeyByProfile(authProfile) |
| 78 | if (key) return key |
| 79 | } |
| 80 | return getApiKeyByProvider(provider) |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * 写入/更新一个 auth profile |
no test coverage detected