feat(ollama-cloud): add Ollama Cloud provider with cookie-based quota scraping#103
Open
mattfinlayson wants to merge 1 commit into
Open
feat(ollama-cloud): add Ollama Cloud provider with cookie-based quota scraping#103mattfinlayson wants to merge 1 commit into
mattfinlayson wants to merge 1 commit into
Conversation
… scraping - Add Ollama Cloud provider that scrapes usage from ollama.com/settings - Support cookie config via OLLAMA_USAGE_COOKIE env var, JSON, or YAML - Normalize __Secure-session= cookie prefix if user includes it - Add to provider registry, metadata, shapes, and labels - Update README with provider setup section - Fix stale provider-metadata test to include ollama-cloud entry
Owner
|
@mattfinlayson Thanks for contribution, will review |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an Ollama Cloud provider that scrapes usage data from ollama.com/settings.
Closes #38
What it does
OLLAMA_USAGE_COOKIEenv var,~/.config/opencode/opencode-quota/ollama-cloud.json, or~/.config/ollama-usage/config.yaml__Secure-session=cookie prefix if the user includes it in their configFiles changed
src/lib/ollama-cloud.ts— settings page scraper with HTML parsingsrc/lib/ollama-cloud-config.ts— cookie config resolution (env > JSON > YAML)src/providers/ollama-cloud.ts— QuotaProvider interface implementationsrc/lib/provider-metadata.ts— canonical ID, labels, shapes, runtime IDssrc/lib/types.ts— OllamaCloudWindow and OllamaCloudResult typessrc/providers/registry.ts— registered in provider listtests/lib.provider-metadata.test.ts— updated expected shapesREADME.md— provider table entry and setup instructions