Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

update logic for determining when AI is enabled (#6081)

Myles Scolnick9dcff66e5f91
diff --git a/frontend/src/core/config/config.ts b/frontend/src/core/config/config.ts
index e1c38bbc23..54af4eddeb 100644
--- a/frontend/src/core/config/config.ts
+++ b/frontend/src/core/config/config.ts
@@ -76,13 +76,9 @@ export const editorFontSizeAtom = atom<number>((get) => {
export function isAiEnabled(config: UserConfig) {
return (
- Boolean(config.ai?.open_ai?.api_key) ||
- Boolean(config.ai?.anthropic?.api_key) ||
- Boolean(config.ai?.google?.api_key) ||
- Boolean(config.ai?.azure?.api_key) ||
- Boolean(config.ai?.ollama?.api_key) ||
- Boolean(config.ai?.open_ai_compatible?.api_key) ||
- Boolean(config.ai?.bedrock?.profile_name)
+ Boolean(config.ai?.models?.chat_model) ||
+ Boolean(config.ai?.models?.edit_model) ||
+ Boolean(config.ai?.models?.autocomplete_model)
);
}