fix canvas agent defaults and video billing
This commit is contained in:
parent
76c684ff82
commit
1a80812c4f
@ -2946,10 +2946,8 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
|
||||
// 默认选择模型(根据系统设置)
|
||||
useEffect(() => {
|
||||
if (!selectedModelId && siteSettings) {
|
||||
// 使用系统设置的默认模型,如果没有设置则使用Agent模式
|
||||
const defaultModel = siteSettings.canvasDefaultModelId || "auto";
|
||||
currentModelIdRef.current = defaultModel;
|
||||
setSelectedModelId(defaultModel);
|
||||
currentModelIdRef.current = "auto";
|
||||
setSelectedModelId("auto");
|
||||
}
|
||||
}, [selectedModelId, siteSettings]);
|
||||
|
||||
@ -8850,6 +8848,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
|
||||
inline={true}
|
||||
providerType={currentModel?.providerType}
|
||||
imageGenConfig={currentModel?.imageGenConfig || undefined}
|
||||
hideImageCount={activeComposerMode === "agent"}
|
||||
hideAdvancedOptions={activeComposerMode === "image"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -430,6 +430,9 @@ export function generateVideo({ dataStream }: { dataStream: any }) {
|
||||
success: true,
|
||||
videoUrl: result.videoUrl,
|
||||
metadata: result.metadata,
|
||||
modelDisplayName: result.modelDisplayName,
|
||||
modelId: result.modelId,
|
||||
modelRef: result.modelRef,
|
||||
};
|
||||
} catch (error: any) {
|
||||
console.error("[Generate Video Tool] ❌ 生成失败:", error);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user