fix(types): add explicit cast to silence TS7053 on FREE_PROVIDERS string index

noImplicitAny check rejects FREE_PROVIDERS[resolvedId] because resolveProviderId
returns string but FREE_PROVIDERS has literal key types. Cast to
Record<string, {noAuth?: boolean} | undefined> to express the intent clearly.
This commit is contained in:
diegosouzapw
2026-05-18 19:30:01 -03:00
parent c9dc205c74
commit 62f609755a

View File

@@ -794,7 +794,7 @@ export async function getProviderCredentials(
// noAuth free providers (e.g. opencode) need no DB connection — return synthetic credentials
// so the executor receives a valid credentials object without auth headers being added.
const resolvedId = resolveProviderId(provider);
if (FREE_PROVIDERS[resolvedId]?.noAuth) {
if ((FREE_PROVIDERS as Record<string, { noAuth?: boolean } | undefined>)[resolvedId]?.noAuth) {
return {
apiKey: null,
accessToken: null,