mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user