codex-litellm: Instructions file for Codex

AGENTS.md

codex-litellm AGENTS.md is an instructions file for Codex, OpenCode from avikalpa/codex-litellm. It costs 1,905 tokens per session, scanned C, original, Apache-2.0.

A project guide for codex-litellm, a maintained version of OpenAI Codex that can connect directly to LiteLLM, a service that routes AI requests to different providers and models.

In plain words
What is it for?
Use it when updating the LiteLLM patchset, investigating backend or model problems, checking model discovery, or keeping the fork aligned with upstream Codex.
Why use it?
It explains the compatibility issues that can arise between providers, including tool calls, reasoning output, timeouts, usage reports, and incomplete replies.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads ~/.codex paths; mentions Codex.

This is avikalpa/codex-litellm's own configuration. It tells Codex and OpenCode how to work on codex-litellm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codex-litellm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to avikalpa/codex-litellm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/avikalpa/codex-litellm/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/avikalpa/codex-litellm

Made for: Codex, OpenCode.

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 codex-litellm AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/avikalpa/codex-litellm/agents-md/github.svg)](https://agentmods.dev/instructions/avikalpa/codex-litellm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/avikalpa/codex-litellm/agents-md"><img src="https://agentmods.dev/badge/instructions/avikalpa/codex-litellm/agents-md/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 codex-litellm AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/avikalpa/codex-litellm/agents-md"><img src="https://agentmods.dev/badge/instructions/avikalpa/codex-litellm/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,905 This file is loaded in full into every session.
When invoked 1,905 The same file — it is already loaded in full.
Security scan C 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.01905 $0.01905
Opus 5.5 $0.00762 $0.00762
Sonnet 5.5 $0.00381 $0.00381
Haiku 4.5 $0.00191 $0.00191

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

Security

Grade C, and why

codex-litellm AGENTS.md scanned grade C 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf test-workspace && ./setup-test-env.sh`
AGENTS.md · 125 lines

How it starts

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

codex-litellm

Purpose

  • codex-litellm is upstream openai/codex plus a maintained patchset so the CLI can work directly against a LiteLLM backend.
  • The goal is not to fork Codex permanently. The goal is to keep a reproducible diff that can be carried forward to newer upstream rust-v* tags.
  • Build direction comes from upstream. Our job is to preserve LiteLLM compatibility, observability, and model usability without drifting from Codex more than necessary.

What Is Not Obvious

  • LiteLLM compatibility is not just an endpoint swap. Different providers and models diverge on tool-calling, reasoning output, timeout behavior, usage reporting, and whether they ever emit a clean final assistant reply.
  • codex-litellm therefore needs narrow runtime logic around provider setup, request shaping, tool compatibility, /models discovery, and release model curation.
  • The right answer is usually evidence first, patch second. Do not guess which layer is broken until telemetry or direct backend probes show it.

Non-Negotiable Rules

  • latest upstream means the latest stable upstream rust-v* tag from openai/codex, excluding prereleases.
  • If the user asks to update to latest upstream, do not release or publish anything from an older base afterward.
  • Never cut a release unless main, package.json, package-lock.json, stable-tag.patch, and the checked-out codex/ baseline all agree on the same upstream version.
  • build.sh is release automation. Do not use it for development work inside codex/; it resets the upstream checkout.
  • After every non-release milestone commit, explicitly ask the user whether to publish to npm before doing release actions.
  • Exception: when the user asks to update to latest upstream, the default workstream is to smoke test, push, publish, and babysit the GitHub Actions and npm release path through completion unless the user explicitly says not to publish.
  • Block release on live model failures. A local build is not enough.
  • Release builds happen on GitHub Actions. Do not treat local release artifacts as publishable outputs.
  • Keep the repo surface clean enough for fast pacing. Local test/build clutter should not become normal working state.

Read the full file on GitHub · 125 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. 2mo ago First seen · 125 lines · 1,905 tokens per session scan C b3bc09f081de

Subscribe to this mod's changes

codex-litellm AGENTS.md is an instructions file published in the GitHub repository avikalpa/codex-litellm (16 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,905 tokens to every session, about $0.0076 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

codex-litellm AGENTS.md compared with instructions from other repositories

codex-litellm AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-litellm AGENTS.mdavikalpa/codex-litellmInstructions file162mo agoApache-2.0C1,905Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot