Skip to content

Add Ollama provider support and refine-with-note option#10

Open
infpdev wants to merge 1 commit into
h3yng:mainfrom
infpdev:feat/ollama-support
Open

Add Ollama provider support and refine-with-note option#10
infpdev wants to merge 1 commit into
h3yng:mainfrom
infpdev:feat/ollama-support

Conversation

@infpdev
Copy link
Copy Markdown

@infpdev infpdev commented May 24, 2026

Summary

Add native support for running scom against a local Ollama server, improve refine guidance handling

I mainly implemented this so I could use Ollama as the primary provider locally while still keeping cloud models available as fallbacks when needed..

Related issue

Closes #9

What changed

  • Added an ollama provider without API-key requirements and routed Ollama requests through /api/tags and /api/generate.
  • Added local model discovery with automatic fallback to an installed Ollama model when the configured model is unavailable.
  • Added "Refine with Note" so users can steer the next generation directly without reusing the previous draft as prompt context.
  • Stopped truncating staged diffs before generation.
  • Updated setup/model flows so Ollama skips API-key prompts and supports a configurable local base URL.
  • Updated the README with the minimum required Ollama setup and usage notes.

Testing

  • Verified scom setup with Ollama selected as provider.
  • Verified local model discovery through /api/tags.
  • Verified generation through /api/generate.
  • Verified fallback to an installed local model when the configured model is unavailable.
  • Verified "Refine with Note" influences regeneration while preserving selected output style.
  • Verified staged diffs are passed without truncation.

Manual checks

  • Confirm Ollama model discovery uses GET /api/tags.
  • Confirm generation uses POST /api/generate with model fallback.
  • Confirm "Refine with Note" respects the selected output style (short, detailed, adaptive).
  • Confirm staged diffs are passed in full.
  • Confirm Ollama falls back to an installed model when the configured model is unavailable.

Preview

Example of using a local Ollama model together with the interactive "Refine with Note" workflow:

Image

image

Checklist

  • The PR targets dev. (The contributing guide mentions targeting dev, but the repository currently only exposes main, so this PR targets main instead)
  • The related issue is linked in the PR description.
  • Tests added or updated where appropriate. (No tests currently exist in the main branch.)
  • Linter/formatting passes locally.
  • Documentation updated if public behavior changed.

- introduce ollama as a new provider option
- update setup to handle ollama provider without api key
- refine model selection and api key prompts for better user experience
- add ollama to the list of supported providers for key management
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Ollama provider support and interactive refine workflow

1 participant