GeezerVison is showing github.com — feat: Ollama implementation by koryboyd · Pull Request #16681 · anomalyco/opencode
Conversation
koryboyd
commented
Mar 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #
Type of change
- Bug fix
- [ X] New feature
- [X ] Refactor / code improvement
- Documentation
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
implemented reasoning into ollama local models and added detections for locally installed ollama models instead of just cloud
How did you verify your code works?
im using it and so am currently testing
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
- [ X] I have tested my changes locally
- [ X] I have not included unrelated changes in this PR
If you do not follow this template your PR will be automatically rejected.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Add Ollama detection utility that queries localhost:11434/api/tags
- Auto-register Ollama provider when running locally with detected models
- Add --local flag to /models command to show only local models
- Enable tool calling for Ollama models via custom loader
- Auto-detect reasoning models (qwen3, phi4, gemma3, llama3, deepseek, qwq, gpt-oss)
- Add config support to force reasoning ON/OFF via capabilities.reasoning
- Enable interleaved with reasoning_content field for reasoning models
- Increase token limits (context: 200k, output: 32k) for reasoning models
- Add default reasoningEffort: medium for reasoning models
- Add think parameter support for Ollama API (true/false or low/medium/high for GPT-OSS)
- configModel.reasoning instead of configModel.capabilities.reasoning
- configModel.interleaved instead of configModel.capabilities.interleaved
Allow variants (low/medium/high) to be generated for Ollama models
that were previously blocked by the deepseek/minimax/glm/mistral/kimi
check in ProviderTransform.variants()
Reasoning detection was only running for auto-detected Ollama models,
but was skipped when Ollama was configured in opencode.json. Now applies
reasoning detection to all Ollama models regardless of how they're loaded.
The createOpenAICompatible provider may not have a chat method in newer
AI SDK versions. Added fallback to languageModel like other providers.
|
Hey! Your PR title Ollama implementation doesn't follow conventional commit format.
Please update it to start with one of:
feat: or feat(scope): new feature
fix: or fix(scope): bug fix
docs: or docs(scope): documentation changes
chore: or chore(scope): maintenance tasks
refactor: or refactor(scope): code refactoring
test: or test(scope): adding or updating tests
Where scope is the package name (e.g., app, desktop, opencode).
See CONTRIBUTING.md for details.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR doesn't fully meet our contributing guidelines and PR template.
What needs to be fixed:
- No "Type of change" checkbox is checked. Please select at least one.
- Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.
Please edit this PR description to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Ollama only supports thinking for specific models: DeepSeek R1, DeepSeek
v3.1, Qwen 3, and GPT-OSS. Other models like phi4 and gemma3 don't
support the think parameter and will error if it's sent.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ort it"
This reverts commit 5caf077.
…ble SDK"
This reverts commit b578e75.
…a models"
This reverts commit 47ade4e.
…rties"
This reverts commit 034ada2.
…ides"
This reverts commit 3ffa090.
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new pull request that follows our guidelines.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|