fix(ollama-local): support custom host URL for remote Ollama servers (closes #578)
Add a shared resolveOllamaLocalHost() helper and wire it through the executor, models/validate/test routes, so users can point ollama-local at a remote Ollama instance instead of being locked to localhost:11434. Also expose the host as an "Ollama Host URL" field in AddApiKeyModal (empty = default localhost:11434), making the option reachable from the dashboard without hand-editing db.json. Co-authored-by: anuragg-saxenaa <anuragg.saxenaa@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -339,3 +339,10 @@ export const PROVIDERS = {
|
||||
noAuth: true
|
||||
},
|
||||
};
|
||||
|
||||
export const OLLAMA_LOCAL_DEFAULT_HOST = "http://localhost:11434";
|
||||
|
||||
export function resolveOllamaLocalHost(credentials) {
|
||||
const raw = credentials?.providerSpecificData?.baseUrl?.trim();
|
||||
return (raw || OLLAMA_LOCAL_DEFAULT_HOST).replace(/\/$/, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user