mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Revert to pre-AI-SDK state (commit67e568f6b) This commit reverts the codebase to the state before AI SDK migration work began. Target commit:67e568f6b- refactor: replace fetch_instructions with skill tool and built-in skills (#10913) Date: January 29, 2026 This removes approximately 152 commits of AI SDK migration work. A follow-up PR will add back bug fixes and features that are unrelated to AI SDK. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { SECRET_STATE_KEYS, GLOBAL_SECRET_KEYS, ProviderSettings } from "@roo-code/types"
|
|
|
|
export function checkExistKey(config: ProviderSettings | undefined) {
|
|
if (!config) {
|
|
return false
|
|
}
|
|
|
|
// Special case for fake-ai, openai-codex, qwen-code, and roo providers which don't need any configuration.
|
|
if (config.apiProvider && ["fake-ai", "openai-codex", "qwen-code", "roo"].includes(config.apiProvider)) {
|
|
return true
|
|
}
|
|
|
|
// Check all secret keys from the centralized SECRET_STATE_KEYS array.
|
|
// Filter out keys that are not part of ProviderSettings (global secrets are stored separately)
|
|
const providerSecretKeys = SECRET_STATE_KEYS.filter((key) => !GLOBAL_SECRET_KEYS.includes(key as any))
|
|
const hasSecretKey = providerSecretKeys.some((key) => config[key as keyof ProviderSettings] !== undefined)
|
|
|
|
// Check additional non-secret configuration properties
|
|
const hasOtherConfig = [
|
|
config.awsRegion,
|
|
config.vertexProjectId,
|
|
config.ollamaModelId,
|
|
config.lmStudioModelId,
|
|
config.vsCodeLmModelSelector,
|
|
].some((value) => value !== undefined)
|
|
|
|
return hasSecretKey || hasOtherConfig
|
|
}
|