Skip to content
Open
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
5 changes: 3 additions & 2 deletions studio/backend/core/inference/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,9 @@
"auth_header": "Authorization",
"auth_prefix": "Bearer ",
"notes": (
"Local Ollama server. OpenAI-compatible /v1/chat/completions; "
"no API key. Surfaced via CUSTOM_PROVIDER_PRESETS in the frontend."
"Ollama server (local or cloud). OpenAI-compatible "
"/v1/chat/completions; API key optional (required by Ollama "
"cloud). Surfaced via CUSTOM_PROVIDER_PRESETS in the frontend."
),
"hidden": True,
},
Expand Down
4 changes: 2 additions & 2 deletions studio/frontend/src/features/chat/chat-providers-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ export function ChatProvidersSettings({
(s) => s.setConnectionsEnabled,
);
const isCustomProvider = isCustomProviderType(providerType);
// Local presets (Ollama, llama.cpp) never use API keys — hide the field.
// vLLM may optionally use a bearer token on secured deployments.
// llama.cpp hides the key field. Ollama and vLLM show an optional key:
// Ollama cloud and secured vLLM need one; local servers leave it empty.
const showApiKeyField = !customPresetSkipsApiKeyField(providerType);
const showReasoningToggle = supportsProviderReasoningToggle(providerType);

Expand Down
5 changes: 3 additions & 2 deletions studio/frontend/src/features/chat/external-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,12 @@ export function supportsRemoteModelCatalog(
);
}

/** Presets that skip the API-key field (local servers with no auth by default). */
/** Presets that hide the API-key field. Ollama is not skipped: Ollama cloud
* requires a key; local servers leave the optional field empty. */
export function customPresetSkipsApiKeyField(
providerType: string | null | undefined,
): boolean {
return providerType === "ollama" || providerType === "llama_cpp";
return providerType === "llama_cpp";
}

/** Catalog load plus optional manual model IDs. */
Expand Down
Loading