update-models-openai

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

A coding command that refreshes the project's list of OpenAI models, including prices, capabilities, and retirement information, using OpenAI's developer documentation.

In plain words
What is it for?
Use it when keeping OpenAI model definitions current in an application that connects to OpenAI's models.
Why use it?
It removes the need to manually track changing OpenAI model details and update the model file yourself.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Codex.

Good fit Use it when keeping OpenAI model definitions current in an application that connects to OpenAI's models.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/enricoros/big-agi/update-models-openai
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,113 stars · on GitHub · big-agi.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/enricoros/big-AGI

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-openai

README.md
[![agentmods](https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-openai/github.svg)](https://agentmods.dev/commands/enricoros/big-agi/update-models-openai)
Your own site
<a href="https://agentmods.dev/commands/enricoros/big-agi/update-models-openai"><img src="https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-openai/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-openai

Your own site · 80×15
<a href="https://agentmods.dev/commands/enricoros/big-agi/update-models-openai"><img src="https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-openai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 839 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.00010 $0.00839
Opus 5 $0.00005 $0.00419
Sonnet 5 $0.00002 $0.00168
Haiku 4.5 $0.00001 $0.00084

Measured 9d ago against content hash 678dc6264610, 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-openai 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 9d 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.

Appending `.md` to any docs URL returns clean markdown that plain `curl` fetches (no 403, no browser needed):
.claude/commands/llms/update-models-openai.md · 40 lines

What it actually says

Update src/modules/llms/server/openai/models/openai.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.

Primary Sources: docs moved from platform.openai.com/docs/* (301s) to developers.openai.com/api/docs/*. Appending .md to any docs URL returns clean markdown that plain curl fetches (no 403, no browser needed):

Fallbacks if blocked: third-party aggregators via search, or Chrome DevTools MCP on the official docs.

Ground truth vs docs: /v1/models keeps listing models after shutdown (even GET /v1/models/<id> returns 200 for dead ids) - only a generation attempt is a liveness signal. A 1-token v1/chat/completions call returns 404 "has been deprecated" for dead ids; v1/responses says only "Model not found" for the same dead ids (equivalent verdict, weaker message). Probe before concluding a model is alive OR dead.

Before removing a model def, all three must hold (removal = delete the entry + add it to openAIModelsShutdownDenyList, which filters native api.openai.com listings only - compatible hosts/proxies that still serve the id keep it):

  1. OpenAI direct generation is dead (404 deprecated) - and the error is not a permission/entitlement error, which means the model EXISTS and some keys still have access (keep the def).
  2. The docs name that exact id: bare aliases can outlive their deny-listed snapshot (gpt-4o-search-preview still served after gpt-4o-search-preview-2025-03-11 shut down) - probe alias and snapshot separately.
  3. OpenRouter openai/<id> has no working endpoint (probe a 1-token generation, not just the listing) - Azure kept the 5.1/5.2 codex family alive post-shutdown. If OR still serves it, keep the def (hidden, deny-listed) so llmOrtOaiLookup keeps native interfaces/params - same pattern as gemini.models.ts phantom models.

Live endpoint (extra signal): If .env.api-keys has OPENAI_API_KEY, scan the served model list for what's new and cross-check the docs above: curl https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY". Never commit or echo the key.

Important:

  • Review the full model list for additions, removals, and price changes
  • Minimize whitespace/comment changes, focus on content
  • Preserve comments to make diffs easy to review
  • Flag broken links or unexpected content
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. 9d ago First seen · 40 lines · 10 tokens per session scan A 678dc6264610

Subscribe to this mod's changes

update-models-openai is a command published in the GitHub repository enricoros/big-AGI (7,113 stars, last pushed 2d ago), licensed MIT. It adds 10 tokens to every session and 839 once invoked, about $0.0001 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.