Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions interface/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1939,12 +1939,22 @@ export const api = {
deployment?: string | null;
}>;
},
startOpenAiOAuthBrowser: async (params: {model: string}) => {
providerDefaultModels: async () => {
const response = await fetch(`${getApiBase()}/providers/default-models`);
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return response.json() as Promise<{
defaults: Record<string, string>;
chatgpt_oauth: string;
}>;
},
startOpenAiOAuthBrowser: async (params?: {model?: string}) => {
const response = await fetch(`${getApiBase()}/providers/openai/browser-oauth/start`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: params.model,
model: params?.model,
}),
});
if (!response.ok) {
Expand Down
32 changes: 32 additions & 0 deletions interface/src/components/agent-config/ConfigSectionEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,40 @@ export function ConfigSectionEditor({
description: "Model for transcribing audio attachments",
},
];
const textSlotKeys = [
"channel",
"branch",
"worker",
"compactor",
"cortex",
] as const;
const textSlotValues = textSlotKeys.map((key) => localValues[key] ?? "");
const uniformModel = textSlotValues.every(
(slotValue) => slotValue === textSlotValues[0],
)
? textSlotValues[0]
: "";
const applyModelToAllSlots = (model: string) => {
setLocalValues((prev) => ({
...prev,
channel: model,
branch: model,
worker: model,
compactor: model,
cortex: model,
}));
setLocalDirty(true);
};
return (
<div className="grid gap-4">
<div className="border-b border-app-line/50 pb-4">
<ModelSelect
label="All Models"
description="Apply one model to every role below (voice excluded)"
value={uniformModel}
onChange={applyModelToAllSlots}
/>
</div>
{modelSlots.map(({key, label, description}) => {
const modelValue = localValues[key] ?? "";
const thinkingKey =
Expand Down
17 changes: 13 additions & 4 deletions interface/src/components/settings/ProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function ProviderCard({
removing,
actionLabel,
showRemove,
editDisabled,
}: ProviderCardProps) {
const primaryLabel = actionLabel ?? (configured ? "Update" : "Add key");
const shouldShowRemove = showRemove ?? configured;
Expand All @@ -34,12 +35,20 @@ export function ProviderCard({
)}
</div>
<p className="mt-0.5 text-sm text-ink-dull">{description}</p>
<p className="mt-1 text-tiny text-ink-faint">
Default model: <span className="text-ink-dull">{defaultModel}</span>
</p>
{defaultModel && (
<p className="mt-1 text-tiny text-ink-faint">
Default model:{" "}
<span className="text-ink-dull">{defaultModel}</span>
</p>
)}
</div>
<div className="flex gap-2">
<Button onClick={onEdit} variant="outline" size="md">
<Button
onClick={onEdit}
variant="outline"
size="md"
disabled={editDisabled}
>
{primaryLabel}
</Button>
{shouldShowRemove && (
Expand Down
24 changes: 0 additions & 24 deletions interface/src/components/settings/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,180 +87,156 @@ export const PROVIDERS = [
description: "Multi-provider gateway with unified API",
placeholder: "sk-or-...",
envVar: "OPENROUTER_API_KEY",
defaultModel: "openrouter/anthropic/claude-sonnet-4",
},
{
id: "kilo",
name: "Kilo Gateway",
description: "OpenAI-compatible multi-provider gateway",
placeholder: "sk-...",
envVar: "KILO_API_KEY",
defaultModel: "kilo/anthropic/claude-sonnet-4.5",
},
{
id: "opencode-zen",
name: "OpenCode Zen",
description: "Multi-format gateway (Kimi, GLM, MiniMax, Qwen)",
placeholder: "...",
envVar: "OPENCODE_ZEN_API_KEY",
defaultModel: "opencode-zen/kimi-k2.5",
},
{
id: "opencode-go",
name: "OpenCode Go",
description: "Lite OpenCode model catalog and limits",
placeholder: "...",
envVar: "OPENCODE_GO_API_KEY",
defaultModel: "opencode-go/kimi-k2.5",
},
{
id: "anthropic",
name: "Anthropic",
description: "Claude models (Sonnet, Opus, Haiku)",
placeholder: "sk-ant-...",
envVar: "ANTHROPIC_API_KEY",
defaultModel: "anthropic/claude-sonnet-4",
},
{
id: "openai",
name: "OpenAI",
description: "GPT models",
placeholder: "sk-...",
envVar: "OPENAI_API_KEY",
defaultModel: "openai/gpt-4.1",
},
{
id: "zai-coding-plan",
name: "Z.AI Coding Plan",
description: "GLM coding models (glm-4.7, glm-5, glm-4.5-air)",
placeholder: "...",
envVar: "ZAI_CODING_PLAN_API_KEY",
defaultModel: "zai-coding-plan/glm-5",
},
{
id: "zhipu",
name: "Z.ai (GLM)",
description: "GLM models (GLM-4, GLM-4-Flash)",
placeholder: "...",
envVar: "ZHIPU_API_KEY",
defaultModel: "zhipu/glm-4-plus",
},
{
id: "groq",
name: "Groq",
description: "Fast inference for Llama, Mixtral models",
placeholder: "gsk_...",
envVar: "GROQ_API_KEY",
defaultModel: "groq/llama-3.3-70b-versatile",
},
{
id: "together",
name: "Together AI",
description: "Wide model selection with competitive pricing",
placeholder: "...",
envVar: "TOGETHER_API_KEY",
defaultModel: "together/meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",
},
{
id: "fireworks",
name: "Fireworks AI",
description: "Fast inference for popular OSS models",
placeholder: "...",
envVar: "FIREWORKS_API_KEY",
defaultModel: "fireworks/accounts/fireworks/models/llama-v3p3-70b-instruct",
},
{
id: "deepseek",
name: "DeepSeek",
description: "DeepSeek Chat and Reasoner models",
placeholder: "sk-...",
envVar: "DEEPSEEK_API_KEY",
defaultModel: "deepseek/deepseek-chat",
},
{
id: "xai",
name: "xAI",
description: "Grok models",
placeholder: "xai-...",
envVar: "XAI_API_KEY",
defaultModel: "xai/grok-2-latest",
},
{
id: "mistral",
name: "Mistral AI",
description: "Mistral Large, Small, Codestral models",
placeholder: "...",
envVar: "MISTRAL_API_KEY",
defaultModel: "mistral/mistral-large-latest",
},
{
id: "gemini",
name: "Google Gemini",
description: "Google Gemini experimental and production models",
placeholder: "AIza...",
envVar: "GEMINI_API_KEY",
defaultModel: "gemini/gemini-2.5-flash",
},
{
id: "nvidia",
name: "NVIDIA NIM",
description: "NVIDIA-hosted models via NIM API",
placeholder: "nvapi-...",
envVar: "NVIDIA_API_KEY",
defaultModel: "nvidia/meta/llama-3.1-405b-instruct",
},
{
id: "minimax",
name: "MiniMax",
description: "MiniMax (Anthropic message format)",
placeholder: "sk-...",
envVar: "MINIMAX_API_KEY",
defaultModel: "minimax/MiniMax-M2.5",
},
{
id: "minimax-cn",
name: "MiniMax CN",
description: "MiniMax China (Anthropic message format)",
placeholder: "sk-...",
envVar: "MINIMAX_CN_API_KEY",
defaultModel: "minimax-cn/MiniMax-M2.5",
},
{
id: "moonshot",
name: "Moonshot AI",
description: "Kimi models (Kimi K2, Kimi K2.5)",
placeholder: "sk-...",
envVar: "MOONSHOT_API_KEY",
defaultModel: "moonshot/kimi-k2.5",
},
{
id: "github-copilot",
name: "GitHub Copilot",
description: "GitHub Copilot API (uses GitHub PAT for token exchange)",
placeholder: "ghp_... or gh auth token",
envVar: "GITHUB_COPILOT_API_KEY",
defaultModel: "github-copilot/claude-sonnet-4",
},
{
id: "azure",
name: "Azure OpenAI",
description: "Azure OpenAI Service with custom deployments",
placeholder: "Azure API key (alphanumeric string)",
envVar: "AZURE_API_KEY",
defaultModel: "azure/gpt-4o",
},
{
id: "ollama",
name: "Ollama",
description: "Local or remote Ollama API endpoint",
placeholder: "http://localhost:11434",
envVar: "OLLAMA_BASE_URL",
defaultModel: "ollama/llama3.2",
},
] as const;

export const CHATGPT_OAUTH_DEFAULT_MODEL = "openai-chatgpt/gpt-5.3-codex";

export const PERMISSION_OPTIONS = [
{
value: "allow",
Expand Down
2 changes: 1 addition & 1 deletion interface/src/components/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export {ChangelogSection} from "./ChangelogSection";
export {ConfigFileSection} from "./ConfigFileSection";
export {ProviderCard} from "./ProviderCard";
export {ChatGptOAuthDialog} from "./ChatGptOAuthDialog";
export {SECTIONS, PROVIDERS, CHATGPT_OAUTH_DEFAULT_MODEL, PERMISSION_OPTIONS} from "./constants";
export {SECTIONS, PROVIDERS, PERMISSION_OPTIONS} from "./constants";
export type {
SectionId,
Platform,
Expand Down
1 change: 1 addition & 0 deletions interface/src/components/settings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface ProviderCardProps {
removing: boolean;
actionLabel?: string;
showRemove?: boolean;
editDisabled?: boolean;
}

export interface ChatGptOAuthDialogProps {
Expand Down
Loading
Loading