refactor: migrate to async isConfiguredAsync and remove deprecated tool-plugin import
This commit is contained in:
1 parent
8cd50b1c4d
commit
59b7316944
13 files changed
+37
-61
No files matched your search
Vendored
+3
-3
@@ -134,13 +134,13 @@ export async function fetchOpenAIVideoDownload(params) {
|
||||
},
|
||||
});
|
||||
}
|
||||
export function buildOpenAIVideoGenerationProvider({ isProviderApiKeyConfigured, getPluginConfig, }) {
|
||||
export function buildOpenAIVideoGenerationProvider({ isProviderApiKeyConfiguredAsync, getPluginConfig, }) {
|
||||
return {
|
||||
id: "1h-openai-video",
|
||||
label: "1-h OpenAI Video",
|
||||
defaultModel: DEFAULT_OPENAI_VIDEO_MODEL,
|
||||
models: [DEFAULT_OPENAI_VIDEO_MODEL, "sora-2-pro", "gemini-video"],
|
||||
isConfigured: (ctx) => {
|
||||
isConfiguredAsync: async (ctx) => {
|
||||
const pluginCfg = resolveVideoConfig(ctx.cfg, getPluginConfig?.());
|
||||
if (resolvePluginApiKey(pluginCfg?.apiKey) ||
|
||||
Boolean(pluginCfg?.apiKey) ||
|
||||
@@ -149,7 +149,7 @@ export function buildOpenAIVideoGenerationProvider({ isProviderApiKeyConfigured,
|
||||
normalizeOptionalString(process.env.CCLOAD_API_KEY)) {
|
||||
return true;
|
||||
}
|
||||
return isProviderApiKeyConfigured({
|
||||
return await isProviderApiKeyConfiguredAsync({
|
||||
provider: "openai",
|
||||
...ctx,
|
||||
profileTypes: ["api_key"],
|
||||
|
||||
Reference in new issue
Block a user