Skip to content

Add CustomProvider for custom OpenAI compatible LLM providers#166

Open
dinesy wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
dinesy:issue77-custom-llm-provider
Open

Add CustomProvider for custom OpenAI compatible LLM providers#166
dinesy wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
dinesy:issue77-custom-llm-provider

Conversation

@dinesy

@dinesy dinesy commented Jun 9, 2026

Copy link
Copy Markdown

Summary

For Issue #77 (Add Ollama LLM Provider). While ollama technically has its own REST API, it also supports standard OpenAI compatible calls (the /v1 base url instead of /api). This means we can still use the openai module, and support any other local LLM provider (thus the "custom" name instead of "ollama").

Testing

  • I have tested these changes locally
  • I have run all relevant automated tests
  • I have verified this does not break existing workflows
  • For changes that can be tested in UI, I have included screenshots or gif animations of the changes.

How I Tested

Tested via the web UI
Note: I've only confirmed this works on a Mac. Still needs testing on other OS's

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 9, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: dinesy / name: Ben Dines (2c155a3)

@jspada200

Copy link
Copy Markdown
Collaborator

This MR looks good to me with the exception of missing docs! It is currently in draft. Feel free to add docs and set to "ready" and will merge

@dinesy dinesy marked this pull request as ready for review July 4, 2026 01:13
@jspada200

Copy link
Copy Markdown
Collaborator

Hey @dinesy There are allot of changes here that are unrelated to the work you did. Could you rebase this branch onto main?

Thanks!

dinesy added 5 commits July 6, 2026 10:39
# Summary
For Issue AcademySoftwareFoundation#77 (Add Ollama LLM Provider). While ollama technically has
its own REST API, it also supports standard OpenAI compatible calls (the
`/v1` base url instead of `/api`). This means we can still use the
openai module, and support any other local LLM provider (thus the
"custom" name instead of "ollama").

Signed-off-by: Ben Dines <benjamin.dines@gmail.com>
llama3.2:latest is a basic 3B model
host.docker.internal points to docker host on Docker Desktop for Mac

Signed-off-by: Ben Dines <benjamin.dines@gmail.com>
…oviderBase class

It shouldn't be necessary, given that any provider that requires one
would fail anyway, and a Custom provider would likely not have one at
all.

Signed-off-by: Ben Dines <benjamin.dines@gmail.com>
- Remove description of error for missing credentials
- Add entry for `custom` to llm provider table in README.md
- Add yaml examples for configuring custom llm provider to README.md and
QUICKSTART.md
- Add explanation of local hostnames and docker containers to README.md
- Add link from QUICKSTART.md to local hostname explanation in README.md

Signed-off-by: Ben Dines <benjamin.dines@gmail.com>
Add option 3 (Custom/OpenAI-compatible) to the LLM provider setup
in bootstrap.sh. When selected, the wizard prompts for:

- Custom LLM URL (default: http://host.docker.internal:11434/v1)
- Custom LLM model (default: llama3.2:latest)
- Whether an API key is required (optional)

Writes LLM_PROVIDER=custom, CUSTOM_LLM_URL, CUSTOM_LLM_MODEL, and
optionally CUSTOM_LLM_API_KEY to docker-compose.local.yml.

On Linux with a host.docker.internal URL, automatically adds the
extra_hosts mapping so containers can reach the host. Warns if the
user provides a localhost URL since it won't work from within Docker.

Signed-off-by: Ben Dines <benjamin.dines@gmail.com>
@dinesy dinesy force-pushed the issue77-custom-llm-provider branch from 27f76f1 to 5b6de10 Compare July 6, 2026 17:41
@dinesy

dinesy commented Jul 6, 2026

Copy link
Copy Markdown
Author

Fixed! Sorry about that! I must have picked the wrong commit to rebase onto last time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants