-
Notifications
You must be signed in to change notification settings - Fork 13
🤖 feat: add Ollama local model support #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 11 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
6fbac34
🤖 feat: add support for Ollama local models
ammar-agent 9021ffd
🤖 test: add Ollama integration tests with CI support
ammar-agent a268216
🤖 ci: add caching for Ollama models
ammar-agent 472270c
🤖 fix: format docs/models.md
ammar-agent 94d4aa9
🤖 refactor: address review comments
ammar-agent 6f8976b
🤖 fix: resolve Ollama integration test timing issues
ammar-agent 6d48ecf
🤖 style: format ollama test file
ammar-agent 5df1cf8
🤖 refactor: cleanup and consistency improvements
ammar-agent 4cd2491
🤖 refactor: remove unused variable from EventCollector
ammar-agent 5081dce
🤖 perf: optimize Ollama CI caching to <5s startup
ammar-agent 1b577db
🤖 feat: add multi-pattern lookup for Ollama model context limits
ammar-agent f997fbe
🤖 perf: use stable cache key for Ollama (v3 without workflow hash)
ammar-agent 872c6df
🤖 ci: trigger CI after resolving Codex comment
ammar-agent 7fa5c47
🤖 fix: set permissions on Ollama directory for cache saving
ammar-agent 5a4978e
🤖 ci: test warm cache after v3 saved
ammar-agent c7b245d
🤖 refactor: cache models in /tmp to avoid permission issues
ammar-agent 09015ae
🤖 refactor: simplify Ollama setup (remove caching complexity)
ammar-agent c10ffcb
🤖 refactor: create setup-ollama action with caching
ammar-agent 4db87ae
🤖 fix: properly stop Ollama process after model pull
ammar-agent fecacc0
🤖 fix: use absolute path for Ollama cache (~ doesn't expand)
ammar-agent 87a76a7
🤖 debug: add directory listing to verify cache contents
ammar-agent ffeec29
🤖 debug: check both possible model locations
ammar-agent 2cc309c
🤖 debug: bump cache version to v3 for fresh test
ammar-agent dfaa011
🤖 debug: remove restore-keys to force cache miss
ammar-agent 75d6c05
🤖 fix: copy models from system location to cacheable location
ammar-agent 7f9c95e
🤖 refactor: simplify ollama caching with binary-only install
ammar-agent f82f5a7
🤖 fix: bump cache version to v2 to invalidate empty cache
ammar-agent ab90e9b
🤖 refactor: move Ollama model pull to test-side for better parallelism
ammar-agent 82b51a2
🤖 docs: recommend Ctrl+/ shortcut for model switching
ammar-agent e90b881
🤖 refactor: extract parseProviderName to eliminate duplication
ammar-agent f671d7a
🤖 refactor: parseModelString returns provider + model tuple
ammar-agent c115295
🤖 style: fix prettier formatting in docs/models.md
ammar-agent de39340
🤖 ci: split Ollama tests into separate job
ammar-agent 94cab2c
🤖 refactor: use TEST_OLLAMA env var to control Ollama tests
ammar-agent c5305ee
🤖 style: reduce Ollama test log spam in CI
ammar-agent 1c537e7
🤖 test: suppress console output in Ollama tests for CI
ammar-agent 6d1c786
🤖 fix: deduplicate tokenizer warnings to eliminate log spam
ammar-agent 8825ed8
🤖 docs: clarify Ollama works without configuration
ammar-agent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import { describe, expect, test } from "bun:test"; | ||
| import { formatModelDisplayName } from "./modelDisplay"; | ||
|
|
||
| describe("formatModelDisplayName", () => { | ||
| describe("Claude models", () => { | ||
| test("formats Sonnet models", () => { | ||
| expect(formatModelDisplayName("claude-sonnet-4-5")).toBe("Sonnet 4.5"); | ||
| expect(formatModelDisplayName("claude-sonnet-4")).toBe("Sonnet 4"); | ||
| }); | ||
|
|
||
| test("formats Opus models", () => { | ||
| expect(formatModelDisplayName("claude-opus-4-1")).toBe("Opus 4.1"); | ||
| }); | ||
| }); | ||
|
|
||
| describe("GPT models", () => { | ||
| test("formats GPT models", () => { | ||
| expect(formatModelDisplayName("gpt-5-pro")).toBe("GPT-5 Pro"); | ||
| expect(formatModelDisplayName("gpt-4o")).toBe("GPT-4o"); | ||
| expect(formatModelDisplayName("gpt-4o-mini")).toBe("GPT-4o Mini"); | ||
| }); | ||
| }); | ||
|
|
||
| describe("Gemini models", () => { | ||
| test("formats Gemini models", () => { | ||
| expect(formatModelDisplayName("gemini-2-0-flash-exp")).toBe("Gemini 2.0 Flash Exp"); | ||
| }); | ||
| }); | ||
|
|
||
| describe("Ollama models", () => { | ||
| test("formats Llama models with size", () => { | ||
| expect(formatModelDisplayName("llama3.2:7b")).toBe("Llama 3.2 (7B)"); | ||
| expect(formatModelDisplayName("llama3.2:13b")).toBe("Llama 3.2 (13B)"); | ||
| }); | ||
|
|
||
| test("formats Codellama models with size", () => { | ||
| expect(formatModelDisplayName("codellama:7b")).toBe("Codellama (7B)"); | ||
| expect(formatModelDisplayName("codellama:13b")).toBe("Codellama (13B)"); | ||
| }); | ||
|
|
||
| test("formats Qwen models with size", () => { | ||
| expect(formatModelDisplayName("qwen2.5:7b")).toBe("Qwen 2.5 (7B)"); | ||
| }); | ||
|
|
||
| test("handles models without size suffix", () => { | ||
| expect(formatModelDisplayName("llama3")).toBe("Llama3"); | ||
| }); | ||
| }); | ||
|
|
||
| describe("fallback formatting", () => { | ||
| test("capitalizes dash-separated parts", () => { | ||
| expect(formatModelDisplayName("custom-model-name")).toBe("Custom Model Name"); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.