diff --git a/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx b/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx index 0f03799d3..af2cf2744 100644 --- a/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx +++ b/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx @@ -113,7 +113,7 @@ export type AIConfigCallbacks = { cancellationToken?: string ) => Promise<{ aiconfig: AIConfig }>; cancel: (cancellationToken: string) => Promise; - save: (aiconfig: AIConfig) => Promise; + save?: (aiconfig: AIConfig) => Promise; setConfigDescription: (description: string) => Promise; setConfigName: (name: string) => Promise; setParameters: (parameters: JSONObject, promptName?: string) => Promise; @@ -950,7 +950,7 @@ export default function AIConfigEditor({ Clear Outputs )} - {!readOnly && ( + {!readOnly && saveCallback && ( ( getPromptModelName(prompt, defaultConfigModelName) ); @@ -44,6 +46,7 @@ export default memo(function ModelSelector({ label="Model" variant="unstyled" maxDropdownHeight={200} + disabled={readOnly} rightSection={ selectedModel ? (