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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
add GitHub as a provider, add OpenAI models (#6044)
Myles Scolnick4b4de92997c2
diff --git a/frontend/src/components/ai/ai-model-dropdown.tsx b/frontend/src/components/ai/ai-model-dropdown.tsxindex f87e57f068..ddab129421 100644--- a/frontend/src/components/ai/ai-model-dropdown.tsx+++ b/frontend/src/components/ai/ai-model-dropdown.tsx@@ -47,10 +47,6 @@ export const AIModelDropdown = ({}: AIModelDropdownProps) => {const currentValue = value ? AiModelId.parse(value) : undefined;- const selectModel = (modelId: QualifiedModelId) => {- onSelect(modelId);- };-const [marimoConfig] = useResolvedMarimoConfig();const configModels = marimoConfig.ai?.models;@@ -148,7 +144,7 @@ export const AIModelDropdown = ({<ProviderDropdownContentkey={provider}provider={provider}- onSelect={selectModel}+ onSelect={onSelect}models={models}iconSizeClass={iconSizeClass}/>@@ -245,10 +241,6 @@ const ProviderDropdownContent = ({onSelect={(e) => {onSelect(qualifiedModelId);}}- onClick={(e) => {- e.preventDefault();- onSelect(qualifiedModelId);- }}><AiProviderIcon provider={iconProvider} className="h-4 w-4" /><div className="pl-1 flex flex-col">diff --git a/frontend/src/components/ai/ai-provider-icon.tsx b/frontend/src/components/ai/ai-provider-icon.tsxindex 581b7ef735..e740aa4664 100644--- a/frontend/src/components/ai/ai-provider-icon.tsx+++ b/frontend/src/components/ai/ai-provider-icon.tsx@@ -4,6 +4,7 @@ import AnthropicIcon from "@marimo-team/llm-info/icons/anthropic.svg?inline";import BedrockIcon from "@marimo-team/llm-info/icons/aws.svg?inline";import AzureIcon from "@marimo-team/llm-info/icons/azure.svg?inline";import DeepseekIcon from "@marimo-team/llm-info/icons/deepseek.svg?inline";+import GitHubIcon from "@marimo-team/llm-info/icons/github.svg?inline";import GeminiIcon from "@marimo-team/llm-info/icons/googlegemini.svg?inline";import OllamaIcon from "@marimo-team/llm-info/icons/ollama.svg?inline";import OpenAIIcon from "@marimo-team/llm-info/icons/openai.svg?inline";@@ -20,6 +21,7 @@ const icons: Record<ProviderId, string> = {azure: AzureIcon,bedrock: BedrockIcon,deepseek: DeepseekIcon,+ github: GitHubIcon,};export interface AiProviderIconPropsdiff --git a/frontend/src/components/app-config/ai-config.tsx b/frontend/src/components/app-config/ai-config.tsxindex 9d389ff750..d2e43f50c2 100644--- a/frontend/src/components/app-config/ai-config.tsx+++ b/frontend/src/components/app-config/ai-config.tsx@@ -333,11 +333,15 @@ export const ProviderSelect: React.FC<ProviderSelectProps> = ({);};-const renderCopilotProvider = (- form: UseFormReturn<UserConfig>,- onSubmit: (values: UserConfig) => Promise<void>,- config: UserConfig,-) => {+const renderCopilotProvider = ({+ form,+ config,+ onSubmit,+}: {+ form: UseFormReturn<UserConfig>;+ config: UserConfig;+ onSubmit: (values: UserConfig) => Promise<void>;+}) => {const copilot = form.getValues("completion.copilot");if (copilot === false) {return null;@@ -409,7 +413,7 @@ export const AiCodeCompletionConfig: React.FC<AiConfigProps> = ({testId="copilot-select"/>- {renderCopilotProvider(form, onSubmit, config)}+ {renderCopilotProvider({ form, config, onSubmit })}</SettingGroup>);};@@ -419,16 +423,25 @@ const AccordionFormItem = ({triggerClassName,provider,children,+ isConfigured,}: {title: string;triggerClassName?: string;provider: AiProviderIconProps["provider"];children: React.ReactNode;+ isConfigured: boolean;}) => {return (<AccordionItem value={provider}><AccordionTrigger className={triggerClassName}>- <AiProviderTitle provider={provider}>{title}</AiProviderTitle>+ <AiProviderTitle provider={provider}>+ {title}+ {isConfigured && (+ <span className="ml-2 px-1 rounded bg-muted text-xs font-medium border">+ Configured+ </span>+ )}+ </AiProviderTitle></AccordionTrigger><AccordionContent wrapperClassName="flex flex-col gap-4">{children}@@ -443,6 +456,10 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({}) => {const isWasmRuntime = isWasm();+ const hasValue = (name: FieldPath<UserConfig>) => {+ return !!form.getValues(name);+ };+return (<SettingGroup><p className="text-sm text-muted-secondary">@@ -458,6 +475,7 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({title="OpenAI"provider="openai"triggerClassName="pt-0"+ isConfigured={hasValue("ai.open_ai.api_key")}><ApiKeyform={form}@@ -485,7 +503,11 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({/></AccordionFormItem>- <AccordionFormItem title="Anthropic" provider="anthropic">+ <AccordionFormItem+ title="Anthropic"+ provider="anthropic"+ isConfigured={hasValue("ai.anthropic.api_key")}+ ><ApiKeyform={form}config={config}@@ -504,7 +526,11 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({/></AccordionFormItem>- <AccordionFormItem title="Google" provider="google">+ <AccordionFormItem+ title="Google"+ provider="google"+ isConfigured={hasValue("ai.google.api_key")}+ ><ApiKeyform={form}config={config}@@ -523,7 +549,11 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({/></AccordionFormItem>- <AccordionFormItem title="Ollama" provider="ollama">+ <AccordionFormItem+ title="Ollama"+ provider="ollama"+ isConfigured={hasValue("ai.ollama.base_url")}+ ><BaseUrlform={form}config={config}@@ -534,7 +564,40 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({/></AccordionFormItem>- <AccordionFormItem title="Azure" provider="azure">+ <AccordionFormItem+ title="GitHub"+ provider="github"+ isConfigured={hasValue("ai.github.api_key")}+ >+ <ApiKey+ form={form}+ config={config}+ name="ai.github.api_key"+ placeholder="ghp_..."+ testId="ai-github-api-key-input"+ description={+ <>+ Your GitHub API token from{" "}+ <Kbd className="inline">gh auth token</Kbd>.+ </>+ }+ />+ <BaseUrl+ form={form}+ config={config}+ name="ai.github.base_url"+ placeholder="https://api.githubcopilot.com/"+ testId="ai-github-base-url-input"+ />+ </AccordionFormItem>++ <AccordionFormItem+ title="Azure"+ provider="azure"+ isConfigured={+ hasValue("ai.azure.api_key") && hasValue("ai.azure.base_url")+ }+ ><ApiKeyform={form}config={config}@@ -560,7 +623,11 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({/></AccordionFormItem>- <AccordionFormItem title="AWS Bedrock" provider="bedrock">+ <AccordionFormItem+ title="AWS Bedrock"+ provider="bedrock"+ isConfigured={hasValue("ai.bedrock.region_name")}+ ><p className="text-sm text-muted-secondary mb-2">To use AWS Bedrock, you need to configure AWS credentials andregion. See the{" "}@@ -646,6 +713,10 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({<AccordionFormItemtitle="OpenAI-Compatible"provider="openai-compatible"+ isConfigured={+ hasValue("ai.open_ai_compatible.api_key") &&+ hasValue("ai.open_ai_compatible.base_url")+ }><ApiKeyform={form}diff --git a/frontend/src/core/ai/ids/__tests__/ids.test.ts b/frontend/src/core/ai/ids/__tests__/ids.test.tsindex 8ff8683f11..653df733d0 100644--- a/frontend/src/core/ai/ids/__tests__/ids.test.ts+++ b/frontend/src/core/ai/ids/__tests__/ids.test.ts@@ -26,6 +26,7 @@ describe("AiModelId", () => {"google","ollama","bedrock",+ "github",];providers.forEach((provider) => {@@ -67,6 +68,12 @@ describe("AiModelId", () => {expect(modelId.shortModelId).toBe("titan-text");});+ it("should parse github qualified id", () => {+ const modelId = AiModelId.parse("github/gpt-4o");+ expect(modelId.providerId).toBe("github");+ expect(modelId.shortModelId).toBe("gpt-4o");+ });+it("should handle multiple slashes", () => {const modelId = AiModelId.parse("openai/gpt-4/turbo");expect(modelId.providerId).toBe("openai");@@ -171,6 +178,7 @@ describe("AiModelId", () => {"google","ollama","bedrock",+ "github",];providers.forEach((provider) => {diff --git a/frontend/src/core/ai/ids/ids.ts b/frontend/src/core/ai/ids/ids.tsindex 660aee3b6e..65f719cbff 100644--- a/frontend/src/core/ai/ids/ids.ts+++ b/frontend/src/core/ai/ids/ids.ts@@ -10,6 +10,7 @@ export const PROVIDERS = ["bedrock","deepseek","azure",+ "github",] as const;export type ProviderId = (typeof PROVIDERS)[number];diff --git a/marimo/_cli/development/commands.py b/marimo/_cli/development/commands.pyindex 625a55ff8c..abc0908e43 100644--- a/marimo/_cli/development/commands.py+++ b/marimo/_cli/development/commands.py@@ -63,6 +63,7 @@ def _generate_server_api_schema() -> dict[str, Any]:CellConfig,config.OpenAiConfig,config.AnthropicConfig,+ config.GitHubConfig,config.GoogleAiConfig,config.BedrockConfig,config.AiConfig,diff --git a/marimo/_config/config.py b/marimo/_config/config.pyindex 61ef825366..4a4ea1be30 100644--- a/marimo/_config/config.py+++ b/marimo/_config/config.py@@ -268,6 +268,7 @@ class AiConfig(TypedDict, total=False):- `bedrock`: the Bedrock config- `azure`: the Azure config- `ollama`: the Ollama config+ - `github`: the GitHub config- `open_ai_compatible`: the OpenAI-compatible config"""@@ -283,6 +284,7 @@ class AiConfig(TypedDict, total=False):bedrock: BedrockConfigazure: OpenAiConfigollama: OpenAiConfig+ github: GitHubConfigopen_ai_compatible: OpenAiConfig@@ -351,6 +353,20 @@ class BedrockConfig(TypedDict, total=False):aws_secret_access_key: NotRequired[str]+@dataclass+class GitHubConfig(TypedDict, total=False):+ """Configuration options for GitHub.++ **Keys.**++ - `api_key`: the GitHub API token+ - `base_url`: the base URL for the API+ """++ api_key: str+ base_url: NotRequired[str]++@dataclassclass PythonLanguageServerConfig(TypedDict, total=False):"""diff --git a/marimo/_server/ai/config.py b/marimo/_server/ai/config.pyindex 5311f459b2..c34964920d 100644--- a/marimo/_server/ai/config.py+++ b/marimo/_server/ai/config.py@@ -57,7 +57,24 @@ class AnyProviderConfig:@classmethoddef for_ollama(cls, config: AiConfig) -> AnyProviderConfig:return cls._for_openai_like(- config, "ollama", "Ollama", fallback_key="ollama-placeholder"+ config,+ "ollama",+ "Ollama",+ fallback_key="ollama-placeholder",+ # Default base URL for Ollama+ fallback_base_url="http://127.0.0.1:11434/v1",+ )++ @classmethod+ def for_github(cls, config: AiConfig) -> AnyProviderConfig:+ fallback_key = cls.os_key("GITHUB_TOKEN")+ return cls._for_openai_like(+ config,+ "github",+ "GitHub",+ fallback_key=fallback_key,+ # Default base URL for GitHub Copilot+ fallback_base_url="https://api.githubcopilot.com/",)@classmethod@@ -68,12 +85,13 @@ class AnyProviderConfig:name: str,*,fallback_key: Optional[str] = None,+ fallback_base_url: Optional[str] = None,) -> AnyProviderConfig:ai_config = _get_ai_config(config, key, name)key = _get_key(ai_config, name, fallback_key=fallback_key)kwargs: dict[str, Any] = {- "base_url": _get_base_url(ai_config),+ "base_url": _get_base_url(ai_config) or fallback_base_url,"api_key": key,"ssl_verify": ai_config.get("ssl_verify", True),"ca_bundle_path": ai_config.get("ca_bundle_path", None),@@ -145,6 +163,8 @@ class AnyProviderConfig:return cls.for_openai(config)elif model_id.provider == "azure":return cls.for_azure(config)+ elif model_id.provider == "github":+ return cls.for_github(config)elif model_id.provider == "openai_compatible":return cls.for_openai_compatible(config)else:diff --git a/marimo/_smoke_tests/ai/github_model_check.py b/marimo/_smoke_tests/ai/github_model_check.pynew file mode 100644index 0000000000..33243035f4--- /dev/null+++ b/marimo/_smoke_tests/ai/github_model_check.py@@ -0,0 +1,77 @@+# /// script+# dependencies = [+# "marimo",+# "openai==1.99.9",+# ]+# [tool.marimo.runtime]+# auto_instantiate = false+# ///++import marimo++__generated_with = "0.14.16"+app = marimo.App(width="medium")+++def _():+ import marimo as mo+ import openai+ import os+ return mo, openai+++def _(mo):+ # Set up OpenAI API key+ api_key = mo.ui.text(+ value="", label="GitHub API Key. Use `gh auth token`", full_width=True+ )+ api_key+ return (api_key,)+++def _(api_key, openai):+ client = openai.Client(+ base_url="https://api.githubcopilot.com/",+ api_key=api_key.value,+ )+ models = client.models.list().model_dump()+ return client, models+++def _(models):+ ids = [item["id"] for item in models["data"]]+ ids+ return (ids,)+++def _(mo):+ # Button to trigger API call+ run_button = mo.ui.run_button(label="Generate Response")+ run_button+ return (run_button,)+++def _(client, ids, run_button):+ if run_button.value:+ for model in ids:+ try:+ response = client.chat.completions.create(+ model=model,+ messages=[{"role": "user", "content": "hi"}],+ max_tokens=100,+ )+ print("✅ Model " + model + " passed: ")+ print(response.choices[0].message.content)+ except:+ print("❌ Model " + model + " failed")+ return+++if __name__ == "__main__":+ app.run()diff --git a/marimo/_smoke_tests/ai/model_check.py b/marimo/_smoke_tests/ai/model_check.pynew file mode 100644index 0000000000..c4e4da04ff--- /dev/null+++ b/marimo/_smoke_tests/ai/model_check.py@@ -0,0 +1,179 @@+# /// script+# requires-python = ">=3.12"+# dependencies = [+# "anthropic==0.64.0",+# "any-llm-sdk[anthropic]==0.12.1",+# "google-genai==1.30.0",+# "marimo",+# "polars==1.32.3",+# "protobuf==5.29.5",+# ]+# ///++import marimo++__generated_with = "0.14.17"+app = marimo.App(width="medium")++[email protected](hide_code=True)+def _():+ models_csv = """+ name,model,description,provider,roles,thinking+ Claude 3 Haiku,claude-3-haiku-20240307,Fastest model optimized for speed and efficiency,anthropic,"chat, edit",False+ Claude 3.5 Haiku,claude-3-5-haiku-20241022,Fast and efficient model with excellent performance for everyday tasks,anthropic,"chat, edit",False+ Claude 3.5 Sonnet v2,claude-3-5-sonnet-20241022,High-performance model with advanced coding and reasoning capabilities,anthropic,"chat, edit, code, vision",False+ Claude Opus 4,claude-opus-4-20250514,World's best coding model with sustained performance on complex tasks,anthropic,"chat, edit, code, reasoning, vision",True+ Claude Opus 4.1,claude-opus-4-1-20250805,Latest flagship model with hybrid reasoning capabilities,anthropic,"chat, edit, reasoning, vision",True+ Claude Sonnet 3.7,claude-3-7-sonnet-20250219,Hybrid AI reasoning model with rapid or thoughtful responses,anthropic,"chat, edit, reasoning, vision",True+ Claude Sonnet 4,claude-sonnet-4-20250514,Superior coding and reasoning while responding precisely to instructions,anthropic,"chat, edit, code, reasoning, vision",True+ GPT-4.1,gpt-4.1,"Fast, highly intelligent model with largest context window",azure,"chat, edit, code",False+ GPT-4o,gpt-4o,"Fast, intelligent, flexible GPT model with multimodal capabilities",azure,"chat, edit, vision",False+ GPT-5,gpt-5,The best model for coding and agentic tasks across domains,azure,"chat, edit, code, agent",False+ GPT-5 Mini,gpt-5-mini,"A faster, cost-efficient version of GPT-5 for well-defined tasks",azure,"chat, edit",False+ o1-mini,o1-mini,Faster and cheaper reasoning model,azure,"reasoning, math",True+ o1-preview,o1-preview,Reasoning model with advanced problem solving capabilities,azure,"reasoning, math, code",True+ Amazon Nova Lite,amazon.nova-lite-v1:0,Fast and cost-effective multimodal model,bedrock,"chat, edit, vision",False+ Amazon Nova Micro,amazon.nova-micro-v1:0,Ultra-fast text-only model for simple tasks,bedrock,"chat, edit",False+ Amazon Nova Premier,amazon.nova-premier-v1:0,High-performance multimodal model for complex reasoning tasks,bedrock,"chat, edit, vision, reasoning",False+ Amazon Nova Pro,amazon.nova-pro-v1:0,Balanced multimodal model for general-purpose applications,bedrock,"chat, edit, vision",False+ Claude 3.5 Haiku,anthropic.claude-3-5-haiku-20241022-v1:0,Fast and efficient model for everyday tasks,bedrock,"chat, edit",False+ Claude 3.5 Sonnet v2,anthropic.claude-3-5-sonnet-20241022-v1:0,High-performance model with advanced coding capabilities,bedrock,"chat, edit, code, vision",False+ Claude Opus 4.1,anthropic.claude-opus-4-1-20250805-v1:0,Latest flagship model with hybrid reasoning capabilities,bedrock,"chat, edit, reasoning, vision",True+ Claude Sonnet 3.7,us.anthropic.claude-3-7-sonnet-20250219-v1:0,Hybrid reasoning model with rapid or thoughtful responses (uses inference profile),bedrock,"chat, edit, reasoning, vision",True+ Claude Sonnet 4,anthropic.claude-sonnet-4-20250514-v1:0,Superior coding and reasoning model,bedrock,"chat, edit, code, reasoning, vision",True+ DeepSeek R1,deepseek.deepseek-r1-671b-instruct-v1:0,Advanced reasoning model with step-by-step thinking,bedrock,"reasoning, math, code",True+ Meta Llama 3.2 90B Vision,meta.llama3-2-90b-instruct-v1:0,Large multimodal model with vision capabilities,bedrock,"chat, edit, vision",False+ Meta Llama 3.3 70B,meta.llama3-3-70b-instruct-v1:0,Latest Meta model with improved capabilities,bedrock,"chat, edit, code",False+ Gemini 1.5 Flash,gemini-1.5-flash,Fast and cost-effective model for high-volume applications,google,"chat, edit",False+ Gemini 1.5 Pro,gemini-1.5-pro,Advanced multimodal model with extensive context understanding,google,"chat, edit, vision, code",False+ Gemini 2.0 Flash,gemini-2.0-flash,"Next generation features, speed, and realtime streaming",google,"chat, edit, vision, code",False+ Gemini 2.5 Flash,gemini-2.5-flash,Efficient workhorse model with controllable thinking budget,google,"chat, edit, reasoning",True+ Gemini 2.5 Flash-Lite,gemini-2.5-flash-lite,Most cost-efficient model supporting high throughput,google,"chat, edit",False+ Gemini 2.5 Pro,gemini-2.5-pro,Most intelligent and capable AI model with 1M token context window,google,"chat, edit, reasoning, vision, code",True+ Codellama 34B,codellama:34b,Specialized model optimized for code generation and programming,ollama,"code, edit",False+ DeepSeek R1 70B,deepseek-r1:70b,Open reasoning model with performance approaching leading models,ollama,"reasoning, math, code",True+ DeepSeek R1 7B,deepseek-r1:7b,Smaller reasoning model with step-by-step thinking,ollama,"reasoning, math",True+ Gemma 3 27B,gemma3:27b,"Current, most capable Google model that runs on a single GPU",ollama,"chat, edit, code, vision",False+ Llama 3.1 70B,llama3.1:70b,State-of-the-art model from Meta with 70B parameters,ollama,"chat, edit, code",False+ Llama 3.2 Vision 11B,llama3.2-vision:11b,Multimodal model with vision capabilities,ollama,"chat, edit, vision",False+ Llama 3.2 Vision 90B,llama3.2-vision:90b,Large multimodal model with advanced vision understanding,ollama,"chat, edit, vision",False+ Llava 34B,llava:34b,Advanced vision-language understanding model,ollama,"chat, vision",False+ Mistral 7B,mistral:7b,Efficient and powerful model for general-purpose tasks,ollama,"chat, edit",False+ Qwen 3 32B,qwen3:32b,Latest generation model with dense and MoE architectures,ollama,"chat, edit, code",True+ gpt-oss 120B,gpt-oss:120b,Most powerful open-weight model from OpenAI with agentic capabilities,ollama,"chat, reasoning, agent, code",True+ gpt-oss 20B,gpt-oss:20b,Medium-sized open-weight model for low latency tasks,ollama,"chat, agent",True+ GPT-4.1,gpt-4.1,"Fast, highly intelligent model with largest context window (1 million tokens)",openai,"chat, edit, code",False+ GPT-4.1 Mini,gpt-4.1-mini,"Balanced for intelligence, speed, and cost",openai,"chat, edit",False+ GPT-4o,gpt-4o,"Fast, intelligent, flexible GPT model with multimodal capabilities",openai,"chat, edit, vision",False+ GPT-4o Mini,gpt-4o-mini,"Fast, affordable small model for focused tasks",openai,"chat, edit",False+ GPT-5,gpt-5,The best model for coding and agentic tasks across domains,openai,"chat, edit, code, agent",False+ GPT-5 Mini,gpt-5-mini,"A faster, cost-efficient version of GPT-5 for well-defined tasks",openai,"chat, edit",False+ GPT-5 Nano,gpt-5-nano,"Fastest, most cost-efficient version of GPT-5",openai,"chat, edit",False+ o3,o3,Our most powerful reasoning model with chain-of-thought capabilities,openai,"reasoning, math, code",True+ o3-mini,o3-mini,A small model alternative to o3 for reasoning tasks,openai,"reasoning, math",True+ o3-pro,o3-pro,Version of o3 designed to think longer and provide most reliable responses,openai,"reasoning, math, code",True+ o4-mini,o4-mini,"Faster, more affordable reasoning model optimized for math, coding, and visual tasks",openai,"reasoning, code, vision",True+ """+ return (models_csv,)+++def _(models_csv):+ import polars as pl+ import io++ df = pl.read_csv(io.BytesIO(models_csv.encode()))+ df+ return (df,)+++def _():+ import any_llm+ import marimo as mo+ import anthropic+ return any_llm, mo+++def get_key(provider):+ from marimo._config.manager import get_default_config_manager++ config = get_default_config_manager(current_path=None).get_config(+ hide_secrets=False+ )["ai"]+ if provider == "openai":+ return config.get("open_ai", {}).get("api_key")+ return config.get(provider, {}).get("api_key")+++def _(any_llm, mo):+ @mo.persistent_cache()+ def query(provider, model):+ key = get_key(provider)+ return any_llm.completion(+ model=f"{provider}/{model}",+ messages=[{"role": "user", "content": "hi"}],+ api_key=key,+ )+ return (query,)+++def _(df, query):+ SKIP = {"azure", "bedrock", "ollama"}++ for record in df.to_dicts():+ provider = record["provider"]+ if provider in SKIP:+ continue+ model = record["model"]+ print(f"Testing {provider} / {model}")+ try:+ res = query(provider, model)+ print(f"✅ {provider} / {model}")+ print(res.choices[0].message.content)+ except Exception as e:+ print(f"❌ {e}")+ return+++def _(query):+ others = [+ ["google", "codegemma"],+ ["google", "codegemma-2b"],+ ["google", "codegemma-7b"],+ ]++ for provider, model in others:+ print(f"Testing {provider} / {model}")+ try:+ res = query(provider, model)+ print(f"✅ {provider} / {model}")+ print(res.choices[0].message.content)+ except Exception as e:+ print(f"❌ {e}")+ return+++def _():+ import google.genai as genai++ client = genai.Client(api_key=get_key("google"))++ for m in client.models.list():+ for action in m.supported_actions:+ if action == "generateContent":+ print(f"Model name: {m.name}")+ print(f"Display name: {m.display_name}")+ print(f"Description: {m.description}")+ print("-" * 80)+ return+++if __name__ == "__main__":+ app.run()diff --git a/packages/llm-info/data/models.yml b/packages/llm-info/data/models.ymlindex 3037836ccf..17ccb4ec77 100644--- a/packages/llm-info/data/models.yml+++ b/packages/llm-info/data/models.yml@@ -116,6 +116,96 @@roles: [chat, edit]thinking: false+# OpenAI++- name: GPT-4.1+ model: gpt-4.1+ description: Fast, highly intelligent model with largest context window (1 million tokens)+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: GPT-4.1 Mini+ model: gpt-4.1-mini+ description: Balanced for intelligence, speed, and cost+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: GPT-4o+ model: gpt-4o+ description: Fast, intelligent, flexible GPT model with multimodal capabilities+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: GPT-4o Mini+ model: gpt-4o-mini+ description: Fast, affordable small model for focused tasks+ providers: [openai, github]+ roles: [chat, edit]+ thinking: false++- name: GPT-5+ model: gpt-5+ description: The best model for coding and agentic tasks across domains+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: GPT-5 Mini+ model: gpt-5-mini+ description: A faster, cost-efficient version of GPT-5 for well-defined tasks+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: GPT-5 Nano+ model: gpt-5-nano+ description: Fastest, most cost-efficient version of GPT-5+ providers: [openai]+ roles: [chat, edit]+ thinking: false++- name: o3+ model: o3+ description: Our most powerful reasoning model with chain-of-thought capabilities+ providers: [openai]+ roles: [chat, edit]+ thinking: true++- name: o3 Mini+ model: o3-mini+ description: A small model alternative to o3 for reasoning tasks+ providers: [openai]+ roles: [chat, edit]+ thinking: true++- name: o3 Pro+ model: o3-pro+ description: Version of o3 designed to think longer and provide most reliable responses+ providers: [openai]+ roles: [chat, edit]+ thinking: true++- name: o4 Mini+ model: o4-mini+ description: Faster, more affordable reasoning model optimized for math, coding, and visual tasks+ providers: [openai]+ roles: [chat, edit]+ thinking: true+++# GitHub++- name: GPT-3.5-turbo+ model: gpt-3.5-turbo+ description: Fast and efficient model with excellent performance for everyday tasks+ providers: [github]+ roles: [chat, edit]+ thinking: false++# Bedrock- name: Claude 3.5 Haiku (Bedrock)@@ -301,3 +391,4 @@providers: [ollama]roles: [chat]thinking: false+diff --git a/packages/llm-info/data/providers.yml b/packages/llm-info/data/providers.ymlindex 725432113a..c4cbbe06ba 100644--- a/packages/llm-info/data/providers.yml+++ b/packages/llm-info/data/providers.yml@@ -27,3 +27,8 @@id: ollamadescription: Ollama is a lightweight, open-source model server for running and sharing LLMs.url: https://ollama.ai/++- name: GitHub+ id: github+ description: GitHub's API for GPT models with GitHub-hosted models.+ url: https://github.com/features/copilotdiff --git a/packages/llm-info/icons/github.svg b/packages/llm-info/icons/github.svgnew file mode 100644index 0000000000..538ec5bf2a--- /dev/null+++ b/packages/llm-info/icons/github.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>\ No newline at end of filediff --git a/packages/openapi/api.yaml b/packages/openapi/api.yamlindex dfb2d63b58..f6283bdd7d 100644--- a/packages/openapi/api.yaml+++ b/packages/openapi/api.yaml@@ -8,7 +8,7 @@ components:nullable: truetype: booleanrequired:- - package+ - packagetype: objectAiCompletionContext:properties:@@ -19,12 +19,12 @@ components:variables:items:oneOf:- - $ref: '#/components/schemas/VariableContext'- - type: string+ - $ref: '#/components/schemas/VariableContext'+ - type: stringtype: arrayrequired:- - schema- - variables+ - schema+ - variablestype: objectAiCompletionRequest:properties:@@ -37,9 +37,9 @@ components:type: stringlanguage:enum:- - python- - markdown- - sql+ - python+ - markdown+ - sqltype: stringprompt:type: string@@ -47,10 +47,10 @@ components:nullable: truetype: stringrequired:- - prompt- - includeOtherCode- - code- - language+ - prompt+ - includeOtherCode+ - code+ - languagetype: objectAiConfig:properties:@@ -60,14 +60,16 @@ components:$ref: '#/components/schemas/OpenAiConfig'bedrock:$ref: '#/components/schemas/BedrockConfig'+ github:+ $ref: '#/components/schemas/GitHubConfig'google:$ref: '#/components/schemas/GoogleAiConfig'max_tokens:type: integermode:enum:- - ask- - manual+ - ask+ - manualtype: stringmodels:properties:@@ -79,15 +81,15 @@ components:items:type: stringtype: array- edit_model:- type: stringdisplayed_models:items:type: stringtype: array+ edit_model:+ type: stringrequired:- - displayed_models- - custom_models+ - displayed_models+ - custom_modelstype: objectollama:$ref: '#/components/schemas/OpenAiConfig'@@ -102,18 +104,18 @@ components:properties:language:enum:- - python- - markdown- - sql+ - python+ - markdown+ - sqltype: stringprefix:type: stringsuffix:type: stringrequired:- - prefix- - suffix- - language+ - prefix+ - suffix+ - languagetype: objectAlert:properties:@@ -121,19 +123,19 @@ components:type: stringname:enum:- - alert+ - alerttype: stringtitle:type: stringvariant:enum:- - danger+ - dangernullable: truetype: stringrequired:- - title- - description- - name+ - title+ - description+ - nametype: objectAnthropicConfig:properties:@@ -144,33 +146,33 @@ components:properties:action:enum:- - restart+ - restartnullable: truetype: stringdescription:type: stringname:enum:- - banner+ - bannertype: stringtitle:type: stringvariant:enum:- - danger+ - dangernullable: truetype: stringrequired:- - title- - description- - name+ - title+ - description+ - nametype: objectBaseResponse:properties:success:type: booleanrequired:- - success+ - successtype: objectBedrockConfig:properties:@@ -185,13 +187,13 @@ components:type: objectCellChannel:enum:- - stdout- - stderr- - stdin- - pdb- - output- - marimo-error- - media+ - stdout+ - stderr+ - stdin+ - pdb+ - output+ - marimo-error+ - mediatype: stringCellConfig:properties:@@ -203,8 +205,8 @@ components:hide_code:type: booleanrequired:- - disabled- - hide_code+ - disabled+ - hide_codetype: objectCellOp:properties:@@ -213,13 +215,13 @@ components:console:nullable: trueoneOf:- - $ref: '#/components/schemas/CellOutput'- - items:- $ref: '#/components/schemas/CellOutput'- type: array+ - $ref: '#/components/schemas/CellOutput'+ - items:+ $ref: '#/components/schemas/CellOutput'+ type: arrayname:enum:- - cell-op+ - cell-optype: stringoutput:$ref: '#/components/schemas/CellOutput'@@ -239,9 +241,9 @@ components:timestamp:type: numberrequired:- - cell_id- - timestamp- - name+ - cell_id+ - timestamp+ - nametype: objectCellOutput:properties:@@ -249,21 +251,21 @@ components:$ref: '#/components/schemas/CellChannel'data:oneOf:- - type: string- - items:- $ref: '#/components/schemas/Error'- type: array- - additionalProperties: {}- type: object+ - type: string+ - items:+ $ref: '#/components/schemas/Error'+ type: array+ - additionalProperties: {}+ type: objectmimetype:$ref: '#/components/schemas/MimeType'timestamp:type: numberrequired:- - channel- - mimetype- - data- - timestamp+ - channel+ - mimetype+ - data+ - timestamptype: objectChatRequest:properties:@@ -285,8 +287,8 @@ components:url:type: stringrequired:- - url- - name+ - url+ - nametype: objectnullable: truetype: array@@ -296,90 +298,90 @@ components:parts:items:oneOf:- - properties:- text:- type: string- type:- enum:- - text- type: string- required:- - type+ - properties:+ text:+ type: string+ type:+ enum:- text- type: object- - properties:- details:- items:- properties:- signature:- nullable: true- type: string- text:- type: string- type:- enum:- - text- type: string- required:- - type- - text- type: object- type: array- reasoning:- type: string- type:- enum:- - reasoning- type: string- required:- - type- - reasoning- - details- type: object- - properties:- toolInvocation:+ type: string+ required:+ - type+ - text+ type: object+ - properties:+ details:+ items:properties:- args:- additionalProperties: {}- type: object- result: {}- state:- enum:- - result+ signature:+ nullable: truetype: string- step:- type: integer- toolCallId:+ text:type: string- toolName:+ type:+ enum:+ - texttype: stringrequired:- - state- - result- - toolCallId- - toolName- - step- - args+ - type+ - texttype: object- type:- enum:- - tool-invocation- type: string- required:- - type- - toolInvocation- type: object+ type: array+ reasoning:+ type: string+ type:+ enum:+ - reasoning+ type: string+ required:+ - type+ - reasoning+ - details+ type: object+ - properties:+ toolInvocation:+ properties:+ args:+ additionalProperties: {}+ type: object+ result: {}+ state:+ enum:+ - result+ type: string+ step:+ type: integer+ toolCallId:+ type: string+ toolName:+ type: string+ required:+ - state+ - result+ - toolCallId+ - toolName+ - step+ - args+ type: object+ type:+ enum:+ - tool-invocation+ type: string+ required:+ - type+ - toolInvocation+ type: objectnullable: truetype: arrayrole:enum:- - user- - assistant- - system+ - user+ - assistant+ - systemtype: stringrequired:- - role- - content+ - role+ - contenttype: objecttype: arraymodel:@@ -388,14 +390,14 @@ components:variables:items:oneOf:- - $ref: '#/components/schemas/VariableContext'- - type: string+ - $ref: '#/components/schemas/VariableContext'+ - type: stringnullable: truetype: arrayrequired:- - context- - includeOtherCode- - messages+ - context+ - includeOtherCode+ - messagestype: objectCodeCompletionRequest:properties:@@ -406,9 +408,9 @@ components:id:type: stringrequired:- - id- - document- - cellId+ - id+ - document+ - cellIdtype: objectColumnStats:properties:@@ -459,10 +461,10 @@ components:properties:name:enum:- - completed-run+ - completed-runtype: stringrequired:- - name+ - nametype: objectCompletionResult:properties:@@ -470,7 +472,7 @@ components:type: stringname:enum:- - completion-result+ - completion-resulttype: stringoptions:items:@@ -483,17 +485,17 @@ components:type:type: stringrequired:- - name- - type+ - name+ - typetype: objecttype: arrayprefix_length:type: integerrequired:- - completion_id- - prefix_length- - options- - name+ - completion_id+ - prefix_length+ - options+ - nametype: objectCopyNotebookRequest:properties:@@ -502,8 +504,8 @@ components:source:type: stringrequired:- - source- - destination+ - source+ - destinationtype: objectCreateSecretRequest:properties:@@ -513,36 +515,36 @@ components:type: stringprovider:enum:- - env- - dotenv+ - env+ - dotenvtype: stringvalue:type: stringrequired:- - key- - value- - provider- - name+ - key+ - value+ - provider+ - nametype: objectCycleError:properties:edges_with_vars:items:prefixItems:- - type: string- - items:- type: string- type: array- - type: string+ - type: string+ - items:+ type: string+ type: array+ - type: stringtype: arraytype: arraytype:enum:- - cycle+ - cycletype: stringrequired:- - edges_with_vars- - type+ - edges_with_vars+ - typetype: objectDataColumnPreview:properties:@@ -564,7 +566,7 @@ components:type: arrayname:enum:- - data-column-preview+ - data-column-previewtype: stringstats:$ref: '#/components/schemas/ColumnStats'@@ -572,9 +574,9 @@ components:table_name:type: stringrequired:- - table_name- - column_name- - name+ - table_name+ - column_name+ - nametype: objectDataSourceConnection:properties:@@ -598,14 +600,14 @@ components:$ref: '#/components/schemas/DataTable'type: arrayrequired:- - name- - tables+ - name+ - tablestype: objecttype: arrayrequired:- - name- - dialect- - schemas+ - name+ - dialect+ - schemastype: objecttype: arraydefault_database:@@ -623,11 +625,11 @@ components:source:type: stringrequired:- - source- - dialect- - name- - display_name- - databases+ - source+ - dialect+ - name+ - display_name+ - databasestype: objectDataSourceConnections:properties:@@ -637,11 +639,11 @@ components:type: arrayname:enum:- - data-source-connections+ - data-source-connectionstype: stringrequired:- - connections- - name+ - connections+ - nametype: objectDataTable:properties:@@ -674,25 +676,25 @@ components:type: stringsource_type:enum:- - local- - duckdb- - connection- - catalog+ - local+ - duckdb+ - connection+ - catalogtype: stringtype:enum:- - table- - view+ - table+ - viewtype: stringvariable_name:nullable: truetype: stringrequired:- - source_type- - source- - name- - columns- - type+ - source_type+ - source+ - name+ - columns+ - typetype: objectDataTableColumn:properties:@@ -706,21 +708,21 @@ components:type:$ref: '#/components/schemas/DataType'required:- - name- - type- - external_type- - sample_values+ - name+ - type+ - external_type+ - sample_valuestype: objectDataType:enum:- - string- - boolean- - integer- - number- - date- - datetime- - time- - unknown+ - string+ - boolean+ - integer+ - number+ - date+ - datetime+ - time+ - unknowntype: stringDatabase:properties:@@ -736,45 +738,45 @@ components:$ref: '#/components/schemas/Schema'type: arrayrequired:- - name- - dialect- - schemas+ - name+ - dialect+ - schemastype: objectDatasets:properties:clear_channel:enum:- - local- - duckdb- - connection- - catalog+ - local+ - duckdb+ - connection+ - catalognullable: truetype: stringname:enum:- - datasets+ - datasetstype: stringtables:items:$ref: '#/components/schemas/DataTable'type: arrayrequired:- - tables- - name+ - tables+ - nametype: objectDeleteCellRequest:properties:cellId:type: stringrequired:- - cellId+ - cellIdtype: objectDeleteSecretRequest:properties:key:type: stringrequired:- - key+ - keytype: objectDependencyTreeNode:properties:@@ -794,9 +796,9 @@ components:nullable: truetype: stringrequired:- - name- - tags- - dependencies+ - name+ - tags+ - dependenciestype: objectDependencyTreeResponse:properties:@@ -806,18 +808,18 @@ components:type: objectError:oneOf:- - $ref: '#/components/schemas/SetupRootError'- - $ref: '#/components/schemas/CycleError'- - $ref: '#/components/schemas/MultipleDefinitionError'- - $ref: '#/components/schemas/ImportStarError'- - $ref: '#/components/schemas/MarimoAncestorStoppedError'- - $ref: '#/components/schemas/MarimoAncestorPreventedError'- - $ref: '#/components/schemas/MarimoExceptionRaisedError'- - $ref: '#/components/schemas/MarimoStrictExecutionError'- - $ref: '#/components/schemas/MarimoInterruptionError'- - $ref: '#/components/schemas/MarimoSyntaxError'- - $ref: '#/components/schemas/MarimoInternalError'- - $ref: '#/components/schemas/UnknownError'+ - $ref: '#/components/schemas/SetupRootError'+ - $ref: '#/components/schemas/CycleError'+ - $ref: '#/components/schemas/MultipleDefinitionError'+ - $ref: '#/components/schemas/ImportStarError'+ - $ref: '#/components/schemas/MarimoAncestorStoppedError'+ - $ref: '#/components/schemas/MarimoAncestorPreventedError'+ - $ref: '#/components/schemas/MarimoExceptionRaisedError'+ - $ref: '#/components/schemas/MarimoStrictExecutionError'+ - $ref: '#/components/schemas/MarimoInterruptionError'+ - $ref: '#/components/schemas/MarimoSyntaxError'+ - $ref: '#/components/schemas/MarimoInternalError'+ - $ref: '#/components/schemas/UnknownError'ExecuteMultipleRequest:properties:cellIds:@@ -834,9 +836,9 @@ components:timestamp:type: numberrequired:- - cellIds- - codes- - timestamp+ - cellIds+ - codes+ - timestamptype: objectExecuteScratchpadRequest:properties:@@ -846,7 +848,7 @@ components:$ref: '#/components/schemas/HTTPRequest'nullable: truerequired:- - code+ - codetype: objectExecuteStaleRequest:properties:@@ -866,9 +868,9 @@ components:timestamp:type: numberrequired:- - cellId- - code- - timestamp+ - cellId+ - code+ - timestamptype: objectExportAsHTMLRequest:properties:@@ -884,30 +886,30 @@ components:includeCode:type: booleanrequired:- - download- - files- - includeCode+ - download+ - files+ - includeCodetype: objectExportAsIPYNBRequest:properties:download:type: booleanrequired:- - download+ - downloadtype: objectExportAsMarkdownRequest:properties:download:type: booleanrequired:- - download+ - downloadtype: objectExportAsScriptRequest:properties:download:type: booleanrequired:- - download+ - downloadtype: objectFileCreateRequest:properties:@@ -920,13 +922,13 @@ components:type: stringtype:enum:- - file- - directory+ - file+ - directorytype: stringrequired:- - path- - type- - name+ - path+ - type+ - nametype: objectFileCreateResponse:properties:@@ -939,14 +941,14 @@ components:success:type: booleanrequired:- - success+ - successtype: objectFileDeleteRequest:properties:path:type: stringrequired:- - path+ - pathtype: objectFileDeleteResponse:properties:@@ -956,14 +958,14 @@ components:success:type: booleanrequired:- - success+ - successtype: objectFileDetailsRequest:properties:path:type: stringrequired:- - path+ - pathtype: objectFileDetailsResponse:properties:@@ -976,7 +978,7 @@ components:nullable: truetype: stringrequired:- - file+ - filetype: objectFileInfo:properties:@@ -998,12 +1000,12 @@ components:path:type: stringrequired:- - id- - path- - name- - isDirectory- - isMarimoFile- - children+ - id+ - path+ - name+ - isDirectory+ - isMarimoFile+ - childrentype: objectFileListRequest:properties:@@ -1020,8 +1022,8 @@ components:root:type: stringrequired:- - files- - root+ - files+ - roottype: objectFileMoveRequest:properties:@@ -1030,8 +1032,8 @@ components:path:type: stringrequired:- - path- - newPath+ - path+ - newPathtype: objectFileMoveResponse:properties:@@ -1044,14 +1046,14 @@ components:success:type: booleanrequired:- - success+ - successtype: objectFileOpenRequest:properties:path:type: stringrequired:- - path+ - pathtype: objectFileUpdateRequest:properties:@@ -1060,8 +1062,8 @@ components:path:type: stringrequired:- - path- - contents+ - path+ - contentstype: objectFileUpdateResponse:properties:@@ -1074,7 +1076,7 @@ components:success:type: booleanrequired:- - success+ - successtype: objectFocusCell:properties:@@ -1082,11 +1084,11 @@ components:type: stringname:enum:- - focus-cell+ - focus-celltype: stringrequired:- - cell_id- - name+ - cell_id+ - nametype: objectFormatRequest:properties:@@ -1097,8 +1099,8 @@ components:lineLength:type: integerrequired:- - codes- - lineLength+ - codes+ - lineLengthtype: objectFormatResponse:properties:@@ -1107,7 +1109,7 @@ components:type: stringtype: objectrequired:- - codes+ - codestype: objectFunctionCallRequest:properties:@@ -1121,10 +1123,10 @@ components:namespace:type: stringrequired:- - functionCallId- - namespace- - functionName- - args+ - functionCallId+ - namespace+ - functionName+ - argstype: objectFunctionCallResult:properties:@@ -1132,30 +1134,37 @@ components:type: stringname:enum:- - function-call-result+ - function-call-resulttype: stringreturn_value:nullable: trueoneOf:- - additionalProperties:- $ref: '#/components/schemas/JSONType'- type: object- - items:- $ref: '#/components/schemas/JSONType'- type: array- - type: string- - type: integer- - type: number- - type: boolean- - additionalProperties: true- type: object- - $ref: '#/components/schemas/MIME'+ - additionalProperties:+ $ref: '#/components/schemas/JSONType'+ type: object+ - items:+ $ref: '#/components/schemas/JSONType'+ type: array+ - type: string+ - type: integer+ - type: number+ - type: boolean+ - additionalProperties: true+ type: object+ - $ref: '#/components/schemas/MIME'status:$ref: '#/components/schemas/HumanReadableStatus'required:- - function_call_id- - status- - name+ - function_call_id+ - status+ - name+ type: object+ GitHubConfig:+ properties:+ api_key:+ type: string+ base_url:+ type: stringtype: objectGoogleAiConfig:properties:@@ -1168,8 +1177,8 @@ components:properties:code:enum:- - ok- - error+ - ok+ - errortype: stringmessage:nullable: true@@ -1178,7 +1187,7 @@ components:nullable: truetype: stringrequired:- - code+ - codetype: objectImportStarError:properties:@@ -1186,11 +1195,11 @@ components:type: stringtype:enum:- - import-star+ - import-startype: stringrequired:- - msg- - type+ - msg+ - typetype: objectInstallMissingPackagesRequest:properties:@@ -1201,27 +1210,27 @@ components:type: stringtype: objectrequired:- - manager- - versions+ - manager+ - versionstype: objectInstallingPackageAlert:properties:name:enum:- - installing-package-alert+ - installing-package-alerttype: stringpackages:additionalProperties:enum:- - queued- - installing- - installed- - failed+ - queued+ - installing+ - installed+ - failedtype: stringtype: objectrequired:- - packages- - name+ - packages+ - nametype: objectInstantiateRequest:properties:@@ -1235,18 +1244,18 @@ components:items: {}type: arrayrequired:- - objectIds- - values- - autoRun+ - objectIds+ - values+ - autoRuntype: objectInterrupted:properties:name:enum:- - interrupted+ - interruptedtype: stringrequired:- - name+ - nametype: objectInvokeAiToolRequest:properties:@@ -1256,8 +1265,8 @@ components:toolName:type: stringrequired:- - toolName- - arguments+ - toolName+ - argumentstype: objectInvokeAiToolResponse:properties:@@ -1270,18 +1279,18 @@ components:toolName:type: stringrequired:- - success- - toolName- - result+ - success+ - toolName+ - resulttype: objectJSONType:oneOf:- - type: string- - type: number- - type: object- - type: array- - type: boolean- - type: 'null'+ - type: string+ - type: number+ - type: object+ - type: array+ - type: boolean+ - type: 'null'KernelReady:properties:app_config:@@ -1292,9 +1301,9 @@ components:auto_download:items:enum:- - html- - markdown- - ipynb+ - html+ - markdown+ - ipynbtype: stringtype: arraycss_file:@@ -1308,24 +1317,24 @@ components:type: stringsql_output:enum:- - polars- - lazy-polars- - pandas- - native- - auto+ - polars+ - lazy-polars+ - pandas+ - native+ - autotype: stringwidth:enum:- - normal- - compact- - medium- - full- - columns+ - normal+ - compact+ - medium+ - full+ - columnstype: stringrequired:- - width- - auto_download- - sql_output+ - width+ - auto_download+ - sql_outputtype: objectcapabilities:properties:@@ -1338,10 +1347,10 @@ components:ty:type: booleanrequired:- - terminal- - pylsp- - ty- - basedpyright+ - terminal+ - pylsp+ - ty+ - basedpyrighttype: objectcell_ids:items:@@ -1376,12 +1385,12 @@ components:type:type: stringrequired:- - type- - data+ - type+ - datatype: objectname:enum:- - kernel-ready+ - kernel-readytype: stringnames:items:@@ -1393,59 +1402,59 @@ components:additionalProperties:nullable: trueoneOf:- - additionalProperties:- nullable: true- oneOf:- - additionalProperties:- $ref: '#/components/schemas/JSONType'- type: object- - items:- $ref: '#/components/schemas/JSONType'- type: array- - type: string- - type: integer- - type: number- - type: boolean- - additionalProperties: true- type: object- - $ref: '#/components/schemas/MIME'- type: object- - items:- nullable: true- oneOf:- - additionalProperties:- $ref: '#/components/schemas/JSONType'- type: object- - items:- $ref: '#/components/schemas/JSONType'- type: array- - type: string- - type: integer- - type: number- - type: boolean- - additionalProperties: true- type: object- - $ref: '#/components/schemas/MIME'- type: array- - type: string- - type: integer- - type: number- - type: boolean- - additionalProperties: true- type: object- - $ref: '#/components/schemas/MIME'+ - additionalProperties:+ nullable: true+ oneOf:+ - additionalProperties:+ $ref: '#/components/schemas/JSONType'+ type: object+ - items:+ $ref: '#/components/schemas/JSONType'+ type: array+ - type: string+ - type: integer+ - type: number+ - type: boolean+ - additionalProperties: true+ type: object+ - $ref: '#/components/schemas/MIME'+ type: object+ - items:+ nullable: true+ oneOf:+ - additionalProperties:+ $ref: '#/components/schemas/JSONType'+ type: object+ - items:+ $ref: '#/components/schemas/JSONType'+ type: array+ - type: string+ - type: integer+ - type: number+ - type: boolean+ - additionalProperties: true+ type: object+ - $ref: '#/components/schemas/MIME'+ type: array+ - type: string+ - type: integer+ - type: number+ - type: boolean+ - additionalProperties: true+ type: object+ - $ref: '#/components/schemas/MIME'nullable: truetype: objectrequired:- - cell_ids- - codes- - names- - configs- - resumed- - app_config- - kiosk- - capabilities- - name+ - cell_ids+ - codes+ - names+ - configs+ - resumed+ - app_config+ - kiosk+ - capabilities+ - nametype: objectListPackagesResponse:properties:@@ -1454,14 +1463,14 @@ components:$ref: '#/components/schemas/PackageDescription'type: arrayrequired:- - packages+ - packagestype: objectListSecretKeysRequest:properties:requestId:type: stringrequired:- - requestId+ - requestIdtype: objectListSecretKeysResponse:properties:@@ -1470,7 +1479,7 @@ components:$ref: '#/components/schemas/SecretKeysWithProvider'type: arrayrequired:- - keys+ - keystype: objectMIME:properties: {}@@ -1486,12 +1495,12 @@ components:type: stringtype:enum:- - ancestor-prevented+ - ancestor-preventedtype: stringrequired:- - msg- - raising_cell- - type+ - msg+ - raising_cell+ - typetype: objectMarimoAncestorStoppedError:properties:@@ -1501,12 +1510,12 @@ components:type: stringtype:enum:- - ancestor-stopped+ - ancestor-stoppedtype: stringrequired:- - msg- - raising_cell- - type+ - msg+ - raising_cell+ - typetype: objectMarimoConfig:properties:@@ -1527,39 +1536,39 @@ components:type: stringcopilot:oneOf:- - type: boolean- - enum:- - github- - codeium- - custom- type: string+ - type: boolean+ - enum:+ - github+ - codeium+ - custom+ type: stringmodel:nullable: truetype: stringrequired:- - activate_on_typing- - copilot+ - activate_on_typing+ - copilottype: objectdatasources:properties:auto_discover_columns:oneOf:- - type: boolean- - enum:- - auto- type: string+ - type: boolean+ - enum:+ - auto+ type: stringauto_discover_schemas:oneOf:- - type: boolean- - enum:- - auto- type: string+ - type: boolean+ - enum:+ - auto+ type: stringauto_discover_tables:oneOf:- - type: boolean- - enum:- - auto- type: string+ - type: boolean+ - enum:+ - auto+ type: stringtype: objectdiagnostics:properties:@@ -1570,8 +1579,8 @@ components:properties:cell_output:enum:- - above- - below+ - above+ - belowtype: stringcode_editor_font_size:type: integer@@ -1581,8 +1590,8 @@ components:type: arraydataframes:enum:- - rich- - plain+ - rich+ - plaintype: stringdefault_table_max_columns:type: integer@@ -1590,28 +1599,28 @@ components:type: integerdefault_width:enum:- - normal- - compact- - medium- - full- - columns+ - normal+ - compact+ - medium+ - full+ - columnstype: stringreference_highlighting:type: booleantheme:enum:- - light- - dark- - system+ - light+ - dark+ - systemtype: stringrequired:- - theme- - code_editor_font_size- - cell_output- - default_width- - dataframes- - default_table_page_size- - default_table_max_columns+ - theme+ - code_editor_font_size+ - cell_output+ - default_width+ - dataframes+ - default_table_page_size+ - default_table_max_columnstype: objectexperimental:additionalProperties: {}@@ -1621,7 +1630,7 @@ components:line_length:type: integerrequired:- - line_length+ - line_lengthtype: objectkeymap:properties:@@ -1633,14 +1642,14 @@ components:type: objectpreset:enum:- - default- - vim+ - default+ - vimtype: stringvimrc:nullable: truetype: stringrequired:- - preset+ - presettype: objectlanguage_servers:properties:@@ -1676,14 +1685,14 @@ components:properties:manager:enum:- - pip- - rye- - uv- - poetry- - pixi+ - pip+ - rye+ - uv+ - poetry+ - pixitype: stringrequired:- - manager+ - managertype: objectruntime:properties:@@ -1691,25 +1700,25 @@ components:type: booleanauto_reload:enum:- - 'off'- - lazy- - autorun+ - 'off'+ - lazy+ - autoruntype: stringdefault_auto_download:items:enum:- - html- - markdown- - ipynb+ - html+ - markdown+ - ipynbtype: stringtype: arraydefault_sql_output:enum:- - polars- - lazy-polars- - pandas- - native- - auto+ - polars+ - lazy-polars+ - pandas+ - native+ - autotype: stringdotenv:items:@@ -1717,8 +1726,8 @@ components:type: arrayon_cell_change:enum:- - lazy- - autorun+ - lazy+ - autoruntype: stringoutput_max_bytes:type: integer@@ -1732,48 +1741,48 @@ components:type: integerwatcher_on_save:enum:- - lazy- - autorun+ - lazy+ - autoruntype: stringrequired:- - auto_instantiate- - auto_reload- - reactive_tests- - on_cell_change- - watcher_on_save- - output_max_bytes- - std_stream_max_bytes- - default_sql_output+ - auto_instantiate+ - auto_reload+ - reactive_tests+ - on_cell_change+ - watcher_on_save+ - output_max_bytes+ - std_stream_max_bytes+ - default_sql_outputtype: objectsave:properties:autosave:enum:- - 'off'- - after_delay+ - 'off'+ - after_delaytype: stringautosave_delay:type: integerformat_on_save:type: booleanrequired:- - autosave- - autosave_delay- - format_on_save+ - autosave+ - autosave_delay+ - format_on_savetype: objectserver:properties:browser:oneOf:- - enum:- - default- type: string- - type: string+ - enum:+ - default+ type: string+ - type: stringfollow_symlink:type: booleanrequired:- - browser- - follow_symlink+ - browser+ - follow_symlinktype: objectsharing:properties:@@ -1792,14 +1801,14 @@ components:type: booleantype: objectrequired:- - completion- - display- - formatting- - keymap- - runtime- - save- - server- - package_management+ - completion+ - display+ - formatting+ - keymap+ - runtime+ - save+ - server+ - package_managementtype: objectMarimoExceptionRaisedError:properties:@@ -1812,12 +1821,12 @@ components:type: stringtype:enum:- - exception+ - exceptiontype: stringrequired:- - msg- - exception_type- - type+ - msg+ - exception_type+ - typetype: objectMarimoFile:properties:@@ -1835,8 +1844,8 @@ components:nullable: truetype: stringrequired:- - name- - path+ - name+ - pathtype: objectMarimoInternalError:properties:@@ -1846,21 +1855,21 @@ components:type: stringtype:enum:- - internal+ - internaltype: stringrequired:- - error_id- - type- - msg+ - error_id+ - type+ - msgtype: objectMarimoInterruptionError:properties:type:enum:- - interruption+ - interruptiontype: stringrequired:- - type+ - typetype: objectMarimoStrictExecutionError:properties:@@ -1873,12 +1882,12 @@ components:type: stringtype:enum:- - strict-exception+ - strict-exceptiontype: stringrequired:- - msg- - ref- - type+ - msg+ - ref+ - typetype: objectMarimoSyntaxError:properties:@@ -1886,66 +1895,66 @@ components:type: stringtype:enum:- - syntax+ - syntaxtype: stringrequired:- - msg- - type+ - msg+ - typetype: objectMessageOperation:oneOf:- - $ref: '#/components/schemas/CellOp'- - $ref: '#/components/schemas/FunctionCallResult'- - $ref: '#/components/schemas/SendUIElementMessage'- - $ref: '#/components/schemas/RemoveUIElements'- - $ref: '#/components/schemas/Reload'- - $ref: '#/components/schemas/Reconnected'- - $ref: '#/components/schemas/Interrupted'- - $ref: '#/components/schemas/CompletedRun'- - $ref: '#/components/schemas/KernelReady'- - $ref: '#/components/schemas/CompletionResult'- - $ref: '#/components/schemas/Alert'- - $ref: '#/components/schemas/Banner'- - $ref: '#/components/schemas/MissingPackageAlert'- - $ref: '#/components/schemas/InstallingPackageAlert'- - $ref: '#/components/schemas/Variables'- - $ref: '#/components/schemas/VariableValues'- - $ref: '#/components/schemas/QueryParamsSet'- - $ref: '#/components/schemas/QueryParamsAppend'- - $ref: '#/components/schemas/QueryParamsDelete'- - $ref: '#/components/schemas/QueryParamsClear'- - $ref: '#/components/schemas/Datasets'- - $ref: '#/components/schemas/DataColumnPreview'- - $ref: '#/components/schemas/SQLTablePreview'- - $ref: '#/components/schemas/SQLTableListPreview'- - $ref: '#/components/schemas/DataSourceConnections'- - $ref: '#/components/schemas/SecretKeysResult'- - $ref: '#/components/schemas/FocusCell'- - $ref: '#/components/schemas/UpdateCellCodes'- - $ref: '#/components/schemas/UpdateCellIdsRequest'+ - $ref: '#/components/schemas/CellOp'+ - $ref: '#/components/schemas/FunctionCallResult'+ - $ref: '#/components/schemas/SendUIElementMessage'+ - $ref: '#/components/schemas/RemoveUIElements'+ - $ref: '#/components/schemas/Reload'+ - $ref: '#/components/schemas/Reconnected'+ - $ref: '#/components/schemas/Interrupted'+ - $ref: '#/components/schemas/CompletedRun'+ - $ref: '#/components/schemas/KernelReady'+ - $ref: '#/components/schemas/CompletionResult'+ - $ref: '#/components/schemas/Alert'+ - $ref: '#/components/schemas/Banner'+ - $ref: '#/components/schemas/MissingPackageAlert'+ - $ref: '#/components/schemas/InstallingPackageAlert'+ - $ref: '#/components/schemas/Variables'+ - $ref: '#/components/schemas/VariableValues'+ - $ref: '#/components/schemas/QueryParamsSet'+ - $ref: '#/components/schemas/QueryParamsAppend'+ - $ref: '#/components/schemas/QueryParamsDelete'+ - $ref: '#/components/schemas/QueryParamsClear'+ - $ref: '#/components/schemas/Datasets'+ - $ref: '#/components/schemas/DataColumnPreview'+ - $ref: '#/components/schemas/SQLTablePreview'+ - $ref: '#/components/schemas/SQLTableListPreview'+ - $ref: '#/components/schemas/DataSourceConnections'+ - $ref: '#/components/schemas/SecretKeysResult'+ - $ref: '#/components/schemas/FocusCell'+ - $ref: '#/components/schemas/UpdateCellCodes'+ - $ref: '#/components/schemas/UpdateCellIdsRequest'MimeType:enum:- - application/json- - application/vnd.marimo+error- - application/vnd.marimo+traceback- - application/vnd.marimo+mimebundle- - application/vnd.vega.v5+json- - application/vnd.vegalite.v5+json- - application/vnd.jupyter.widget-view+json- - image/png- - image/svg+xml- - image/tiff- - image/avif- - image/bmp- - image/gif- - image/jpeg- - video/mp4- - video/mpeg- - text/html- - text/plain- - text/markdown- - text/latex- - text/csv+ - application/json+ - application/vnd.marimo+error+ - application/vnd.marimo+traceback+ - application/vnd.marimo+mimebundle+ - application/vnd.vega.v5+json+ - application/vnd.vegalite.v5+json+ - application/vnd.jupyter.widget-view+json+ - image/png+ - image/svg+xml+ - image/tiff+ - image/avif+ - image/bmp+ - image/gif+ - image/jpeg+ - video/mp4+ - video/mpeg+ - text/html+ - text/plain+ - text/markdown+ - text/latex+ - text/csvtype: stringMissingPackageAlert:properties:@@ -1953,16 +1962,16 @@ components:type: booleanname:enum:- - missing-package-alert+ - missing-package-alerttype: stringpackages:items:type: stringtype: arrayrequired:- - packages- - isolated- - name+ - packages+ - isolated+ - nametype: objectMultipleDefinitionError:properties:@@ -1974,29 +1983,29 @@ components:type: stringtype:enum:- - multiple-defs+ - multiple-defstype: stringrequired:- - name- - cells- - type+ - name+ - cells+ - typetype: objectNonNestedLiteral:oneOf:- - type: integer- - type: number- - format: date- type: string- - format: time- type: string- - format: date-time- type: string- - format: duration- type: string- - type: string- - type: boolean- - format: byte- type: string+ - type: integer+ - type: number+ - format: date+ type: string+ - format: time+ type: string+ - format: date-time+ type: string+ - format: duration+ type: string+ - type: string+ - type: boolean+ - format: byte+ type: stringOpenAiConfig:properties:api_key:@@ -2016,22 +2025,22 @@ components:properties:tutorialId:oneOf:- - enum:- - intro- - dataflow- - ui- - markdown- - plots- - sql- - layout- - fileformat- - for-jupyter-users- type: string- - enum:- - markdown-format- type: string+ - enum:+ - intro+ - dataflow+ - ui+ - markdown+ - plots+ - sql+ - layout+ - fileformat+ - for-jupyter-users+ type: string+ - enum:+ - markdown-format+ type: stringrequired:- - tutorialId+ - tutorialIdtype: objectPackageDescription:properties:@@ -2040,8 +2049,8 @@ components:version:type: stringrequired:- - name- - version+ - name+ - versiontype: objectPackageOperationResponse:properties:@@ -2051,7 +2060,7 @@ components:success:type: booleanrequired:- - success+ - successtype: objectPdbRequest:properties:@@ -2061,14 +2070,14 @@ components:$ref: '#/components/schemas/HTTPRequest'nullable: truerequired:- - cellId+ - cellIdtype: objectPreviewDataSourceConnectionRequest:properties:engine:type: stringrequired:- - engine+ - enginetype: objectPreviewDatasetColumnRequest:properties:@@ -2081,18 +2090,18 @@ components:type: stringsourceType:enum:- - local- - duckdb- - connection- - catalog+ - local+ - duckdb+ - connection+ - catalogtype: stringtableName:type: stringrequired:- - sourceType- - source- - tableName- - columnName+ - sourceType+ - source+ - tableName+ - columnNametype: objectPreviewSQLTableListRequest:properties:@@ -2105,10 +2114,10 @@ components:schema:type: stringrequired:- - requestId- - engine- - database- - schema+ - requestId+ - engine+ - database+ - schematype: objectPreviewSQLTableRequest:properties:@@ -2123,11 +2132,11 @@ components:tableName:type: stringrequired:- - requestId- - engine- - database- - schema- - tableName+ - requestId+ - engine+ - database+ - schema+ - tableNametype: objectQueryParamsAppend:properties:@@ -2135,23 +2144,23 @@ components:type: stringname:enum:- - query-params-append+ - query-params-appendtype: stringvalue:type: stringrequired:- - key- - value- - name+ - key+ - value+ - nametype: objectQueryParamsClear:properties:name:enum:- - query-params-clear+ - query-params-cleartype: stringrequired:- - name+ - nametype: objectQueryParamsDelete:properties:@@ -2159,14 +2168,14 @@ components:type: stringname:enum:- - query-params-delete+ - query-params-deletetype: stringvalue:nullable: truetype: stringrequired:- - key- - name+ - key+ - nametype: objectQueryParamsSet:properties:@@ -2174,25 +2183,25 @@ components:type: stringname:enum:- - query-params-set+ - query-params-settype: stringvalue:oneOf:- - type: string- - items:- type: string- type: array+ - type: string+ - items:+ type: string+ type: arrayrequired:- - key- - value- - name+ - key+ - value+ - nametype: objectReadCodeResponse:properties:contents:type: stringrequired:- - contents+ - contentstype: objectRecentFilesResponse:properties:@@ -2201,32 +2210,32 @@ components:$ref: '#/components/schemas/MarimoFile'type: arrayrequired:- - files+ - filestype: objectReconnected:properties:name:enum:- - reconnected+ - reconnectedtype: stringrequired:- - name+ - nametype: objectReload:properties:name:enum:- - reload+ - reloadtype: stringrequired:- - name+ - nametype: objectRemovePackageRequest:properties:package:type: stringrequired:- - package+ - packagetype: objectRemoveUIElements:properties:@@ -2234,25 +2243,25 @@ components:type: stringname:enum:- - remove-ui-elements+ - remove-ui-elementstype: stringrequired:- - cell_id- - name+ - cell_id+ - nametype: objectRenameFileRequest:properties:filename:type: stringrequired:- - filename+ - filenametype: objectRenameRequest:properties:filename:type: stringrequired:- - filename+ - filenametype: objectRunRequest:properties:@@ -2268,8 +2277,8 @@ components:$ref: '#/components/schemas/HTTPRequest'nullable: truerequired:- - cellIds- - codes+ - cellIds+ - codestype: objectRunningNotebooksResponse:properties:@@ -2278,14 +2287,14 @@ components:$ref: '#/components/schemas/MarimoFile'type: arrayrequired:- - files+ - filestype: objectRuntimeState:enum:- - idle- - queued- - running- - disabled-transitively+ - idle+ - queued+ - running+ - disabled-transitivelytype: stringSQLTableListPreview:properties:@@ -2294,7 +2303,7 @@ components:type: stringname:enum:- - sql-table-list-preview+ - sql-table-list-previewtype: stringrequest_id:type: string@@ -2303,9 +2312,9 @@ components:$ref: '#/components/schemas/DataTable'type: arrayrequired:- - request_id- - tables- - name+ - request_id+ - tables+ - nametype: objectSQLTablePreview:properties:@@ -2314,7 +2323,7 @@ components:type: stringname:enum:- - sql-table-preview+ - sql-table-previewtype: stringrequest_id:type: string@@ -2322,8 +2331,8 @@ components:$ref: '#/components/schemas/DataTable'nullable: truerequired:- - request_id- - name+ - request_id+ - nametype: objectSaveAppConfigurationRequest:properties:@@ -2331,7 +2340,7 @@ components:additionalProperties: {}type: objectrequired:- - config+ - configtype: objectSaveNotebookRequest:properties:@@ -2360,19 +2369,19 @@ components:persist:type: booleanrequired:- - cellIds- - codes- - names- - configs- - filename- - persist+ - cellIds+ - codes+ - names+ - configs+ - filename+ - persisttype: objectSaveUserConfigurationRequest:properties:config:$ref: '#/components/schemas/MarimoConfig'required:- - config+ - configtype: objectSchema:properties:@@ -2383,8 +2392,8 @@ components:$ref: '#/components/schemas/DataTable'type: arrayrequired:- - name- - tables+ - name+ - tablestype: objectSchemaColumn:properties:@@ -2396,9 +2405,9 @@ components:type:type: stringrequired:- - name- - type- - sampleValues+ - name+ - type+ - sampleValuestype: objectSchemaTable:properties:@@ -2409,14 +2418,14 @@ components:name:type: stringrequired:- - name- - columns+ - name+ - columnstype: objectSecretKeysResult:properties:name:enum:- - secret-keys-result+ - secret-keys-resulttype: stringrequest_id:type: string@@ -2425,9 +2434,9 @@ components:$ref: '#/components/schemas/SecretKeysWithProvider'type: arrayrequired:- - request_id- - secrets- - name+ - request_id+ - secrets+ - nametype: objectSecretKeysWithProvider:properties:@@ -2439,13 +2448,13 @@ components:type: stringprovider:enum:- - env- - dotenv+ - env+ - dotenvtype: stringrequired:- - provider- - name- - keys+ - provider+ - name+ - keystype: objectSendUIElementMessage:properties:@@ -2462,14 +2471,14 @@ components:type: stringname:enum:- - send-ui-element-message+ - send-ui-element-messagetype: stringui_element:nullable: truetype: stringrequired:- - message- - name+ - message+ - nametype: objectSetCellConfigRequest:properties:@@ -2479,7 +2488,7 @@ components:type: objecttype: objectrequired:- - configs+ - configstype: objectSetModelMessageRequest:properties:@@ -2494,22 +2503,22 @@ components:items:items:oneOf:- - type: string- - type: integer+ - type: string+ - type: integertype: arraytype: arraystate:additionalProperties: {}type: objectrequired:- - state- - bufferPaths+ - state+ - bufferPathstype: objectmodelId:type: stringrequired:- - modelId- - message+ - modelId+ - messagetype: objectSetUIElementValueRequest:properties:@@ -2526,43 +2535,43 @@ components:items: {}type: arrayrequired:- - objectIds- - values- - token+ - objectIds+ - values+ - tokentype: objectSetUserConfigRequest:properties:config:$ref: '#/components/schemas/MarimoConfig'required:- - config+ - configtype: objectSetupRootError:properties:edges_with_vars:items:prefixItems:- - type: string- - items:- type: string- type: array- - type: string+ - type: string+ - items:+ type: string+ type: array+ - type: stringtype: arraytype: arraytype:enum:- - setup-refs+ - setup-refstype: stringrequired:- - edges_with_vars- - type+ - edges_with_vars+ - typetype: objectShutdownSessionRequest:properties:sessionId:type: stringrequired:- - sessionId+ - sessionIdtype: objectSnippet:properties:@@ -2573,8 +2582,8 @@ components:title:type: stringrequired:- - title- - sections+ - title+ - sectionstype: objectSnippetSection:properties:@@ -2587,7 +2596,7 @@ components:id:type: stringrequired:- - id+ - idtype: objectSnippets:properties:@@ -2596,14 +2605,14 @@ components:$ref: '#/components/schemas/Snippet'type: arrayrequired:- - snippets+ - snippetstype: objectStdinRequest:properties:text:type: stringrequired:- - text+ - texttype: objectStopRequest:properties: {}@@ -2613,7 +2622,7 @@ components:success:type: booleanrequired:- - success+ - successtype: objectUnknownError:properties:@@ -2621,11 +2630,11 @@ components:type: stringtype:enum:- - unknown+ - unknowntype: stringrequired:- - msg- - type+ - msg+ - typetype: objectUpdateCellCodes:properties:@@ -2641,13 +2650,13 @@ components:type: arrayname:enum:- - update-cell-codes+ - update-cell-codestype: stringrequired:- - cell_ids- - codes- - code_is_stale- - name+ - cell_ids+ - codes+ - code_is_stale+ - nametype: objectUpdateCellIdsRequest:properties:@@ -2657,11 +2666,11 @@ components:type: arrayname:enum:- - update-cell-ids+ - update-cell-idstype: stringrequired:- - cell_ids- - name+ - cell_ids+ - nametype: objectUpdateComponentValuesRequest:properties:@@ -2673,8 +2682,8 @@ components:items: {}type: arrayrequired:- - objectIds- - values+ - objectIds+ - valuestype: objectVariableContext:properties:@@ -2684,9 +2693,9 @@ components:valueType:type: stringrequired:- - name- - valueType- - previewValue+ - name+ - valueType+ - previewValuetype: objectVariableDeclaration:properties:@@ -2701,9 +2710,9 @@ components:type: stringtype: arrayrequired:- - name- - declared_by- - used_by+ - name+ - declared_by+ - used_bytype: objectVariableValue:properties:@@ -2716,42 +2725,42 @@ components:nullable: truetype: stringrequired:- - name+ - nametype: objectVariableValues:properties:name:enum:- - variable-values+ - variable-valuestype: stringvariables:items:$ref: '#/components/schemas/VariableValue'type: arrayrequired:- - variables- - name+ - variables+ - nametype: objectVariables:properties:name:enum:- - variables+ - variablestype: stringvariables:items:$ref: '#/components/schemas/VariableDeclaration'type: arrayrequired:- - variables- - name+ - variables+ - nametype: objectWorkspaceFilesRequest:properties:includeMarkdown:type: booleanrequired:- - includeMarkdown+ - includeMarkdowntype: objectWorkspaceFilesResponse:properties:@@ -2762,8 +2771,8 @@ components:root:type: stringrequired:- - root- - files+ - root+ - filestype: objectinfo:title: marimo API@@ -2773,12 +2782,12 @@ paths:/@file/{filename_and_length}:get:parameters:- - description: The filename and byte length of the virtual file- in: path- name: filename_and_length- required: true- schema:- type: string+ - description: The filename and byte length of the virtual file+ in: path+ name: filename_and_length+ required: true+ schema:+ type: stringresponses:200:content:@@ -3623,7 +3632,7 @@ paths:percent:type: numberrequired:- - percent+ - percenttype: objectgpu:items:@@ -3641,17 +3650,17 @@ paths:used:type: integerrequired:- - total- - used- - free- - percent+ - total+ - used+ - free+ - percenttype: objectname:type: stringrequired:- - index- - memory- - name+ - index+ - memory+ - nametype: objecttype: arraykernel:@@ -3672,22 +3681,22 @@ paths:used:type: integerrequired:- - total- - available- - percent- - used- - free+ - total+ - available+ - percent+ - used+ - freetype: objectserver:properties:memory:type: integerrequired:- - memory+ - memorytype: objectrequired:- - memory- - cpu+ - memory+ - cputype: objectdescription: Get the current memory and CPU usage of the application/api/version:@@ -3725,4 +3734,5 @@ paths:type: stringsummary: Submit login formtags:- - auth+ - auth+diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.tsindex 5a545f24a8..09f6a1a7bd 100644--- a/packages/openapi/src/api.ts+++ b/packages/openapi/src/api.ts@@ -2568,6 +2568,7 @@ export interface components {anthropic?: components["schemas"]["AnthropicConfig"];azure?: components["schemas"]["OpenAiConfig"];bedrock?: components["schemas"]["BedrockConfig"];+ github?: components["schemas"]["GitHubConfig"];google?: components["schemas"]["GoogleAiConfig"];max_tokens?: number;/** @enum {string} */@@ -2576,8 +2577,8 @@ export interface components {autocomplete_model?: string;chat_model?: string;custom_models: string[];- edit_model?: string;displayed_models: string[];+ edit_model?: string;};ollama?: components["schemas"]["OpenAiConfig"];open_ai?: components["schemas"]["OpenAiConfig"];@@ -3019,6 +3020,10 @@ export interface components {| null;status: components["schemas"]["HumanReadableStatus"];};+ GitHubConfig: {+ api_key?: string;+ base_url?: string;+ };GoogleAiConfig: {api_key?: string;};diff --git a/tests/_output/formatters/test_formatters.py b/tests/_output/formatters/test_formatters.pyindex a7fa8e4a1a..119fa1e9e9 100644--- a/tests/_output/formatters/test_formatters.py+++ b/tests/_output/formatters/test_formatters.py@@ -486,6 +486,7 @@ def test_polars_dot_to_mermaid() -> None:@pytest.mark.skipif(not HAS_DEPS, reason="optional dependencies not installed")[email protected](reason="TODO: skipping since upstream broken this test")def test_polars_dot_to_mermaid_complex() -> None:import polars as pldiff --git a/tests/_server/ai/test_ai_config.py b/tests/_server/ai/test_ai_config.pyindex 2ac01fb1e3..944f745497 100644--- a/tests/_server/ai/test_ai_config.py+++ b/tests/_server/ai/test_ai_config.py@@ -122,6 +122,42 @@ class TestAnyProviderConfig:assert provider_config.api_key == "ollama-placeholder"+ def test_for_ollama_fallback_url(self):+ """Test Ollama configuration with fallback base URL."""+ config: AiConfig = {"ollama": {}}++ provider_config = AnyProviderConfig.for_ollama(config)++ assert provider_config.api_key == "ollama-placeholder"+ assert provider_config.base_url == "http://127.0.0.1:11434/v1"++ def test_for_github(self):+ """Test GitHub configuration."""+ config: AiConfig = {+ "github": {+ "api_key": "test-github-key",+ "base_url": "https://api.githubcopilot.com/",+ }+ }++ provider_config = AnyProviderConfig.for_github(config)++ assert provider_config.api_key == "test-github-key"+ assert provider_config.base_url == "https://api.githubcopilot.com/"++ def test_for_github_with_fallback_base_url(self):+ """Test GitHub configuration uses fallback base URL when not specified."""+ config: AiConfig = {+ "github": {+ "api_key": "test-github-key",+ }+ }++ provider_config = AnyProviderConfig.for_github(config)++ assert provider_config.api_key == "test-github-key"+ assert provider_config.base_url == "https://api.githubcopilot.com/"+def test_for_anthropic(self):"""Test Anthropic configuration."""config: AiConfig = {@@ -195,6 +231,14 @@ class TestAnyProviderConfig:assert provider_config.api_key == "test-anthropic-key"+ def test_for_model_github(self) -> None:+ """Test for_model with GitHub model."""+ config: AiConfig = {"github": {"api_key": "test-github-key"}}++ provider_config = AnyProviderConfig.for_model("github/gpt-4o", config)++ assert provider_config.api_key == "test-github-key"+def test_for_model_unknown_defaults_to_ollama(self) -> None:"""Test for_model with unknown provider defaults to Ollama."""config: AiConfig = {"ollama": {"api_key": "test-key"}}@@ -416,6 +460,35 @@ class TestProviderConfigWithFallback:assert exc_info.value.status_code == HTTPStatus.BAD_REQUESTassert "Google AI API key not configured" in str(exc_info.value.detail)+ @patch.dict(os.environ, {"GITHUB_TOKEN": "env-github-token"})+ def test_for_github_with_fallback_key(self) -> None:+ """Test GitHub config uses fallback key when config is missing api_key."""+ config: AiConfig = {"github": {}}++ provider_config = AnyProviderConfig.for_github(config)++ assert provider_config.api_key == "env-github-token"++ @patch.dict(os.environ, {"GITHUB_TOKEN": "env-github-token"})+ def test_for_github_config_key_takes_precedence(self) -> None:+ """Test GitHub config key takes precedence over environment variable."""+ config: AiConfig = {"github": {"api_key": "config-github-token"}}++ provider_config = AnyProviderConfig.for_github(config)++ assert provider_config.api_key == "config-github-token"++ @patch.dict(os.environ, {}, clear=True)+ def test_for_github_no_fallback_available(self) -> None:+ """Test GitHub config fails when no config key and no env var."""+ config: AiConfig = {"github": {}}++ with pytest.raises(HTTPException) as exc_info:+ AnyProviderConfig.for_github(config)++ assert exc_info.value.status_code == HTTPStatus.BAD_REQUEST+ assert "GitHub API key not configured" in str(exc_info.value.detail)+class TestGetKey:"""Tests for _get_key function."""@@ -911,3 +984,13 @@ class TestEdgeCases:assert "OpenAI Compatible config not found" in str(exc_info.value.detail)++ def test_github_config_missing(self):+ """Test error when GitHub config is missing."""+ config: AiConfig = {}++ with pytest.raises(HTTPException) as exc_info:+ AnyProviderConfig.for_github(config)++ assert exc_info.value.status_code == HTTPStatus.BAD_REQUEST+ assert "GitHub config not found" in str(exc_info.value.detail)