update-models-ollama

update-models-ollama is a command for Claude Code from enricoros/big-AGI. It costs 9 tokens per session (825 once invoked), scanned A, original, MIT.

A command for updating Ollama model definitions. Ollama is a tool that runs language models, and this command refreshes the project’s list of models from Ollama’s library.

In plain words
What is it for?
Use it when maintaining the Ollama model list, including model names, sizes, capabilities, popularity, and whether a model is cloud-only.
Why use it?
It avoids manually checking the model website and entering new model details in the source file.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .claude/scripts/parse-ollama-models.js 2>&1.

Good fit Use it when maintaining the Ollama model list, including model names, sizes, capabilities, popularity, and whether a model is cloud-only.

Compare 6 commands from other repositories ↓
About the project

Big-AGI is an open-source workspace for using multiple AI models through chat and other AI functions. It is intended for engineers, founders, researchers, and other users who want to work with AI personas, model comparisons, image generation, voice, documents, and code-related features. The catalogue entries provide commands, instructions, and a skill for working with Big-AGI.

enricoros/big-AGI · 7,118 stars · on GitHub · big-agi.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/enricoros/big-AGI
agentmods
npx agentmods add commands/enricoros/big-agi/update-models-ollama

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-models-ollama

README.md
[![agentmods](https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-ollama/github.svg)](https://agentmods.dev/commands/enricoros/big-agi/update-models-ollama)
Your own site
<a href="https://agentmods.dev/commands/enricoros/big-agi/update-models-ollama"><img src="https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-ollama/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for update-models-ollama

Your own site · 80×15
<a href="https://agentmods.dev/commands/enricoros/big-agi/update-models-ollama"><img src="https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-ollama.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.00825
Opus 5 $0.00005 $0.00413
Sonnet 5 $0.00002 $0.00165
Haiku 4.5 $0.00001 $0.00082

Measured 10d ago against content hash fd9e32881d00, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

update-models-ollama scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://ollama.com/library?sort=newest" -o "$(node -p "require('os').tmpdir()")/ollama-newest.html"
.claude/commands/llms/update-models-ollama.md · 48 lines

What it actually says

Update src/modules/llms/server/ollama/ollama.models.ts with latest model definitions.

Reference src/modules/llms/server/llm.server.types.ts and src/modules/llms/server/models.mappings.ts for context only. Focus on the model file, do not descend into other code.

Automated Workflow:

# 1. Fetch the HTML to a cross-platform temp path (sorted by newest for stable ordering)
curl -s "https://ollama.com/library?sort=newest" -o "$(node -p "require('os').tmpdir()")/ollama-newest.html"

# 2. Parse it with the script (auto-finds the file in os.tmpdir())
node .claude/scripts/parse-ollama-models.js 2>&1

The parser outputs 5 pipe-delimited fields: modelName|pulls|capabilities|sizes|cloud

  • deepseek-r1|91500000|tools,thinking|1.5b,7b,8b,14b,32b,70b,671b|
  • kimi-k3|39000|vision,tools,thinking||cloud - cloud-only, so no sizes

Primary Sources:

Fallbacks if blocked: Check https://github.com/ollama/ollama, search "ollama featured models", "ollama latest models", or search GitHub for latest model info

What the file is: a full mirror of the library index minus embedding models, in page order (newest first). ~222 entries as of 2026-08-17. The parser applies no pull threshold and no top-N cut: every line it prints belongs in the file, and every file entry should be a printed line.

Cloud models: cloud-only entries ARE carried (kimi-k3, glm-5.2, minimax-m3, ...). The 5th field is informational only - the file has no cloud marker. Empty sizes on a cloud line is expected, not a parse failure.

Removals: remove an entry only when its name is absent from the library index. Do NOT probe https://ollama.com/library/<id>: delisted models keep returning 200 there (verified: glm-5, glm-4.7 return 200 while absent from the index), so a 404 test never fires.

Sanity check the parse before editing: 200+ lines, non-zero pulls, capabilities present. All-zero pulls or empty capabilities means the page markup changed - fix the regexes in the parser (it warns on this), never write a stripped list into the file.

Field mapping:

  • tools -> hasTools: true, vision -> hasVision: true, embedding -> isEmbeddings: true (note the 's'; the parser drops embedding models, so this should not come up)
  • thinking and audio -> tags, followed by the size chips (1.5b, 7b, 32b, ...) in page order

Important:

  • Sort them in the EXACT same order as the source (newest first, for stable ordering)
  • Set today's date (YYYYMMDD format) for newly added models only
  • Set OLLAMA_PREV_UPDATE to the previous OLLAMA_LAST_UPDATE, then OLLAMA_LAST_UPDATE to today (PREV drives the isNew badge)
  • Do NOT change dates of existing models
  • Review the full model list for additions, removals, and changes
  • Minimize whitespace/comment changes, focus on content
  • Preserve comments and newlines to make diffs easy to review
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 48 lines · 9 tokens per session scan A fd9e32881d00

Subscribe to this mod's changes

update-models-ollama is a command published in the GitHub repository enricoros/big-AGI (7,118 stars, last pushed today), licensed MIT. It adds 9 tokens to every session and 825 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.