Skip to content

Add Ollama support#6

Merged
EvanPaules merged 4 commits intoEvanPaules:mainfrom
patmakesapps:add-ollama-support
Apr 8, 2026
Merged

Add Ollama support#6
EvanPaules merged 4 commits intoEvanPaules:mainfrom
patmakesapps:add-ollama-support

Conversation

@patmakesapps
Copy link
Copy Markdown

Summary

  • add wrapOllama support for chat, generate, and embed-style usage tracking
  • extend the fetch proxy to recognize Ollama local/cloud API endpoints and parse NDJSON streaming responses
  • add README docs, focused Ollama tests, and a one-command local smoke test via npm run ollama:smoke -- <model>

Testing

  • npm run build
  • npm test
  • npm run ollama:smoke -- llama3.2:3b

@patmakesapps
Copy link
Copy Markdown
Author

Pushed a follow-up commit to address the CI failure around the
streamed Ollama proxy test.

What changed:

  • switched the fetch proxy stream handling to ReadableStream.tee()
    so the caller gets a native response body while usage tracking reads a
    separate branch in the background
  • added a bounded timeout in the NDJSON streaming test so CI fails
    explicitly instead of hanging on response.text()

Why:

  • the failure looked like the wrapped response stream was not closing
    reliably on GitHub Actions, so response.text() could appear to get
    no response even though the fixture data was valid

Checks run locally:

  • npm run build --workspace packages/core passed
  • direct built-JS reproduction of the streamed Ollama path completed
    and tracked usage correctly
  • full npm test could not be run in this sandbox because the local
    environment blocks child-process spawn (spawn EPERM)

Commit: 908ebc8

@EvanPaules EvanPaules merged commit 106eff2 into EvanPaules:main Apr 8, 2026
3 checks passed
@EvanPaules EvanPaules self-requested a review April 9, 2026 00:58
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