Skip to content

feat(llm): add Ollama as local LLM provider#7

Merged
ngduyanhece merged 6 commits intomainfrom
feat/add-ollama-llm-provider
Jul 6, 2025
Merged

feat(llm): add Ollama as local LLM provider#7
ngduyanhece merged 6 commits intomainfrom
feat/add-ollama-llm-provider

Conversation

@longle325
Copy link
Copy Markdown
Contributor

@longle325 longle325 commented Jul 2, 2025

Update (5/7/2025): Now ollama models can use memory operation tools

Description

What problem does this solve?

  • Supports offline development and testing environments.
  • Expands cipher's provider ecosystem to include local hosting options alongside cloud providers.

How did you solve it?

  • Environment Configuration: Added OLLAMA_BASE_URL environment variable
  • Provider Support: Extended LLM config validation to include 'ollama' as a supported provider.
  • Service Implementation: Created OllamaService class in src/core/brain/llm/services/ollama.ts that implements the ILLMService interface

Any breaking changes?

  • No breaking changes. All new features are backward compatible and opt-in.

Testing performed

  • Manually ran the demo script to verify that chat interactions worked.
  • All tests passed.

@ngduyanhece ngduyanhece merged commit 9a91e06 into main Jul 6, 2025
@RyanNg1403 RyanNg1403 deleted the feat/add-ollama-llm-provider branch July 19, 2025 00:49
RyanNg1403 added a commit that referenced this pull request Apr 13, 2026
Fixes applied (6):
- #1: Path traversal guard — safePath() validates all file paths stay
  within contextTreeDir before write/delete
- #2: SYNTHESIZE/UPDATE throws instead of deleting pre-existing file
  (previousTexts not captured for synthesize operations)
- #3: Remove unnecessary `as number` cast — TypeScript narrows
  log.completedAt after status checks
- #5: Manifest rebuild errors now reported in result.errors instead
  of silently swallowed
- #6: unlinkSafe() only swallows ENOENT, rethrows permission errors
- #9: Added test for SYNTHESIZE/UPDATE error path

Skipped (4):
- #4: lastDreamLogId intentionally NOT cleared — keeping it allows
  "Dream already undone" error which is more informative than
  "No dream to undo" on double-undo
- #7: resolveProject() fallback to cwd follows existing codebase
  pattern (curate/view.ts uses the same approach)
- #8: No exhaustiveness check in switch — silent no-op is correct
  for undo of unknown future operation types (safer than crashing)
- #10: No lastDreamLogId assertion in test — follows from #4 skip
@github-actions github-actions bot mentioned this pull request Apr 13, 2026
29 tasks
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.

2 participants