openclaw/extensions/fal/onboard.ts
2026-03-17 21:35:13 -07:00

22 lines
509 B
TypeScript

import type { OpenClawConfig } from "openclaw/plugin-sdk/provider-onboard";
export const FAL_DEFAULT_IMAGE_MODEL_REF = "fal/fal-ai/flux/dev";
export function applyFalConfig(cfg: OpenClawConfig): OpenClawConfig {
if (cfg.agents?.defaults?.imageGenerationModel) {
return cfg;
}
return {
...cfg,
agents: {
...cfg.agents,
defaults: {
...cfg.agents?.defaults,
imageGenerationModel: {
primary: FAL_DEFAULT_IMAGE_MODEL_REF,
},
},
},
};
}