adding-models

A guide for adding support for new language models to Letta Code. A language model is software that generates or understands text, and a model handle is the identifier used to select one.

In plain words
What is it for?
Use it when adding a model provider, validating model handles, updating the model catalog, or adjusting compatibility checks.
Why use it?
It explains where model lists come from, how to check valid identifiers, and which compatibility files may need updates.

Skill for Claude CodeCodex

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 skills/letta-ai/letta-code/adding-models
Any agent
npx skills add letta-ai/letta-code --skill adding-models
Clone the repo
git clone --depth 1 https://github.com/letta-ai/letta-code

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 816 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00058 $0.00816
Opus 5 $0.00029 $0.00408
Sonnet 5 $0.00012 $0.00163
Haiku 4.5 $0.00006 $0.00082

Measured 2d ago against content hash 2e241d749070, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adding-models 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 2d 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://api.letta.com/v1/models/catalog | jq '.models[] | [.id, .handle]'
.skills/adding-models/SKILL.md · 93 lines

How it starts

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

Adding Models

This skill guides you through adding a new LLM model to Letta Code.

Quick Reference

Key files:

  • src/agent/remote-model-catalog.ts - Runtime catalog loading and projection
  • src/agent/model-catalog.ts - Model lookup and compatibility aliases
  • .github/workflows/ci.yml - CI test matrix (optional)
  • src/tools/manager.ts - Toolset detection logic (rarely needed)

Workflow

Step 1: Find Valid Model Handles

Query the hosted catalog to see preset IDs and handles:

curl -s https://api.letta.com/v1/models/catalog | jq '.models[] | [.id, .handle]'

To inspect the models currently available from an API backend, query its model inventory:

curl -s https://api.letta.com/v1/models/ | jq '.[] | .handle'

Or filter the inventory by provider:

curl -s https://api.letta.com/v1/models/ | jq '.[] | select(.handle | startswith("google_ai/")) | .handle'

Common provider prefixes:

  • anthropic/ - Claude models
  • openai/ - GPT models
  • google_ai/ - Gemini models
  • google_vertex/ - Vertex AI
  • openrouter/ - Various providers

Step 2: Update the Owning Catalog

Letta Code does not bundle a model catalog:

  • API and hosted presets come from the server's GET /v1/models/catalog response.
  • Local model inventory comes from pi-ai and the active provider runtimes.

Add the model at the source that owns it. A hosted preset belongs in the server catalog. A local provider model belongs in pi-ai or that provider's discovery runtime.

Only change this repository when the model needs Letta Code-specific compatibility behavior, such as preserving an established CLI alias or recognizing a new provider for toolset selection. Keep that logic narrow and derive the handle and metadata from the runtime catalog rather than copying model definitions here.

Step 3: Test the Model

Test with headless mode:

bun run src/index.ts --new --model <model-id> -p "hi, what model are you?"

Example:

bun run src/index.ts --new --model gemini-3-flash -p "hi, what model are you?"

Read the full file on GitHub · 93 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. 2d ago First seen · 93 lines · 58 tokens per session scan A 2e241d749070

Subscribe to this mod's changes

adding-models is a skill published in the GitHub repository letta-ai/letta-code (3,178 stars, last pushed today), licensed Apache-2.0. It adds 58 tokens to every session and 816 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

writing

将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.

bojieli/ai-agent-book · 27 tokens

kayba-stage-7-fixer

Implement the approved fixes from the action plan and log all changes. Trigger when the user says "run stage 7", "implement fixes", "apply action plan", or when invoked by the kayba-pipeline orchestrator. Requires eval/actionplan.md to exist.

kayba-ai/agentic-context-engine · 61 tokens

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

food-order

Reorder previous Foodora orders, preview cart contents, and track delivery ETA/status with ordercli. Use when the user wants to reorder food, check delivery status, or browse recent Foodora order history. Never confirm an order without explicit user approval.

Bitterbot-AI/bitterbot-desktop · 53 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

ws-ckpt

工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。.

alibaba/anolisa · 115 tokens