switch-model

switch-model is a skill for Codex from ohong/agent-skills. It costs 63 tokens per session (2,184 once invoked), scanned B, original, MIT.

A command-line tool for changing the default language model and provider used by Codex, an AI coding assistant. It can discover available Fireworks serverless models and restore supported existing providers.

In plain words
What is it for?
Use it to list or search available models, switch the default model, set effort, check status, and restore GPT or Grok settings.
Why use it?
It avoids editing the Codex configuration file by hand when changing models. It can also show the current setting or preview a change without applying it.

Skill for Codex

Written for Codex: reads $CODEX_HOME. Also seen: mentions Claude Code; reads ~/.codex paths; mentions Codex.

Good fit Use it to list or search available models, switch the default model, set effort, check status, and restore GPT or Grok settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ohong/agent-skills/switch-model
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.

Any agent
npx skills add ohong/agent-skills --skill switch-model
Clone the repo
git clone --depth 1 https://github.com/ohong/agent-skills

Made for: Codex.

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 switch-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/ohong/agent-skills/switch-model/github.svg)](https://agentmods.dev/skills/ohong/agent-skills/switch-model)
Your own site
<a href="https://agentmods.dev/skills/ohong/agent-skills/switch-model"><img src="https://agentmods.dev/badge/skills/ohong/agent-skills/switch-model/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 switch-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/ohong/agent-skills/switch-model"><img src="https://agentmods.dev/badge/skills/ohong/agent-skills/switch-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00063 $0.02184
Opus 5.5 $0.00025 $0.00874
Sonnet 5.5 $0.00013 $0.00437
Haiku 4.5 $0.00006 $0.00218

Measured 1mo ago against content hash 4dad80d5c1f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

switch-model scanned grade B 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/fireworks_auth.py, scripts/fireworks_connect.py, scripts/switch_model.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- FireConnect auto-installs it for Claude Code only; add it to `~/.codex/config.toml` by hand for Codex.
switch-model/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Switch model

Run the helper to change the default model. The user's switch request authorizes the config edit. Resolve script paths relative to this skill directory. Requires Python 3.11+ and FireConnect. On this machine, codex-switch-model runs the same helper from the terminal.

  1. Use a familiar alias, or list exact IDs with python3 scripts/switch_model.py --list --search NAME. --list reports each model's id, display name, context window, vision support, price, and whether FireConnect curates it (in_codex_catalog).
  2. Run the switch, for example python3 scripts/switch_model.py kimi. Any other serverless model works by short or full id, for example qwen3p8-max or accounts/fireworks/models/qwen3p8-max.
  3. Report the saved model, provider, effort, and session restart requirement.
codex-switch-model --list
codex-switch-model --list --search glm
codex-switch-model kimi
codex-switch-model kimi fast
codex-switch-model glm flash
codex-switch-model deepseek pro
codex-switch-model deepseek-flash-latest
codex-switch-model --effort medium kimi
codex-switch-model --dry-run kimi
codex-switch-model --status
codex-switch-model grok
codex-switch-model gpt

Use $switch-model kimi inside Codex. Also recognize the user's $swtich-model typo.

FireConnect owns the Fireworks model catalog. This helper ships no catalog of its own. It stages FireConnect's own fireconnect codex on output in a private temporary home, then reads the generated Codex catalog and model list from that directory. Aliases point at Fireworks latest routers. The helper edits that catalog in exactly one way: it restores the max reasoning tier described below. Models present in FireConnect's catalog keep that curated metadata. Any other model from Fireworks' model API gets a generic catalog entry, so pinned versions such as kimi-k3 and models FireConnect does not curate, such as qwen3p8-max, are selectable by name. Generic entries use Fireworks' canonical full id in both config.toml and the catalog, a low/medium/high reasoning ladder plus max on the deep-tier families, the reported context length, and a conservative 65,536-token window when Fireworks reports none. Claiming a window that is too large delays compaction until the server rejects the request, so the fallback errs small. The catalog can include region-only deployments such as kimi-k3-us and glm-5p3-flash-us.

FireConnect curates reasoning tiers by hand and grants max to only a few base refs, so DeepSeek, GLM, and Kimi families arrive with a three-tier ladder. The helper restores max on those families. Fireworks documents the deep tier for DeepSeek V4/V4.1, Kimi K3, and GLM 5.2; a live probe confirmed it for GLM 5.3. Measured cost: max uses two to twelve times the output tokens of low and rarely improves accuracy on small coding tasks. Prefer low or high, and reach for max only when a task needs deep deliberation. The list merges FireConnect's curated entries with every chat-plus-tools model on Fireworks' model API. It excludes MiniMax, non-tool models, and the FireRouter BYOK router. MiniMax currently conflicts with Codex tool-message ordering. Missing or ambiguous IDs fail without changing the config. Do not invent model IDs or claim every serverless model supports Codex. Fireworks' model API lists more models than it serves, so a generic switch first runs one tiny validation request (developer plus user message, at most 64 output tokens). Broken models fail with the server's reason before any file changes; dry runs and curated switches run no inference. Example limits found on 2026-09-18: qwen3p8-max rejects Codex's developer-role messages in its chat template, while nemotron-lightning-3p5-30b-a3b passes.

Kimi K3 works in CLI sessions but currently fails in Codex desktop sessions. Fireworks rejects any tool schema that sets type beside $ref, and a desktop app tool sends that shape. The turn ends with stream disconnected before completion: JSON Schema not supported: when using $ref, type should be defined in the referenced schema instead of the parent schema. DeepSeek and GLM accept that shape. Verified on 2026-09-17: kimi-fast-latest failed in this desktop thread, passed in two CLI sessions, and a direct Fireworks probe reproduced the exact rejection. The warning covers the whole Kimi family, including pinned ids. Use Kimi in the CLI, or DeepSeek/GLM in the desktop, until the app or Fireworks fixes it.

Read the full file on GitHub · 131 lines

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. 1mo ago Changed · +26 lines · +3 tokens per session 4dad80d5c1f0
  2. 1mo ago Changed · +32 lines · +2 tokens per session 302158e45c55
  3. 1mo ago First seen · 73 lines · 58 tokens per session scan B 6db328ba4b46

Subscribe to this mod's changes

switch-model is a skill published in the GitHub repository ohong/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 2,184 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

Other skills, from other repositories

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and designs an end-to-end governed agentic analytics solution using Knowledge Catalog and Managed Service for Apache Spark (Lightning Engine). Use when designing data science and analytics workflows across structured and unstructured distributed data (including in S3, Azure Blob, AlloyDB, and…

google/skills · 132 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

finetuning

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file…

microsoft/skills · 132 tokens