This repository was archived by the owner on Apr 19, 2026. It is now read-only.
Conversation
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
listModels()in ollama.ts throws on network error instead of returning empty #5:ListModels()ininternal/ollama/client.gonow returns([]string{}, nil)instead of(nil, err)when the HTTP request fails due to a network/connection error. This prevents callers from crashing when Ollama is unreachable — they simply get an empty model list. Valid HTTP error responses (e.g. 401) still propagate as before.MaxOutputconstant ininternal/tools/tools.gofrom 8000 to 2000 chars. With 5 tool calls, the previous limit could produce 40,000 chars of aggregate output, blowing past small Ollama context windows (4096 tokens). At 2000 chars per file, the aggregate stays within budget for the default context size.Test plan
go build ./...passesgo test ./...passes (no test files in affected packages)ListModels()returns empty list when Ollama is stopped🤖 Generated with Claude Code