codex-litellm 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

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.

agentmods
npx agentmods add instructions/avikalpa/codex-litellm/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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01905 $0.01905
Opus 5 $0.00953 $0.00953
Sonnet 5 $0.00381 $0.00381
Haiku 4.5 $0.00191 $0.00191

Measured 4d ago against content hash b3bc09f081de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (13 stars, last pushed 21d ago), licensed Apache-2.0. It adds 1,905 tokens to every session, about $0.0095 per session on Opus 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.